24 #ifndef PPL_Affine_Space_defs_hh
25 #define PPL_Affine_Space_defs_hh 1
47 namespace IO_Operators {
484 template <
typename Interval>
505 template <
typename U>
526 template <
typename U>
892 bool OK(
bool check_not_empty =
false)
const;
1193 Coefficient_traits::const_reference denominator
1218 Coefficient_traits::const_reference denominator
1250 Coefficient_traits::const_reference denominator
1282 Coefficient_traits::const_reference denominator
1362 Coefficient_traits::const_reference denominator
1394 Coefficient_traits::const_reference denominator
1440 unsigned* tp = NULL);
1581 template <
typename Partial_Function>
1679 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
1682 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
1685 void throw_invalid_argument(
const char* method,
const char* reason)
const;
1688 const char* other_name,
1691 const char* as_name,
1697 const char* reason);
1700 const char* c_name)
const;
1702 const char* cs_name)
const;
1704 const char* g_name)
const;
1706 const char* gs_name)
const;
1707 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
1709 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
1715 #endif // !defined(PPL_Affine_Space_defs_hh)
Coefficient coefficient_type
The numeric type of coefficients.
void unconstrain(Variable var)
Computes the cylindrification of *this with respect to space dimension var, assigning the result to *...
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
void add_constraints(const Constraint_System &cs)
Adds to *this congruences equivalent to the constraints in cs.
void add_recycled_generators(Generator_System &gs)
Adds the generators in gs to the system of generators of this.
void generalized_affine_preimage(Variable var, Relation_Symbol relsym, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the preimage of *this with respect to the generalized affine relation ...
A linear equality or inequality.
void swap(CO_Tree &x, CO_Tree &y)
void add_constraint(const Constraint &c)
Adds to *this a congruence equivalent to constraint c.
bool OK(bool check_not_empty=false) const
Checks if all the invariants are satisfied.
Generator_System minimized_generators() const
Returns a minimized system of generators defining *this.
bool upper_bound_assign_if_exact(const Affine_Space &y)
If the upper bound of *this and y is exact it is assigned to this and true is returned, otherwise false is returned.
void refine_with_constraint(const Constraint &c)
Uses a copy of the constraint c to refine *this.
size_t dimension_type
An unsigned integral type for representing space dimensions.
void refine_with_congruences(const Congruence_System &cgs)
Uses a copy of the congruences in cgs to refine *this.
void add_recycled_congruences(Congruence_System &cgs)
Adds the congruences in cgs to *this.
An std::set of variables' indexes.
A line, ray, point or closure point.
memory_size_type total_memory_in_bytes() const
Returns the total size in bytes of the memory occupied by *this.
bool is_discrete() const
Returns true if and only if *this is discrete.
std::ostream & operator<<(std::ostream &s, const Ask_Tell< D > &x)
bool contains(const Affine_Space &y) const
Returns true if and only if *this contains y.
~Affine_Space()
Destructor.
bool is_topologically_closed() const
Returns true if and only if *this is a topologically closed subset of the vector space.
static bool can_recycle_congruence_systems()
Returns true indicating that this domain has methods that can recycle congruences.
bool is_universe() const
Returns true if and only if *this is a universe affine space.
bool is_bounded() const
Returns true if and only if *this is bounded.
void throw_invalid_constraint(const char *method, const char *c_name) const
Poly_Con_Relation relation_with(const Congruence &cg) const
Returns the relations holding between *this and cg.
const Congruence_System & minimized_congruences() const
Returns the system of equality congruences satisfied by *this, with no redundant congruences and havi...
void affine_preimage(Variable var, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the affine preimage of *this under the function mapping variable var to the affine e...
void difference_assign(const Affine_Space &y)
Assigns to *this the poly-difference of *this and y.
A dimension of the vector space.
void concatenate_assign(const Affine_Space &y)
Assigns to *this the concatenation of *this and y, taken in this order.
Complexity_Class
Complexity pseudo-classes.
The base class for convex polyhedra.
void throw_dimension_incompatible(const char *method, const char *other_name, dimension_type other_dim) const
bool strictly_contains(const Affine_Space &y) const
Returns true if and only if *this strictly contains y.
bool bounds_from_below(const Linear_Expression &expr) const
Returns true if and only if expr is bounded in *this.
void throw_invalid_generator(const char *method, const char *g_name) const
#define PPL_OUTPUT_DECLARATIONS
void intersection_assign(const Affine_Space &y)
Assigns to *this the intersection of *this and y.
friend bool operator==(const Affine_Space &x, const Affine_Space &y)
Relation_Symbol
Relation symbols.
Degenerate_Element
Kinds of degenerate abstract elements.
bool maximize(const Linear_Expression &expr, Coefficient &sup_n, Coefficient &sup_d, bool &maximum) const
Returns true if and only if *this is not empty and expr is bounded from above in *this, in which case the supremum value is computed.
bool is_empty() const
Returns true if and only if *this is an empty affine space.
void fold_space_dimensions(const Variables_Set &to_be_folded, Variable var)
Folds the space dimensions in to_be_folded into var.
void map_space_dimensions(const Partial_Function &pfunc)
Remaps the dimensions of the vector space according to a partial function.
bool contains_integer_point() const
Returns true if and only if *this contains at least one integer point.
Grid gr
The rational grid implementing *this.
void topological_closure_assign()
Assigns to *this its topological closure.
bool bounds_from_above(const Linear_Expression &expr) const
Returns true if and only if expr is bounded in *this.
A not necessarily closed, iso-oriented hyperrectangle.
void bounded_affine_preimage(Variable var, const Linear_Expression &lb_expr, const Linear_Expression &ub_expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the preimage of *this with respect to the bounded affine relation ...
PPL_COEFFICIENT_TYPE Coefficient
An alias for easily naming the type of PPL coefficients.
void add_space_dimensions_and_embed(dimension_type m)
Adds m new space dimensions and embeds the old affine space in the new vector space.
bool simplify_using_context_assign(const Affine_Space &y)
Assigns to *this a meet-preserving simplification of *this with respect to y. If false is returned...
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
void upper_bound_assign(const Affine_Space &y)
Assigns to *this the least upper bound of *this and y.
void refine_with_congruence(const Congruence &cg)
Uses a copy of the congruence cg to refine *this.
void generalized_affine_image(Variable var, Relation_Symbol relsym, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the image of *this with respect to the generalized affine relation ...
int32_t hash_code() const
Returns a 32-bit hash code for *this.
dimension_type affine_dimension() const
Returns , if *this is empty; otherwise, returns affine dimension of *this.
Affine_Space(dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE)
Builds an affine space having the specified properties.
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
The universe element, i.e., the whole vector space.
void limited_extrapolation_assign(const Affine_Space &y, const Constraint_System &cs, unsigned *tp=NULL)
Does nothing, as the domain of affine spaces has finite height.
void throw_invalid_constraints(const char *method, const char *cs_name) const
void m_swap(Affine_Space &y)
Swaps *this with affine space y. (*this and y can be dimension-incompatible.)
bool frequency(const Linear_Expression &expr, Coefficient &freq_n, Coefficient &freq_d, Coefficient &val_n, Coefficient &val_d) const
Returns true if and only if *this is not empty and expr is discrete in *this, in which case the maxim...
The entire library is confined to this namespace.
bool is_disjoint_from(const Affine_Space &y) const
Returns true if and only if *this and y are disjoint.
Affine_Space & operator=(const Affine_Space &y)
The assignment operator. (*this and y can be dimension-incompatible.)
static dimension_type max_space_dimension()
Returns the maximum space dimension all kinds of Affine_Space can handle.
bool constrains(Variable var) const
Returns true if and only if var is constrained in *this.
void widening_assign(const Affine_Space &y, unsigned *tp=NULL)
Does nothing, as the domain of affine spaces has finite height.
void bounded_affine_image(Variable var, const Linear_Expression &lb_expr, const Linear_Expression &ub_expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the image of *this with respect to the bounded affine relation . ...
A bounded difference shape.
void time_elapse_assign(const Affine_Space &y)
Assigns to *this the result of computing the time-elapse between *this and y.
Constraint_System minimized_constraints() const
Returns a minimal system of equality constraints satisfied by *this with the same affine dimension as...
void remove_higher_space_dimensions(dimension_type new_dimension)
Removes the higher dimensions of the vector space so that the resulting space will have dimension new...
void add_generator(const Generator &g)
Adds a copy of affine space generator g to the system of generators of *this.
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
static void throw_space_dimension_overflow(const char *method, const char *reason)
void remove_space_dimensions(const Variables_Set &vars)
Removes all the specified dimensions from the vector space.
bool operator==(const Box< ITV > &x, const Box< ITV > &y)
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
void affine_image(Variable var, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the affine image of *this under the function mapping variable var to the affine expr...
void refine_with_constraints(const Constraint_System &cs)
Uses a copy of the constraints in cs to refine *this.
void expand_space_dimension(Variable var, dimension_type m)
Creates m copies of the space dimension corresponding to var.
void add_space_dimensions_and_project(dimension_type m)
Adds m new space dimensions to the affine space and does not embed it in the new vector space...
void add_generators(const Generator_System &gs)
Adds a copy of the generators in gs to the system of generators of *this.
void add_congruence(const Congruence &cg)
Adds a copy of congruence cg to *this.
bool minimize(const Linear_Expression &expr, Coefficient &inf_n, Coefficient &inf_d, bool &minimum) const
Returns true if and only if *this is not empty and expr is bounded from below in *this, in which case the infimum value is computed.
Coefficient_traits::const_reference Coefficient_one()
Returns a const reference to a Coefficient with value 1.
void add_congruences(const Congruence_System &cgs)
Adds a copy of each congruence in cgs to *this.
Generator_System generators() const
Returns a system of generators defining *this.
Constraint_System constraints() const
Returns a system of equality constraints satisfied by *this with the same affine dimension as *this...
void add_recycled_constraints(Constraint_System &cs)
Adds to *this congruences equivalent to the constraints in cs.
void throw_invalid_generators(const char *method, const char *gs_name) const
const Congruence_System & congruences() const
Returns the system of equality congruences satisfied by *this.
The relation between a polyhedron and a generator.
static bool can_recycle_constraint_systems()
Returns true indicating that this domain has methods that can recycle constraints.
The relation between a polyhedron and a constraint.