24 #ifndef PPL_Affine_Space_inlines_hh
25 #define PPL_Affine_Space_inlines_hh 1
37 : gr(num_dimensions, kind) {
43 : gr(y.gr, complexity) {
59 : gr(ph, complexity) {
72 : gr(bd, complexity) {
79 : gr(os, complexity) {
169 bool& maximum)
const {
170 return gr.
maximize(expr, sup_n, sup_d, maximum);
177 return gr.
maximize(expr, sup_n, sup_d, maximum, point);
183 bool& minimum)
const {
184 return gr.
minimize(expr, inf_n, inf_d, minimum);
191 return gr.
minimize(expr, inf_n, inf_d, minimum, point);
198 return gr.
frequency(expr, freq_n, freq_d, val_n, val_d);
224 #endif // !defined(PPL_Affine_Space_inlines_hh)
The empty element, i.e., the empty set.
A linear equality or inequality.
void add_constraint(const Constraint &c)
Adds to *this a congruence equivalent to constraint c.
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *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.
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.
Constraint_System minimized_constraints() const
Returns a minimal system of equality constraints satisfied by *this with the same affine dimension as...
bool bounds_from_above(const Linear_Expression &expr) const
Returns true if and only if expr is bounded in *this.
static bool can_recycle_constraint_systems()
Returns true indicating that this domain has methods that can recycle constraints.
int32_t hash_code() const
Returns a 32-bit hash code for *this.
memory_size_type total_memory_in_bytes() const
Returns the total size in bytes of the memory occupied by *this.
~Affine_Space()
Destructor.
static bool can_recycle_congruence_systems()
Returns true indicating that this domain has methods that can recycle congruences.
void add_congruences(const Congruence_System &cgs)
Adds a copy of each congruence in cgs to *this.
bool strictly_contains(const Grid &y) const
Returns true if and only if *this strictly contains y.
void refine_with_congruence(const Congruence &cg)
Uses a copy of the congruence cg to refine *this.
Complexity_Class
Complexity pseudo-classes.
The base class for convex polyhedra.
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.
bool operator!=(const Affine_Space &x, const Affine_Space &y)
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.
static bool can_recycle_congruence_systems()
Returns true indicating that this domain has methods that can recycle congruences.
Grid gr
The rational grid implementing *this.
void refine_with_congruences(const Congruence_System &cgs)
Uses a copy of the congruences in cgs to refine *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.
PPL_COEFFICIENT_TYPE Coefficient
An alias for easily naming the type of PPL coefficients.
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.
void refine_with_congruence(const Congruence &cg)
Uses a copy of the congruence cg to refine *this.
int32_t hash_code() const
Returns a 32-bit hash code for *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.
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...
Constraint_System constraints() const
Returns a system of equality constraints satisfied by *this with the same affine dimension as *this...
The entire library is confined to this namespace.
static dimension_type max_space_dimension()
Returns the maximum space dimension all kinds of Affine_Space can handle.
A bounded difference shape.
void add_congruence(const Congruence &cg)
Adds a copy of congruence cg to *this.
Constraint_System minimized_constraints() const
Returns a minimal system of equality constraints satisfied by *this with the same affine dimension as...
void swap(Affine_Space &x, Affine_Space &y)
Swaps x with y.
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 frequency for *this with respect to expr is define...
void add_constraint(const Constraint &c)
Adds to *this a congruence equivalent to constraint c.
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.
void add_recycled_constraints(Constraint_System &cs)
Adds to *this congruences equivalent to the constraints in cs.
static dimension_type max_space_dimension()
Returns the maximum space dimension all kinds of Grid can handle.
bool bounds_from_below(const Linear_Expression &expr) const
Returns true if and only if expr is bounded in *this.
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
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.
void add_congruences(const Congruence_System &cgs)
Adds a copy of each congruence in cgs to *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.
static bool can_recycle_constraint_systems()
Returns true indicating that this domain has methods that can recycle constraints.