24 #ifndef PPL_Generator_defs_hh
25 #define PPL_Generator_defs_hh 1
53 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
89 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
90 int compare(
const Generator& x,
const Generator& y);
92 namespace IO_Operators {
96 std::ostream&
operator<<(std::ostream& s,
const Generator& g);
102 void swap(Generator& x, Generator& y);
324 Coefficient_traits::const_reference d
449 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
450 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
473 Coefficient_traits::const_reference
divisor()
const;
838 template <
typename To>
859 template <
typename Temp,
typename To>
880 template <
typename Temp,
typename To>
904 template <
typename To>
925 template <
typename Temp,
typename To>
946 template <
typename Temp,
typename To>
970 template <
typename To>
991 template <
typename Temp,
typename To>
1012 template <
typename Temp,
typename To>
1021 namespace IO_Operators {
1033 #endif // !defined(PPL_Generator_defs_hh)
void linear_combine(const Generator &y, dimension_type i)
Linearly combines *this with y so that i-th coefficient is 0.
bool is_not_necessarily_closed() const
Returns true if and only if the topology of *this row is not necessarily closed.
void m_swap(Generator &y)
Swaps *this with y.
Scalar product sign function object depending on topology.
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
void set_necessarily_closed()
Sets to NECESSARILY_CLOSED the topological kind of *this row.
void swap(CO_Tree &x, CO_Tree &y)
An iterator over a system of generators.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
The base class for systems of constraints and generators.
size_t dimension_type
An unsigned integral type for representing space dimensions.
An std::set of variables' indexes.
An adapter for Linear_Expression objects.
void shift_space_dimensions(Variable v, dimension_type n)
void throw_invalid_argument(const char *method, const char *reason) const
Throw a std::invalid_argument exception containing the appropriate error message. ...
A line, ray, point or closure point.
Linear_Expression expr
The linear expression encoding *this.
memory_size_type total_memory_in_bytes() const
Returns a lower bound to the total size in bytes of the memory occupied by *this. ...
bool is_line_or_ray() const
Returns true if and only if *this is a line or a ray.
Rounding_Dir
Rounding directions for arithmetic computations.
Representation representation() const
Returns the current representation of *this.
static const Generator & zero_dim_point()
Returns the origin of the zero-dimensional space .
static Generator ray(const Linear_Expression &e, Representation r=default_representation)
Returns the ray of direction e.
bool is_ray_or_point() const
Returns true if and only if *this is not a line.
bool is_equal_to(const Generator &y) const
Returns true if *this is identical to y.
std::ostream & operator<<(std::ostream &s, const Ask_Tell< D > &x)
static const Generator * zero_dim_closure_point_p
Holds (between class initialization and finalization) a pointer to the origin of the zero-dimensional...
friend int compare(const Generator &x, const Generator &y)
Expression_Hide_Last< Expression_Hide_Inhomo< Linear_Expression > > expr_type
The type of the (adapted) internal expression.
expr_type expression() const
Partial read access to the (adapted) internal expression.
void set_is_line_or_equality()
Sets to LINE_OR_EQUALITY the kind of *this row.
void fancy_print(std::ostream &s) const
A print function, with fancy, more human-friendly output.
bool is_equivalent_to(const Generator &y) const
Returns true if and only if *this and y are equivalent generators.
bool is_matching_closure_point(const Generator &p) const
Returns true if and only if the closure point *this has the same coordinates of the point p...
static Generator closure_point(const Linear_Expression &e=Linear_Expression::zero(), Coefficient_traits::const_reference d=Coefficient_one(), Representation r=default_representation)
Returns the closure point at e / d.
void set_is_ray_or_point()
Sets the Generator kind to RAY_OR_POINT_OR_INEQUALITY.
void set_topology(Topology x)
Sets to x the topological kind of *this row.
Kind kind_
The kind of *this.
static Generator line(const Linear_Expression &e, Representation r=default_representation)
Returns the line of direction e.
A dimension of the vector space.
Kind
The possible kinds of Generator objects.
void set_space_dimension_no_ok(dimension_type space_dim)
The base class for convex polyhedra.
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
A wrapper for numeric types implementing a given policy.
#define PPL_OUTPUT_DECLARATIONS
Generator(Representation r=default_representation)
Constructs the point at the origin.
static void initialize()
Initializes the class.
Type type() const
Returns the generator type of *this.
bool OK() const
Checks if all the invariants are satisfied.
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
A Mixed Integer (linear) Programming problem.
void sign_normalize()
Normalizes the sign of the coefficients so that the first non-zero (homogeneous) coefficient of a lin...
static void finalize()
Finalizes the class.
void set_not_necessarily_closed()
Sets to NOT_NECESSARILY_CLOSED the topological kind of *this row.
void mark_as_necessarily_closed()
Marks the epsilon dimension as a standard dimension.
bool is_point() const
Returns true if and only if *this is a point.
int compare(const Linear_Expression &x, const Linear_Expression &y)
bool remove_space_dimensions(const Variables_Set &vars)
Removes all the specified dimensions from the generator.
static const Generator & zero_dim_closure_point()
Returns, as a closure point, the origin of the zero-dimensional space .
void mark_as_not_necessarily_closed()
Marks the last dimension as the epsilon dimension.
static Generator point(const Linear_Expression &e=Linear_Expression::zero(), Coefficient_traits::const_reference d=Coefficient_one(), Representation r=default_representation)
Returns the point at e / d.
static const Generator * zero_dim_point_p
Holds (between class initialization and finalization) a pointer to the origin of the zero-dimensional...
bool check_strong_normalized() const
Returns true if and only if the coefficients are strongly normalized.
void set_space_dimension(dimension_type space_dim)
Generator & operator=(const Generator &g)
Assignment operator.
void set_representation(Representation r)
Converts *this to the specified representation.
void set_is_ray_or_point_or_inequality()
Sets to RAY_OR_POINT_OR_INEQUALITY the kind of *this row.
void strong_normalize()
Strong normalization: ensures that different Generator objects represent different hyperplanes or hyp...
bool is_ray() const
Returns true if and only if *this is a ray.
The entire library is confined to this namespace.
void set_epsilon_coefficient(Coefficient_traits::const_reference n)
Sets the epsilon coefficient to n. The generator must be NNC.
void set_is_line()
Sets the Generator kind to LINE_OR_EQUALITY.
bool is_ray_or_point_or_inequality() const
Returns true if and only if *this row represents a ray, a point or an inequality. ...
Topology topology() const
Returns the topological kind of *this.
Coefficient_traits::const_reference epsilon_coefficient() const
Returns the epsilon coefficient. The generator must be NNC.
Coefficient_traits::const_reference coefficient(Variable v) const
Returns the coefficient of v in *this.
Sparse representation: only the nonzero coefficient are stored. If there are many nonzero coefficient...
bool operator==(const Box< ITV > &x, const Box< ITV > &y)
bool is_necessarily_closed() const
Returns true if and only if the topology of *this row is necessarily closed.
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
Coefficient_traits::const_reference divisor() const
If *this is either a point or a closure point, returns its divisor.
static const Linear_Expression & zero()
Returns the (zero-dimension space) constant 0.
void permute_space_dimensions(const std::vector< Variable > &cycle)
Permutes the space dimensions of the generator.
Coefficient_traits::const_reference Coefficient_one()
Returns a const reference to a Coefficient with value 1.
static const Representation default_representation
The representation used for new Generators.
bool is_line_or_equality() const
Returns true if and only if *this row represents a line or an equality.
bool is_line() const
Returns true if and only if *this is a line.
An adapter for Linear_Expression that maybe hides the last coefficient.
void throw_dimension_incompatible(const char *method, const char *v_name, Variable v) const
Throw a std::invalid_argument exception containing the appropriate error message. ...
Topology
Kinds of polyhedra domains.
A class implementing various scalar product functions.
A system of grid generators.
void swap_space_dimensions(Variable v1, Variable v2)
Swaps the coefficients of the variables v1 and v2 .
static dimension_type max_space_dimension()
Returns the maximum space dimension a Generator can handle.
bool is_closure_point() const
Returns true if and only if *this is a closure point.
friend class Parma_Polyhedra_Library::Topology_Adjusted_Scalar_Product_Assign
Topology topology_
The topology of *this.