24 #ifndef PPL_Grid_Generator_inlines_hh
25 #define PPL_Grid_Generator_inlines_hh 1
95 kind_(RAY_OR_POINT_OR_INEQUALITY) {
126 : expr(g.expr, space_dim + 1),
135 : expr(g.expr, space_dim + 1, r),
173 if (space_dim > old_space_dim) {
238 inline Coefficient_traits::const_reference
276 inline Coefficient_traits::const_reference
378 #endif // !defined(PPL_Grid_Generator_inlines_hh)
bool is_parameter_or_point() const
Returns true if and only if *this row represents a parameter or a point.
Grid_Generator & operator=(const Grid_Generator &g)
Assignment operator.
void swap(CO_Tree &x, CO_Tree &y)
void set_space_dimension(dimension_type n)
Sets the dimension of the vector space enclosing *this to n .
void set_is_parameter_or_point()
Sets the Grid_Generator kind to RAY_OR_POINT_OR_INEQUALITY.
size_t dimension_type
An unsigned integral type for representing space dimensions.
void set_not_necessarily_closed()
Sets to NOT_NECESSARILY_CLOSED the topological kind of *this row.
~Grid_Generator()
Destructor.
void set_necessarily_closed()
Sets to NECESSARILY_CLOSED the topological kind of *this row.
bool is_line() const
Returns true if and only if *this is a line.
Coefficient_traits::const_reference get(dimension_type i) const
Returns the i-th coefficient.
void m_swap(Grid_Generator &y)
Swaps *this with y.
Coefficient_traits::const_reference inhomogeneous_term() const
Returns the inhomogeneous term of *this.
bool is_equal_at_dimension(dimension_type dim, const Grid_Generator &gg) const
Returns true if *this is equal to gg in dimension dim.
bool is_not_necessarily_closed() const
Returns true if and only if the topology of *this row is not necessarily closed.
static const Grid_Generator & zero_dim_point()
Returns the origin of the zero-dimensional space .
void set_space_dimension_no_ok(dimension_type space_dim)
Grid_Generator grid_point(Representation r)
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
void set_coefficient(Variable v, Coefficient_traits::const_reference n)
Sets the coefficient of v in *this to n.
Grid_Generator grid_line(const Linear_Expression &e, Representation r)
void set_inhomogeneous_term(Coefficient_traits::const_reference n)
Sets the inhomogeneous term of *this to n.
expr_type expression() const
Partial read access to the (adapted) internal expression.
Grid_Generator parameter(const Linear_Expression &e, Coefficient_traits::const_reference d, Representation r)
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
Coefficient_traits::const_reference coefficient(Variable v) const
Returns the coefficient of v in *this.
Representation representation() const
Returns the current representation of *this.
A dimension of the vector space.
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
static dimension_type max_space_dimension()
Returns the maximum space dimension a Linear_Expression can handle.
void set_is_ray_or_point_or_inequality()
Sets to RAY_OR_POINT_OR_INEQUALITY the kind of *this row.
void set_space_dimension(dimension_type space_dim)
Expression_Hide_Last< Expression_Hide_Inhomo< Linear_Expression > > expr_type
The type of the (adapted) internal expression.
static dimension_type max_space_dimension()
Returns the maximum space dimension a Grid_Generator can handle.
static Grid_Generator parameter(const Linear_Expression &e=Linear_Expression::zero(), Coefficient_traits::const_reference d=Coefficient_one(), Representation r=default_representation)
Coefficient_traits::const_reference divisor() const
Returns the divisor of *this.
Topology topology() const
Returns the topological kind of *this.
void set_representation(Representation r)
Converts *this to the specified representation.
Grid_Generator grid_point(const Linear_Expression &e, Representation r)
bool is_necessarily_closed() const
Returns true if and only if the topology of *this row is necessarily closed.
void swap(Grid_Generator &x, Grid_Generator &y)
Swaps x with y.
void set_divisor(Coefficient_traits::const_reference d)
Sets the divisor of *this to d.
bool is_line_or_parameter() const
Returns true if and only if *this is a line or a parameter.
bool is_point() const
Returns true if and only if *this is a point.
Type type() const
Returns the generator type of *this.
void shift_space_dimensions(Variable v, dimension_type n)
void swap_space_dimensions(Variable v1, Variable v2)
Swaps the coefficients of the variables v1 and v2 .
static const Grid_Generator * zero_dim_point_p
Holds (between class initialization and finalization) a pointer to the origin of the zero-dimensional...
Kind
The possible kinds of Grid_Generator objects.
Grid_Generator parameter(const Linear_Expression &e, Representation r)
bool is_equivalent_to(const Grid_Generator &y) const
Returns true if and only if *this and y are equivalent generators.
void set_topology(Topology x)
Sets to x the topological kind of *this row.
void sign_normalize()
Normalizes the sign of the coefficients so that the first non-zero (homogeneous) coefficient of a lin...
void throw_dimension_incompatible(const char *method, const char *name_var, const Variable v) const
Throw a std::invalid_argument exception containing the appropriate error message. ...
bool is_line_or_equality() const
Returns true if and only if *this row represents a line or an equality.
static Grid_Generator grid_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.
The entire library is confined to this namespace.
Representation representation() const
Returns the current representation of *this.
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
static Grid_Generator grid_line(const Linear_Expression &e, Representation r=default_representation)
Returns the line of direction e.
bool is_ray_or_point_or_inequality() const
Returns true if and only if *this row represents a ray, a point or an inequality. ...
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 operator==(const Grid_Generator &x, const Grid_Generator &y)
#define PPL_USED(v)
No-op macro that allows to avoid unused variable warnings from the compiler.
void strong_normalize()
Strong normalization: ensures that different Grid_Generator objects represent different hyperplanes o...
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
void throw_invalid_argument(const char *method, const char *reason) const
Throw a std::invalid_argument exception containing the appropriate error message. ...
Coefficient_traits::const_reference coefficient(Variable v) const
Returns the coefficient of v in *this.
bool is_parameter() const
Returns true if and only if *this is a parameter.
Coefficient_traits::const_reference Coefficient_one()
Returns a const reference to a Coefficient with value 1.
void set_is_line_or_equality()
Sets to LINE_OR_EQUALITY the kind of *this row.
bool operator!=(const Grid_Generator &x, const Grid_Generator &y)
void set_is_line()
Sets the Grid_Generator kind to LINE_OR_EQUALITY.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
Grid_Generator grid_point(const Linear_Expression &e, Coefficient_traits::const_reference d, Representation r)
Grid_Generator parameter(Representation r)
Grid_Generator(Representation r=default_representation)
Returns the origin of the zero-dimensional space .
bool OK() const
Checks if all the invariants are satisfied.
An adapter for Linear_Expression that maybe hides the last coefficient.
A grid line, parameter or grid point.
Topology
Kinds of polyhedra domains.
void set_representation(Representation r)
Converts *this to the specified representation.
void shift_space_dimensions(Variable v, dimension_type n)