24 #ifndef PPL_Partially_Reduced_Product_defs_hh
25 #define PPL_Partially_Reduced_Product_defs_hh 1
52 namespace IO_Operators {
59 template <
typename D1,
typename D2,
typename R>
61 operator<<(std::ostream& s, const Partially_Reduced_Product<D1, D2, R>& dp);
67 template <
typename D1,
typename D2,
typename R>
68 void swap(Partially_Reduced_Product<D1, D2, R>& x,
69 Partially_Reduced_Product<D1, D2, R>& y);
79 template <
typename D1,
typename D2,
typename R>
80 bool operator==(
const Partially_Reduced_Product<D1, D2, R>& x,
81 const Partially_Reduced_Product<D1, D2, R>& y);
91 template <
typename D1,
typename D2,
typename R>
92 bool operator!=(
const Partially_Reduced_Product<D1, D2, R>& x,
93 const Partially_Reduced_Product<D1, D2, R>& y);
106 template <
typename D1,
typename D2>
140 template <
typename D1,
typename D2>
198 template <
typename D1,
typename D2>
248 template <
typename D1,
typename D2>
288 template <
typename D1,
typename D2>
417 template <
typename D1,
typename D2,
typename R>
572 template <
typename Interval>
591 template <
typename U>
610 template <
typename U>
622 template <
typename E1,
typename E2,
typename S>
1118 Coefficient_traits::const_reference denominator
1143 Coefficient_traits::const_reference denominator
1176 Coefficient_traits::const_reference denominator
1210 Coefficient_traits::const_reference denominator
1292 Coefficient_traits::const_reference denominator
1324 Coefficient_traits::const_reference denominator
1365 unsigned* tp = NULL);
1513 template <
typename Partial_Function>
1572 friend std::ostream&
1573 Parma_Polyhedra_Library::IO_Operators::
1652 const char* reason);
1665 template <
typename D1,
typename D2>
1689 #endif // !defined(PPL_Partially_Reduced_Product_defs_hh)
dimension_type affine_dimension() const
Returns the minimum affine dimension (see also grid affine dimension) of the components of *this...
void expand_space_dimension(Variable var, dimension_type m)
Creates m copies of the space dimension corresponding to var.
void upper_bound_assign(const Partially_Reduced_Product &y)
Assigns to *this an upper bound of *this and y computed on the corresponding components.
Partially_Reduced_Product< D1, D2, Congruences_Reduction< D1, D2 > > Congruences_Product
Constraints_Reduction()
Default constructor.
bool is_disjoint_from(const Partially_Reduced_Product &y) const
Returns true if and only if *this and y are componentwise disjoint.
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
The partially reduced product of two abstractions.
Congruence_System congruences() const
Returns a system of congruences which approximates *this.
memory_size_type total_memory_in_bytes() const
Returns the total size in bytes of the memory occupied by *this.
void refine_with_constraint(const Constraint &c)
Use the constraint c to refine *this.
A linear equality or inequality.
void topological_closure_assign()
Assigns to *this its topological closure.
void swap(CO_Tree &x, CO_Tree &y)
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
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.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
An std::set of variables' indexes.
A line, ray, point or closure point.
void product_reduce(D1 &d1, D2 &d2)
The congruences reduction operator for detect emptiness or any equalities implied by each of the cong...
This class is temporary and will be removed when template typedefs will be supported in C++...
~No_Reduction()
Destructor.
Poly_Con_Relation relation_with(const Constraint &c) const
Returns the relations holding between *this and c.
void product_reduce(D1 &d1, D2 &d2)
The constraints reduction operator for sharing constraints between the domains.
void clear_reduced_flag() const
Clears the reduced flag.
void refine_with_congruence(const Congruence &cg)
Use the congruence cg to refine *this.
void drop_some_non_integer_points(Complexity_Class complexity=ANY_COMPLEXITY)
Possibly tightens *this by dropping some points with non-integer coordinates.
void product_reduce(D1 &d1, D2 &d2)
The null reduction operator.
bool bounds_from_below(const Linear_Expression &expr) const
Returns true if and only if expr is bounded in *this.
Partially_Reduced_Product< D1, D2, Constraints_Reduction< D1, D2 > > Constraints_Product
Partially_Reduced_Product< D1, D2, No_Reduction< D1, D2 > > Direct_Product
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 i *this, in which case the infimum value is computed.
bool is_reduced() const
Return true if and only if the reduced flag is set.
void refine_with_congruences(const Congruence_System &cgs)
Use the congruences in cgs to refine *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 ...
Congruence_System minimized_congruences() const
Returns a system of congruences which approximates *this, in reduced form.
void unconstrain(Variable var)
Computes the cylindrification of *this with respect to space dimension var, assigning the result to *...
This class provides the reduction method for the Constraints_Product domain.
void add_congruences(const Congruence_System &cgs)
Adds a copy of the congruences in cgs to *this.
void time_elapse_assign(const Partially_Reduced_Product &y)
Assigns to *this the result of computing the time-elapse between *this and y. (See also time-elapse...
bool is_discrete() const
Returns true if and only if a component of *this is discrete.
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 . ...
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 ...
Partially_Reduced_Product & operator=(const Partially_Reduced_Product &y)
The assignment operator. (*this and y can be dimension-incompatible.)
This class provides the reduction method for the Congruences_Product domain.
void remove_space_dimensions(const Variables_Set &vars)
Removes all the specified dimensions from the vector space.
Partially_Reduced_Product< D1, D2, Smash_Reduction< D1, D2 > > Smash_Product
void add_constraint(const Constraint &c)
Adds constraint c to *this.
void refine_with_constraints(const Constraint_System &cs)
Use the constraints in cs to refine *this.
Constraint_System minimized_constraints() const
Returns a system of constraints which approximates *this, in reduced form.
A dimension of the vector space.
bool is_bounded() const
Returns true if and only if a component of *this is bounded.
void add_recycled_constraints(Constraint_System &cs)
Adds the constraint system in cs to *this.
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...
Complexity_Class
Complexity pseudo-classes.
bool constrains(Variable var) const
Returns true if and only if var is constrained in *this.
D2 d2
The second component.
#define PPL_OUTPUT_DECLARATIONS
void product_reduce(D1 &d1, D2 &d2)
The congruences reduction operator for detect emptiness or any equalities implied by each of the cong...
Smash_Reduction()
Default constructor.
void add_space_dimensions_and_embed(dimension_type m)
Adds m new space dimensions and embeds the components of *this in the new vector space.
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 ...
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.
void add_constraints(const Constraint_System &cs)
Adds a copy of the constraint system in cs to *this.
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 expre...
Partially_Reduced_Product(dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE)
Builds an object having the specified properties.
Shape_Preserving_Reduction()
Default constructor.
int32_t hash_code() const
Returns a 32-bit hash code for *this.
bool upper_bound_assign_if_exact(const Partially_Reduced_Product &y)
Assigns to *this an upper bound of *this and y computed on the corresponding components. If it is exact on each of the components of *this, true is returned, otherwise false is returned.
void add_space_dimensions_and_project(dimension_type m)
Adds m new space dimensions and does not embed the components in the new vector space.
A not necessarily closed convex polyhedron.
bool contains(const Partially_Reduced_Product &y) const
Returns true if and only if each component of *this contains the corresponding component of y...
~Smash_Reduction()
Destructor.
A not necessarily closed, iso-oriented hyperrectangle.
A closed convex polyhedron.
PPL_COEFFICIENT_TYPE Coefficient
An alias for easily naming the type of PPL coefficients.
~Partially_Reduced_Product()
Destructor.
void difference_assign(const Partially_Reduced_Product &y)
Assigns to *this an approximation of the set-theoretic difference of *this and y. ...
~Congruences_Reduction()
Destructor.
Congruences_Reduction()
Default constructor.
No_Reduction()
Default constructor.
void concatenate_assign(const Partially_Reduced_Product &y)
Assigns to the first (resp., second) component of *this the "concatenation" of the first (resp...
bool OK() const
Checks if all the invariants are satisfied.
The universe element, i.e., the whole vector space.
~Shape_Preserving_Reduction()
Destructor.
void fold_space_dimensions(const Variables_Set &vars, Variable dest)
Folds the space dimensions in vars into dest.
bool bounds_from_above(const Linear_Expression &expr) const
Returns true if and only if expr is bounded in *this.
The entire library is confined to this namespace.
const D2 & domain2() const
Returns a constant reference to the second of the pair.
~Constraints_Reduction()
Destructor.
Constraint_System constraints() const
Returns a system of constraints which approximates *this.
void add_recycled_congruences(Congruence_System &cgs)
Adds the congruences in cgs to *this.
D1 d1
The first component.
D2 Domain2
The type of the second component.
A bounded difference shape.
void add_congruence(const Congruence &cg)
Adds a copy of congruence cg to *this.
bool is_universe() const
Returns true if and only if both of the components of *this are the universe.
bool is_empty() const
Returns true if and only if either of the components of *this are empty.
bool reduce() const
Reduce.
void m_swap(Partially_Reduced_Product &y)
Swaps *this with product y. (*this and y can be dimension-incompatible.)
void map_space_dimensions(const Partial_Function &pfunc)
Remaps the dimensions of the vector space according to a partial function.
bool operator==(const Box< ITV > &x, const Box< ITV > &y)
void set_reduced_flag() const
Sets the reduced flag.
Partially_Reduced_Product< D1, D2, Shape_Preserving_Reduction< D1, D2 > > Shape_Preserving_Product
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
void product_reduce(D1 &d1, D2 &d2)
The smash reduction operator for propagating emptiness between the domain elements d1 and d2...
bool reduced
Flag to record whether the components are reduced with respect to each other and the reduction class...
static dimension_type max_space_dimension()
Returns the maximum space dimension this product can handle.
D1 Domain1
The type of the first component.
This class provides the reduction method for the Smash_Product domain.
This class provides the reduction method for the Shape_Preserving_Product domain. ...
void widening_assign(const Partially_Reduced_Product &y, unsigned *tp=NULL)
Assigns to *this the result of computing the "widening" between *this and y.
Coefficient_traits::const_reference Coefficient_one()
Returns a const reference to a Coefficient with value 1.
This class provides the reduction method for the Direct_Product domain.
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...
bool is_topologically_closed() const
Returns true if and only if both of the components of *this are topologically closed subsets of the v...
void intersection_assign(const Partially_Reduced_Product &y)
Assigns to *this the componentwise intersection of *this and y.
bool strictly_contains(const Partially_Reduced_Product &y) const
Returns true if and only if each component of *this strictly contains the corresponding component of ...
The relation between a polyhedron and a generator.
const D1 & domain1() const
Returns a constant reference to the first of the pair.
The relation between a polyhedron and a constraint.
void throw_space_dimension_overflow(const char *method, const char *reason)