| PPL
    1.1
    | 
An octagonal shape. More...
#include <ppl.hh>
| Public Types | |
| typedef T | coefficient_type_base | 
| The numeric base type upon which OSs are built. | |
| typedef N | coefficient_type | 
| The (extended) numeric type of the inhomogeneous term of the inequalities defining an OS. | |
| Public Member Functions | |
| void | ascii_dump () const | 
| Writes to std::cerran ASCII representation of*this. | |
| void | ascii_dump (std::ostream &s) const | 
| Writes to san ASCII representation of*this. | |
| void | print () const | 
| Prints *thistostd::cerrusingoperator<<. | |
| bool | ascii_load (std::istream &s) | 
| Loads from san ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets*thisaccordingly. Returnstrueif successful,falseotherwise. | |
| memory_size_type | total_memory_in_bytes () const | 
| Returns the total size in bytes of the memory occupied by *this. | |
| memory_size_type | external_memory_in_bytes () const | 
| Returns the size in bytes of the memory managed by *this. | |
| int32_t | hash_code () const | 
| Returns a 32-bit hash code for *this.  More... | |
| Constructors, Assignment, Swap and Destructor | |
| Octagonal_Shape (dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE) | |
| Builds an universe or empty OS of the specified space dimension.  More... | |
| Octagonal_Shape (const Octagonal_Shape &y, Complexity_Class complexity=ANY_COMPLEXITY) | |
| Ordinary copy constructor.  More... | |
| template<typename U > | |
| Octagonal_Shape (const Octagonal_Shape< U > &y, Complexity_Class complexity=ANY_COMPLEXITY) | |
| Builds a conservative, upward approximation of y.  More... | |
| Octagonal_Shape (const Constraint_System &cs) | |
| Builds an OS from the system of constraints cs.  More... | |
| Octagonal_Shape (const Congruence_System &cgs) | |
| Builds an OS from a system of congruences.  More... | |
| Octagonal_Shape (const Generator_System &gs) | |
| Builds an OS from the system of generators gs.  More... | |
| Octagonal_Shape (const Polyhedron &ph, Complexity_Class complexity=ANY_COMPLEXITY) | |
| Builds an OS from the polyhedron ph.  More... | |
| template<typename Interval > | |
| Octagonal_Shape (const Box< Interval > &box, Complexity_Class complexity=ANY_COMPLEXITY) | |
| Builds an OS out of a box.  More... | |
| Octagonal_Shape (const Grid &grid, Complexity_Class complexity=ANY_COMPLEXITY) | |
| Builds an OS that approximates a grid.  More... | |
| template<typename U > | |
| Octagonal_Shape (const BD_Shape< U > &bd, Complexity_Class complexity=ANY_COMPLEXITY) | |
| Builds an OS from a BD shape.  More... | |
| Octagonal_Shape & | operator= (const Octagonal_Shape &y) | 
| The assignment operator. ( *thisandycan be dimension-incompatible.) | |
| void | m_swap (Octagonal_Shape &y) | 
| Swaps *thiswith octagony. (*thisandycan be dimension-incompatible.) | |
| ~Octagonal_Shape () | |
| Destructor. | |
| Member Functions that Do Not Modify the Octagonal_Shape | |
| dimension_type | space_dimension () const | 
| Returns the dimension of the vector space enclosing *this. | |
| dimension_type | affine_dimension () const | 
| Returns  , if *thisis empty; otherwise, returns the affine dimension of*this. | |
| Constraint_System | constraints () const | 
| Returns the system of constraints defining *this. | |
| Constraint_System | minimized_constraints () const | 
| Returns a minimized system of constraints defining *this. | |
| Congruence_System | congruences () const | 
| Returns a system of (equality) congruences satisfied by *this. | |
| Congruence_System | minimized_congruences () const | 
| Returns a minimal system of (equality) congruences satisfied by *thiswith the same affine dimension as*this. | |
| bool | contains (const Octagonal_Shape &y) const | 
| Returns trueif and only if*thiscontainsy.  More... | |
| bool | strictly_contains (const Octagonal_Shape &y) const | 
| Returns trueif and only if*thisstrictly containsy.  More... | |
| bool | is_disjoint_from (const Octagonal_Shape &y) const | 
| Returns trueif and only if*thisandyare disjoint.  More... | |
| Poly_Con_Relation | relation_with (const Constraint &c) const | 
| Returns the relations holding between *thisand the constraintc.  More... | |
| Poly_Con_Relation | relation_with (const Congruence &cg) const | 
| Returns the relations holding between *thisand the congruencecg.  More... | |
| Poly_Gen_Relation | relation_with (const Generator &g) const | 
| Returns the relations holding between *thisand the generatorg.  More... | |
| bool | is_empty () const | 
| Returns trueif and only if*thisis an empty OS. | |
| bool | is_universe () const | 
| Returns trueif and only if*thisis a universe OS. | |
| bool | is_discrete () const | 
| Returns trueif and only if*thisis discrete. | |
| bool | is_bounded () const | 
| Returns trueif and only if*thisis a bounded OS. | |
| bool | is_topologically_closed () const | 
| Returns trueif and only if*thisis a topologically closed subset of the vector space. | |
| bool | contains_integer_point () const | 
| Returns trueif and only if*thiscontains (at least) an integer point. | |
| bool | constrains (Variable var) const | 
| Returns trueif and only ifvaris constrained in*this.  More... | |
| bool | bounds_from_above (const Linear_Expression &expr) const | 
| Returns trueif and only ifexpris bounded from above in*this.  More... | |
| bool | bounds_from_below (const Linear_Expression &expr) const | 
| Returns trueif and only ifexpris bounded from below in*this.  More... | |
| bool | maximize (const Linear_Expression &expr, Coefficient &sup_n, Coefficient &sup_d, bool &maximum) const | 
| Returns trueif and only if*thisis not empty andexpris bounded from above in*this, in which case the supremum value is computed.  More... | |
| bool | maximize (const Linear_Expression &expr, Coefficient &sup_n, Coefficient &sup_d, bool &maximum, Generator &g) const | 
| Returns trueif and only if*thisis not empty andexpris bounded from above in*this, in which case the supremum value and a point whereexprreaches it are computed.  More... | |
| bool | minimize (const Linear_Expression &expr, Coefficient &inf_n, Coefficient &inf_d, bool &minimum) const | 
| Returns trueif and only if*thisis not empty andexpris bounded from below in*this, in which case the infimum value is computed.  More... | |
| bool | minimize (const Linear_Expression &expr, Coefficient &inf_n, Coefficient &inf_d, bool &minimum, Generator &g) const | 
| Returns trueif and only if*thisis not empty andexpris bounded from below in*this, in which case the infimum value and a point whereexprreaches it are computed.  More... | |
| bool | frequency (const Linear_Expression &expr, Coefficient &freq_n, Coefficient &freq_d, Coefficient &val_n, Coefficient &val_d) const | 
| Returns trueif and only if there exist a unique valuevalsuch that*thissaturates the equalityexpr = val.  More... | |
| bool | OK () const | 
| Checks if all the invariants are satisfied. | |
| Space-Dimension Preserving Member Functions that May Modify the Octagonal_Shape | |
| void | add_constraint (const Constraint &c) | 
| Adds a copy of constraint cto the system of constraints defining*this.  More... | |
| void | add_constraints (const Constraint_System &cs) | 
| Adds the constraints in csto the system of constraints defining*this.  More... | |
| void | add_recycled_constraints (Constraint_System &cs) | 
| Adds the constraints in csto the system of constraints of*this.  More... | |
| void | add_congruence (const Congruence &cg) | 
| Adds to *thisa constraint equivalent to the congruencecg.  More... | |
| void | add_congruences (const Congruence_System &cgs) | 
| Adds to *thisconstraints equivalent to the congruences incgs.  More... | |
| void | add_recycled_congruences (Congruence_System &cgs) | 
| Adds to *thisconstraints equivalent to the congruences incgs.  More... | |
| void | refine_with_constraint (const Constraint &c) | 
| Uses a copy of constraint cto refine the system of octagonal constraints defining*this.  More... | |
| void | refine_with_congruence (const Congruence &cg) | 
| Uses a copy of congruence cgto refine the system of octagonal constraints of*this.  More... | |
| void | refine_with_constraints (const Constraint_System &cs) | 
| Uses a copy of the constraints in csto refine the system of octagonal constraints defining*this.  More... | |
| void | refine_with_congruences (const Congruence_System &cgs) | 
| Uses a copy of the congruences in cgsto refine the system of octagonal constraints defining*this.  More... | |
| template<typename Interval_Info > | |
| void | refine_with_linear_form_inequality (const Linear_Form< Interval< T, Interval_Info > > &left, const Linear_Form< Interval< T, Interval_Info > > &right) | 
| Refines the system of octagonal constraints defining *thisusing the constraint expressed byleft  right.  More... | |
| template<typename Interval_Info > | |
| void | generalized_refine_with_linear_form_inequality (const Linear_Form< Interval< T, Interval_Info > > &left, const Linear_Form< Interval< T, Interval_Info > > &right, Relation_Symbol relsym) | 
| Refines the system of octagonal constraints defining *thisusing the constraint expressed byleft  right, where is the relation symbol specified by relsym.  More... | |
| void | unconstrain (Variable var) | 
| Computes the cylindrification of *thiswith respect to space dimensionvar, assigning the result to*this.  More... | |
| void | unconstrain (const Variables_Set &vars) | 
| Computes the cylindrification of *thiswith respect to the set of space dimensionsvars, assigning the result to*this.  More... | |
| void | intersection_assign (const Octagonal_Shape &y) | 
| Assigns to *thisthe intersection of*thisandy.  More... | |
| void | upper_bound_assign (const Octagonal_Shape &y) | 
| Assigns to *thisthe smallest OS that contains the convex union of*thisandy.  More... | |
| bool | upper_bound_assign_if_exact (const Octagonal_Shape &y) | 
| If the upper bound of *thisandyis exact, it is assigned to*thisandtrueis returned, otherwisefalseis returned.  More... | |
| bool | integer_upper_bound_assign_if_exact (const Octagonal_Shape &y) | 
| If the integer upper bound of *thisandyis exact, it is assigned to*thisandtrueis returned; otherwisefalseis returned.  More... | |
| void | difference_assign (const Octagonal_Shape &y) | 
| Assigns to *thisthe smallest octagon containing the set difference of*thisandy.  More... | |
| bool | simplify_using_context_assign (const Octagonal_Shape &y) | 
| Assigns to *thisa meet-preserving simplification of*thiswith respect toy. Iffalseis returned, then the intersection is empty.  More... | |
| void | affine_image (Variable var, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one()) | 
| Assigns to *thisthe affine image of*thisunder the function mapping variablevarinto the affine expression specified byexpranddenominator.  More... | |
| template<typename Interval_Info > | |
| void | affine_form_image (Variable var, const Linear_Form< Interval< T, Interval_Info > > &lf) | 
| Assigns to *thisthe affine form image of*thisunder the function mapping variablevarinto the affine expression(s) specified bylf.  More... | |
| void | affine_preimage (Variable var, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one()) | 
| Assigns to *thisthe affine preimage of*thisunder the function mapping variablevarinto the affine expression specified byexpranddenominator.  More... | |
| void | generalized_affine_image (Variable var, Relation_Symbol relsym, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one()) | 
| Assigns to *thisthe image of*thiswith respect to the generalized affine transfer function , where  is the relation symbol encoded by relsym.  More... | |
| void | generalized_affine_image (const Linear_Expression &lhs, Relation_Symbol relsym, const Linear_Expression &rhs) | 
| Assigns to *thisthe image of*thiswith respect to the generalized affine transfer function , where  is the relation symbol encoded by relsym.  More... | |
| 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 *thisthe image of*thiswith respect to the bounded affine relation .  More... | |
| void | generalized_affine_preimage (Variable var, Relation_Symbol relsym, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one()) | 
| Assigns to *thisthe preimage of*thiswith respect to the affine relation , where  is the relation symbol encoded by relsym.  More... | |
| void | generalized_affine_preimage (const Linear_Expression &lhs, Relation_Symbol relsym, const Linear_Expression &rhs) | 
| Assigns to *thisthe preimage of*thiswith respect to the generalized affine relation , where  is the relation symbol encoded by relsym.  More... | |
| 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 *thisthe preimage of*thiswith respect to the bounded affine relation .  More... | |
| void | time_elapse_assign (const Octagonal_Shape &y) | 
| Assigns to *thisthe result of computing the time-elapse between*thisandy.  More... | |
| void | wrap_assign (const Variables_Set &vars, Bounded_Integer_Type_Width w, Bounded_Integer_Type_Representation r, Bounded_Integer_Type_Overflow o, const Constraint_System *cs_p=0, unsigned complexity_threshold=16, bool wrap_individually=true) | 
| Wraps the specified dimensions of the vector space.  More... | |
| void | drop_some_non_integer_points (Complexity_Class complexity=ANY_COMPLEXITY) | 
| Possibly tightens *thisby dropping some points with non-integer coordinates.  More... | |
| void | drop_some_non_integer_points (const Variables_Set &vars, Complexity_Class complexity=ANY_COMPLEXITY) | 
| Possibly tightens *thisby dropping some points with non-integer coordinates for the space dimensions corresponding tovars.  More... | |
| void | topological_closure_assign () | 
| Assigns to *thisits topological closure. | |
| void | CC76_extrapolation_assign (const Octagonal_Shape &y, unsigned *tp=0) | 
| Assigns to *thisthe result of computing the CC76-extrapolation between*thisandy.  More... | |
| template<typename Iterator > | |
| void | CC76_extrapolation_assign (const Octagonal_Shape &y, Iterator first, Iterator last, unsigned *tp=0) | 
| Assigns to *thisthe result of computing the CC76-extrapolation between*thisandy.  More... | |
| void | BHMZ05_widening_assign (const Octagonal_Shape &y, unsigned *tp=0) | 
| Assigns to *thisthe result of computing the BHMZ05-widening between*thisandy.  More... | |
| void | widening_assign (const Octagonal_Shape &y, unsigned *tp=0) | 
| Same as BHMZ05_widening_assign(y, tp). | |
| void | limited_BHMZ05_extrapolation_assign (const Octagonal_Shape &y, const Constraint_System &cs, unsigned *tp=0) | 
| Improves the result of the BHMZ05-widening computation by also enforcing those constraints in csthat are satisfied by all the points of*this.  More... | |
| void | CC76_narrowing_assign (const Octagonal_Shape &y) | 
| Restores from ythe constraints of*this, lost by CC76-extrapolation applications.  More... | |
| void | limited_CC76_extrapolation_assign (const Octagonal_Shape &y, const Constraint_System &cs, unsigned *tp=0) | 
| Improves the result of the CC76-extrapolation computation by also enforcing those constraints in csthat are satisfied by all the points of*this.  More... | |
| Member Functions that May Modify the Dimension of the Vector Space | |
| void | add_space_dimensions_and_embed (dimension_type m) | 
| Adds mnew dimensions and embeds the old OS into the new space.  More... | |
| void | add_space_dimensions_and_project (dimension_type m) | 
| Adds mnew dimensions to the OS and does not embed it in the new space.  More... | |
| void | concatenate_assign (const Octagonal_Shape &y) | 
| Assigns to *thisthe concatenation of*thisandy, taken in this order.  More... | |
| void | remove_space_dimensions (const Variables_Set &vars) | 
| Removes all the specified dimensions.  More... | |
| void | remove_higher_space_dimensions (dimension_type new_dimension) | 
| Removes the higher dimensions so that the resulting space will have dimension new_dimension.  More... | |
| template<typename Partial_Function > | |
| void | map_space_dimensions (const Partial_Function &pfunc) | 
| Remaps the dimensions of the vector space according to a partial function.  More... | |
| void | expand_space_dimension (Variable var, dimension_type m) | 
| Creates mcopies of the space dimension corresponding tovar.  More... | |
| void | fold_space_dimensions (const Variables_Set &vars, Variable dest) | 
| Folds the space dimensions in varsintodest.  More... | |
| template<typename U > | |
| void | export_interval_constraints (U &dest) const | 
| Applies to destthe interval constraints embedded in*this.  More... | |
| template<typename Interval_Info > | |
| void | refine_fp_interval_abstract_store (Box< Interval< T, Interval_Info > > &store) const | 
| Refines storewith the constraints defining*this.  More... | |
| Static Public Member Functions | |
| static dimension_type | max_space_dimension () | 
| Returns the maximum space dimension that an OS can handle. | |
| static bool | can_recycle_constraint_systems () | 
| Returns false indicating that this domain cannot recycle constraints. | |
| static bool | can_recycle_congruence_systems () | 
| Returns false indicating that this domain cannot recycle congruences. | |
| Related Functions | |
| (Note that these are not member functions.) | |
| template<typename T > | |
| std::ostream & | operator<< (std::ostream &s, const Octagonal_Shape< T > &oct) | 
| Output operator.  More... | |
| template<typename T > | |
| void | swap (Octagonal_Shape< T > &x, Octagonal_Shape< T > &y) | 
| Swaps xwithy.  More... | |
| template<typename T > | |
| bool | operator== (const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y) | 
| Returns trueif and only ifxandyare the same octagon.  More... | |
| template<typename T > | |
| bool | operator!= (const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y) | 
| Returns trueif and only ifxandyare different shapes.  More... | |
| template<typename To , typename T > | |
| bool | rectilinear_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, Rounding_Dir dir) | 
| Computes the rectilinear (or Manhattan) distance between xandy.  More... | |
| template<typename Temp , typename To , typename T > | |
| bool | rectilinear_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, Rounding_Dir dir) | 
| Computes the rectilinear (or Manhattan) distance between xandy.  More... | |
| template<typename Temp , typename To , typename T > | |
| bool | rectilinear_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, Rounding_Dir dir, Temp &tmp0, Temp &tmp1, Temp &tmp2) | 
| Computes the rectilinear (or Manhattan) distance between xandy.  More... | |
| template<typename To , typename T > | |
| bool | euclidean_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, Rounding_Dir dir) | 
| Computes the euclidean distance between xandy.  More... | |
| template<typename Temp , typename To , typename T > | |
| bool | euclidean_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, Rounding_Dir dir) | 
| Computes the euclidean distance between xandy.  More... | |
| template<typename Temp , typename To , typename T > | |
| bool | euclidean_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, Rounding_Dir dir, Temp &tmp0, Temp &tmp1, Temp &tmp2) | 
| Computes the euclidean distance between xandy.  More... | |
| template<typename To , typename T > | |
| bool | l_infinity_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, Rounding_Dir dir) | 
| Computes the  distance between xandy.  More... | |
| template<typename Temp , typename To , typename T > | |
| bool | l_infinity_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, Rounding_Dir dir) | 
| Computes the  distance between xandy.  More... | |
| template<typename Temp , typename To , typename T > | |
| bool | l_infinity_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, Rounding_Dir dir, Temp &tmp0, Temp &tmp1, Temp &tmp2) | 
| Computes the  distance between xandy.  More... | |
| template<typename T > | |
| bool | operator== (const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y) | 
| template<typename T > | |
| bool | operator!= (const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y) | 
| template<typename Temp , typename To , typename T > | |
| bool | rectilinear_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, const Rounding_Dir dir, Temp &tmp0, Temp &tmp1, Temp &tmp2) | 
| template<typename Temp , typename To , typename T > | |
| bool | rectilinear_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, const Rounding_Dir dir) | 
| template<typename To , typename T > | |
| bool | rectilinear_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, const Rounding_Dir dir) | 
| template<typename Temp , typename To , typename T > | |
| bool | euclidean_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, const Rounding_Dir dir, Temp &tmp0, Temp &tmp1, Temp &tmp2) | 
| template<typename Temp , typename To , typename T > | |
| bool | euclidean_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, const Rounding_Dir dir) | 
| template<typename To , typename T > | |
| bool | euclidean_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, const Rounding_Dir dir) | 
| template<typename Temp , typename To , typename T > | |
| bool | l_infinity_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, const Rounding_Dir dir, Temp &tmp0, Temp &tmp1, Temp &tmp2) | 
| template<typename Temp , typename To , typename T > | |
| bool | l_infinity_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, const Rounding_Dir dir) | 
| template<typename To , typename T > | |
| bool | l_infinity_distance_assign (Checked_Number< To, Extended_Number_Policy > &r, const Octagonal_Shape< T > &x, const Octagonal_Shape< T > &y, const Rounding_Dir dir) | 
| template<typename T > | |
| void | swap (Octagonal_Shape< T > &x, Octagonal_Shape< T > &y) | 
| template<typename T > | |
| std::ostream & | operator<< (std::ostream &s, const Octagonal_Shape< T > &oct) | 
An octagonal shape.
The class template Octagonal_Shape<T> allows for the efficient representation of a restricted kind of topologically closed convex polyhedra called octagonal shapes (OSs, for short). The name comes from the fact that, in a vector space of dimension 2, bounded OSs are polygons with at most eight sides. The closed affine half-spaces that characterize the OS can be expressed by constraints of the form
![\[ ax_i + bx_j \leq k \]](form_600.png) 
 where  and
 and  is a rational number, which are called octagonal constraints.
 is a rational number, which are called octagonal constraints.
Based on the class template type parameter T, a family of extended numbers is built and used to approximate the inhomogeneous term of octagonal constraints. These extended numbers provide a representation for the value  , as well as rounding-aware implementations for several arithmetic functions. The value of the type parameter
, as well as rounding-aware implementations for several arithmetic functions. The value of the type parameter T may be one of the following:
int32_t or int64_t);float or double);mpz_class or mpq_class).The user interface for OSs is meant to be as similar as possible to the one developed for the polyhedron class C_Polyhedron.
The OS domain optimally supports:
Depending on the method, using a constraint or congruence that is not optimally supported by the domain will either raise an exception or result in a (possibly non-optimal) upward approximation.
A constraint is octagonal if it has the form
![\[ \pm a_i x_i \pm a_j x_j \relsym b \]](form_602.png) 
 where  and
 and  ,
,  ,
,  are integer coefficients such that
 are integer coefficients such that  , or
, or  , or
, or  . The user is warned that the above octagonal Constraint object will be mapped into a correct and optimal approximation that, depending on the expressive power of the chosen template argument
. The user is warned that the above octagonal Constraint object will be mapped into a correct and optimal approximation that, depending on the expressive power of the chosen template argument T, may loose some precision. Also note that strict constraints are not octagonal.
For instance, a Constraint object encoding  will be approximated by:
 will be approximated by:
 , if
, if T is a (bounded or unbounded) integer type; , if
, if T is the unbounded rational type mpq_class; , where
, where  , if
, if T is a floating point type (having no exact representation for  ).
).On the other hand, depending from the context, a Constraint object encoding  will be either upward approximated (e.g., by safely ignoring it) or it will cause an exception.
 will be either upward approximated (e.g., by safely ignoring it) or it will cause an exception.
In the following examples it is assumed that the type argument T is one of the possible instances listed above and that variables x, y and z are defined (where they are used) as follows: 
 , given as a system of constraints:
, given as a system of constraints: | 
 | inlineexplicit | 
Builds an universe or empty OS of the specified space dimension.
| num_dimensions | The number of dimensions of the vector space enclosing the OS; | 
| kind | Specifies whether the universe or the empty OS has to be built. | 
| 
 | inline | 
Ordinary copy constructor.
The complexity argument is ignored.
| 
 | inlineexplicit | 
Builds a conservative, upward approximation of y. 
The complexity argument is ignored.
| 
 | inlineexplicit | 
Builds an OS from the system of constraints cs. 
The OS inherits the space dimension of cs.
| cs | A system of octagonal constraints. | 
| std::invalid_argument | Thrown if cscontains a constraint which is not optimally supported by the Octagonal shape domain. | 
| 
 | inlineexplicit | 
Builds an OS from a system of congruences.
The OS inherits the space dimension of cgs 
| cgs | A system of congruences. | 
| std::invalid_argument | Thrown if cgscontains a congruence which is not optimally supported by the Octagonal shape domain. | 
| 
 | explicit | 
Builds an OS from the system of generators gs. 
Builds the smallest OS containing the polyhedron defined by gs. The OS inherits the space dimension of gs.
| std::invalid_argument | Thrown if the system of generators is not empty but has no points. | 
| 
 | explicit | 
Builds an OS from the polyhedron ph. 
Builds an OS containing ph using algorithms whose complexity does not exceed the one specified by complexity. If complexity is ANY_COMPLEXITY, then the OS built is the smallest one containing ph. 
| 
 | inlineexplicit | 
Builds an OS out of a box.
The OS inherits the space dimension of the box. The built OS is the most precise OS that includes the box.
| box | The box representing the OS to be built. | 
| complexity | This argument is ignored as the algorithm used has polynomial complexity. | 
| std::length_error | Thrown if the space dimension of boxexceeds the maximum allowed space dimension. | 
| 
 | inlineexplicit | 
Builds an OS that approximates a grid.
The OS inherits the space dimension of the grid. The built OS is the most precise OS that includes the grid.
| grid | The grid used to build the OS. | 
| complexity | This argument is ignored as the algorithm used has polynomial complexity. | 
| std::length_error | Thrown if the space dimension of gridexceeds the maximum allowed space dimension. | 
| 
 | inlineexplicit | 
Builds an OS from a BD shape.
The OS inherits the space dimension of the BD shape. The built OS is the most precise OS that includes the BD shape.
| bd | The BD shape used to build the OS. | 
| complexity | This argument is ignored as the algorithm used has polynomial complexity. | 
| std::length_error | Thrown if the space dimension of bdexceeds the maximum allowed space dimension. | 
| bool Parma_Polyhedra_Library::Octagonal_Shape< T >::contains | ( | const Octagonal_Shape< T > & | y) | const | 
Returns true if and only if *this contains y. 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
| 
 | inline | 
Returns true if and only if *this strictly contains y. 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
| bool Parma_Polyhedra_Library::Octagonal_Shape< T >::is_disjoint_from | ( | const Octagonal_Shape< T > & | y) | const | 
Returns true if and only if *this and y are disjoint. 
| std::invalid_argument | Thrown if xandyare topology-incompatible or dimension-incompatible. | 
| Poly_Con_Relation Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with | ( | const Constraint & | c) | const | 
Returns the relations holding between *this and the constraint c. 
| std::invalid_argument | Thrown if *thisand constraintcare dimension-incompatible. | 
| Poly_Con_Relation Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with | ( | const Congruence & | cg) | const | 
Returns the relations holding between *this and the congruence cg. 
| std::invalid_argument | Thrown if *thisandcgare dimension-incompatible. | 
| Poly_Gen_Relation Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with | ( | const Generator & | g) | const | 
Returns the relations holding between *this and the generator g. 
| std::invalid_argument | Thrown if *thisand generatorgare dimension-incompatible. | 
| bool Parma_Polyhedra_Library::Octagonal_Shape< T >::constrains | ( | Variable | var) | const | 
Returns true if and only if var is constrained in *this. 
| std::invalid_argument | Thrown if varis not a space dimension of*this. | 
| 
 | inline | 
Returns true if and only if expr is bounded from above in *this. 
| std::invalid_argument | Thrown if exprand*thisare dimension-incompatible. | 
| 
 | inline | 
Returns true if and only if expr is bounded from below in *this. 
| std::invalid_argument | Thrown if exprand*thisare dimension-incompatible. | 
| 
 | inline | 
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. 
| expr | The linear expression to be maximized subject to *this; | 
| sup_n | The numerator of the supremum value; | 
| sup_d | The denominator of the supremum value; | 
| maximum | trueif and only if the supremum is also the maximum value. | 
| std::invalid_argument | Thrown if exprand*thisare dimension-incompatible. | 
If *this is empty or expr is not bounded from above, false is returned and sup_n, sup_d and maximum are left untouched. 
| 
 | inline | 
Returns true if and only if *this is not empty and expr is bounded from above in *this, in which case the supremum value and a point where expr reaches it are computed. 
| expr | The linear expression to be maximized subject to *this; | 
| sup_n | The numerator of the supremum value; | 
| sup_d | The denominator of the supremum value; | 
| maximum | trueif and only if the supremum is also the maximum value; | 
| g | When maximization succeeds, will be assigned the point or closure point where exprreaches its supremum value. | 
| std::invalid_argument | Thrown if exprand*thisare dimension-incompatible. | 
If *this is empty or expr is not bounded from above, false is returned and sup_n, sup_d, maximum and g are left untouched. 
| 
 | inline | 
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. 
| expr | The linear expression to be minimized subject to *this; | 
| inf_n | The numerator of the infimum value; | 
| inf_d | The denominator of the infimum value; | 
| minimum | trueif and only if the infimum is also the minimum value. | 
| std::invalid_argument | Thrown if exprand*thisare dimension-incompatible. | 
If *this is empty or expr is not bounded from below, false is returned and inf_n, inf_d and minimum are left untouched. 
| 
 | inline | 
Returns true if and only if *this is not empty and expr is bounded from below in *this, in which case the infimum value and a point where expr reaches it are computed. 
| expr | The linear expression to be minimized subject to *this; | 
| inf_n | The numerator of the infimum value; | 
| inf_d | The denominator of the infimum value; | 
| minimum | trueif and only if the infimum is also the minimum value; | 
| g | When minimization succeeds, will be assigned a point or closure point where exprreaches its infimum value. | 
| std::invalid_argument | Thrown if exprand*thisare dimension-incompatible. | 
If *this is empty or expr is not bounded from below, false is returned and inf_n, inf_d, minimum and g are left untouched. 
| bool Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency | ( | const Linear_Expression & | expr, | 
| Coefficient & | freq_n, | ||
| Coefficient & | freq_d, | ||
| Coefficient & | val_n, | ||
| Coefficient & | val_d | ||
| ) | const | 
Returns true if and only if there exist a unique value val such that *this saturates the equality expr = val. 
| expr | The linear expression for which the frequency is needed; | 
| freq_n | If trueis returned, the value is set to ; Present for interface compatibility with class Grid, where the frequency can have a non-zero value; | 
| freq_d | If trueis returned, the value is set to ; | 
| val_n | The numerator of val; | 
| val_d | The denominator of val; | 
| std::invalid_argument | Thrown if exprand*thisare dimension-incompatible. | 
If false is returned, then freq_n, freq_d, val_n and val_d are left untouched. 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::add_constraint | ( | const Constraint & | c) | 
Adds a copy of constraint c to the system of constraints defining *this. 
| c | The constraint to be added. | 
| std::invalid_argument | Thrown if *thisand constraintcare dimension-incompatible, orcis not optimally supported by the OS domain. | 
| 
 | inline | 
Adds the constraints in cs to the system of constraints defining *this. 
| cs | The constraints that will be added. | 
| std::invalid_argument | Thrown if *thisandcsare dimension-incompatible, orcscontains a constraint which is not optimally supported by the OS domain. | 
| 
 | inline | 
Adds the constraints in cs to the system of constraints of *this. 
| cs | The constraint system to be added to *this. The constraints incsmay be recycled. | 
| std::invalid_argument | Thrown if *thisandcsare dimension-incompatible, orcscontains a constraint which is not optimally supported by the OS domain. | 
cs upon successful or exceptional return is that it can be safely destroyed. | void Parma_Polyhedra_Library::Octagonal_Shape< T >::add_congruence | ( | const Congruence & | cg) | 
Adds to *this a constraint equivalent to the congruence cg. 
| cg | The congruence to be added. | 
| std::invalid_argument | Thrown if *thisand congruencecgare dimension-incompatible, orcgis not optimally supported by the OS domain. | 
| 
 | inline | 
Adds to *this constraints equivalent to the congruences in cgs. 
| cgs | The congruences to be added. | 
| std::invalid_argument | Thrown if *thisandcgsare dimension-incompatible, orcgscontains a congruence which is not optimally supported by the OS domain. | 
| 
 | inline | 
Adds to *this constraints equivalent to the congruences in cgs. 
| cgs | The congruence system to be added to *this. The congruences incgsmay be recycled. | 
| std::invalid_argument | Thrown if *thisandcgsare dimension-incompatible, orcgscontains a congruence which is not optimally supported by the OS domain. | 
cgs upon successful or exceptional return is that it can be safely destroyed. | 
 | inline | 
Uses a copy of constraint c to refine the system of octagonal constraints defining *this. 
| c | The constraint. If it is not a octagonal constraint, it will be ignored. | 
| std::invalid_argument | Thrown if *thisand constraintcare dimension-incompatible. | 
| 
 | inline | 
Uses a copy of congruence cg to refine the system of octagonal constraints of *this. 
| cg | The congruence. If it is not a octagonal equality, it will be ignored. | 
| std::invalid_argument | Thrown if *thisand congruencecgare dimension-incompatible. | 
| 
 | inline | 
Uses a copy of the constraints in cs to refine the system of octagonal constraints defining *this. 
| cs | The constraint system to be used. Constraints that are not octagonal are ignored. | 
| std::invalid_argument | Thrown if *thisandcsare dimension-incompatible. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_with_congruences | ( | const Congruence_System & | cgs) | 
Uses a copy of the congruences in cgs to refine the system of octagonal constraints defining *this. 
| cgs | The congruence system to be used. Congruences that are not octagonal equalities are ignored. | 
| std::invalid_argument | Thrown if *thisandcgsare dimension-incompatible. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_with_linear_form_inequality | ( | const Linear_Form< Interval< T, Interval_Info > > & | left, | 
| const Linear_Form< Interval< T, Interval_Info > > & | right | ||
| ) | 
Refines the system of octagonal constraints defining *this using the constraint expressed by left  
 right. 
| left | The linear form on intervals with floating point boundaries that is at the left of the comparison operator. All of its coefficients MUST be bounded. | 
| right | The linear form on intervals with floating point boundaries that is at the right of the comparison operator. All of its coefficients MUST be bounded. | 
| std::invalid_argument | Thrown if left(orright) is dimension-incompatible with*this. | 
This function is used in abstract interpretation to model a filter that is generated by a comparison of two expressions that are correctly approximated by left and right respectively. 
| 
 | inline | 
Refines the system of octagonal constraints defining *this using the constraint expressed by left  
 right, where  is the relation symbol specified by
 is the relation symbol specified by relsym. 
| left | The linear form on intervals with floating point boundaries that is at the left of the comparison operator. All of its coefficients MUST be bounded. | 
| right | The linear form on intervals with floating point boundaries that is at the right of the comparison operator. All of its coefficients MUST be bounded. | 
| relsym | The relation symbol. | 
| std::invalid_argument | Thrown if left(orright) is dimension-incompatible with*this. | 
| std::runtime_error | Thrown if relsymis not a valid relation symbol. | 
This function is used in abstract interpretation to model a filter that is generated by a comparison of two expressions that are correctly approximated by left and right respectively. 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::unconstrain | ( | Variable | var) | 
Computes the cylindrification of *this with respect to space dimension var, assigning the result to *this. 
| var | The space dimension that will be unconstrained. | 
| std::invalid_argument | Thrown if varis not a space dimension of*this. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::unconstrain | ( | const Variables_Set & | vars) | 
Computes the cylindrification of *this with respect to the set of space dimensions vars, assigning the result to *this. 
| vars | The set of space dimension that will be unconstrained. | 
| std::invalid_argument | Thrown if *thisis dimension-incompatible with one of the Variable objects contained invars. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::intersection_assign | ( | const Octagonal_Shape< T > & | y) | 
Assigns to *this the intersection of *this and y. 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::upper_bound_assign | ( | const Octagonal_Shape< T > & | y) | 
Assigns to *this the smallest OS that contains the convex union of *this and y. 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
| bool Parma_Polyhedra_Library::Octagonal_Shape< T >::upper_bound_assign_if_exact | ( | const Octagonal_Shape< T > & | y) | 
If the upper bound of *this and y is exact, it is assigned to *this and true is returned, otherwise false is returned. 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
Implementation is based on Theorem 6.3 of [BHZ09b].
| bool Parma_Polyhedra_Library::Octagonal_Shape< T >::integer_upper_bound_assign_if_exact | ( | const Octagonal_Shape< T > & | y) | 
If the integer upper bound of *this and y is exact, it is assigned to *this and true is returned; otherwise false is returned. 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
T is bound to an integer data type.Implementation is based on Theorem 6.8 of [BHZ09b].
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::difference_assign | ( | const Octagonal_Shape< T > & | y) | 
Assigns to *this the smallest octagon containing the set difference of *this and y. 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
| bool Parma_Polyhedra_Library::Octagonal_Shape< T >::simplify_using_context_assign | ( | const Octagonal_Shape< T > & | y) | 
Assigns to *this a meet-preserving simplification of *this with respect to y. If false is returned, then the intersection is empty. 
| std::invalid_argument | Thrown if *thisandyare topology-incompatible or dimension-incompatible. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::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 into the affine expression specified by expr and denominator. 
| var | The variable to which the affine expression is assigned. | 
| expr | The numerator of the affine expression. | 
| denominator | The denominator of the affine expression. | 
| std::invalid_argument | Thrown if denominatoris zero or ifexprand*thisare dimension-incompatible or ifvaris not a dimension of*this. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_form_image | ( | Variable | var, | 
| const Linear_Form< Interval< T, Interval_Info > > & | lf | ||
| ) | 
Assigns to *this the affine form image of *this under the function mapping variable var into the affine expression(s) specified by lf. 
| var | The variable to which the affine expression is assigned. | 
| lf | The linear form on intervals with floating point boundaries that defines the affine expression(s). ALL of its coefficients MUST be bounded. | 
| std::invalid_argument | Thrown if lfand*thisare dimension-incompatible or ifvaris not a dimension of*this. | 
This function is used in abstract interpretation to model an assignment of a value that is correctly overapproximated by lf to the floating point variable represented by var. 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::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 into the affine expression specified by expr and denominator. 
| var | The variable to which the affine expression is substituted. | 
| expr | The numerator of the affine expression. | 
| denominator | The denominator of the affine expression. | 
| std::invalid_argument | Thrown if denominatoris zero or ifexprand*thisare dimension-incompatible or ifvaris not a dimension of*this. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::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 transfer function  , where
, where  is the relation symbol encoded by
 is the relation symbol encoded by relsym. 
| var | The left hand side variable of the generalized affine transfer function. | 
| relsym | The relation symbol. | 
| expr | The numerator of the right hand side affine expression. | 
| denominator | The denominator of the right hand side affine expression. | 
| std::invalid_argument | Thrown if denominatoris zero or ifexprand*thisare dimension-incompatible or ifvaris not a dimension of*thisor ifrelsymis a strict relation symbol. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image | ( | const Linear_Expression & | lhs, | 
| Relation_Symbol | relsym, | ||
| const Linear_Expression & | rhs | ||
| ) | 
Assigns to *this the image of *this with respect to the generalized affine transfer function  , where
, where  is the relation symbol encoded by
 is the relation symbol encoded by relsym. 
| lhs | The left hand side affine expression. | 
| relsym | The relation symbol. | 
| rhs | The right hand side affine expression. | 
| std::invalid_argument | Thrown if *thisis dimension-incompatible withlhsorrhsor ifrelsymis a strict relation symbol. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::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  .
. 
| var | The variable updated by the affine relation; | 
| lb_expr | The numerator of the lower bounding affine expression; | 
| ub_expr | The numerator of the upper bounding affine expression; | 
| denominator | The (common) denominator for the lower and upper bounding affine expressions (optional argument with default value 1). | 
| std::invalid_argument | Thrown if denominatoris zero or iflb_expr(resp.,ub_expr) and*thisare dimension-incompatible or ifvaris not a space dimension of*this. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::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 affine relation  , where
, where  is the relation symbol encoded by
 is the relation symbol encoded by relsym. 
| var | The left hand side variable of the generalized affine transfer function. | 
| relsym | The relation symbol. | 
| expr | The numerator of the right hand side affine expression. | 
| denominator | The denominator of the right hand side affine expression. | 
| std::invalid_argument | Thrown if denominatoris zero or ifexprand*thisare dimension-incompatible or ifvaris not a dimension of*thisor ifrelsymis a strict relation symbol. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage | ( | const Linear_Expression & | lhs, | 
| Relation_Symbol | relsym, | ||
| const Linear_Expression & | rhs | ||
| ) | 
Assigns to *this the preimage of *this with respect to the generalized affine relation  , where
, where  is the relation symbol encoded by
 is the relation symbol encoded by relsym. 
| lhs | The left hand side affine expression; | 
| relsym | The relation symbol; | 
| rhs | The right hand side affine expression. | 
| std::invalid_argument | Thrown if *thisis dimension-incompatible withlhsorrhsor ifrelsymis a strict relation symbol. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::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  .
. 
| var | The variable updated by the affine relation; | 
| lb_expr | The numerator of the lower bounding affine expression; | 
| ub_expr | The numerator of the upper bounding affine expression; | 
| denominator | The (common) denominator for the lower and upper bounding affine expressions (optional argument with default value 1). | 
| std::invalid_argument | Thrown if denominatoris zero or iflb_expr(resp.,ub_expr) and*thisare dimension-incompatible or ifvaris not a space dimension of*this. | 
| 
 | inline | 
Assigns to *this the result of computing the time-elapse between *this and y. 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::wrap_assign | ( | const Variables_Set & | vars, | 
| Bounded_Integer_Type_Width | w, | ||
| Bounded_Integer_Type_Representation | r, | ||
| Bounded_Integer_Type_Overflow | o, | ||
| const Constraint_System * | cs_p = 0, | ||
| unsigned | complexity_threshold = 16, | ||
| bool | wrap_individually = true | ||
| ) | 
Wraps the specified dimensions of the vector space.
| vars | The set of Variable objects corresponding to the space dimensions to be wrapped. | 
| w | The width of the bounded integer type corresponding to all the dimensions to be wrapped. | 
| r | The representation of the bounded integer type corresponding to all the dimensions to be wrapped. | 
| o | The overflow behavior of the bounded integer type corresponding to all the dimensions to be wrapped. | 
| cs_p | Possibly null pointer to a constraint system whose variables are contained in vars. If*cs_pdepends on variables not invars, the behavior is undefined. When non-null, the pointed-to constraint system is assumed to represent the conditional or looping construct guard with respect to which wrapping is performed. Since wrapping requires the computation of upper bounds and due to non-distributivity of constraint refinement over upper bounds, passing a constraint system in this way can be more precise than refining the result of the wrapping operation with the constraints in*cs_p. | 
| complexity_threshold | A precision parameter of the wrapping operator: higher values result in possibly improved precision. | 
| wrap_individually | trueif the dimensions should be wrapped individually (something that results in much greater efficiency to the detriment of precision). | 
| std::invalid_argument | Thrown if *cs_pis dimension-incompatible withvars, or if*thisis dimension-incompatiblevarsor with*cs_p. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::drop_some_non_integer_points | ( | Complexity_Class | complexity = ANY_COMPLEXITY) | 
Possibly tightens *this by dropping some points with non-integer coordinates. 
| complexity | The maximal complexity of any algorithms used. | 
complexity is ANY_COMPLEXITY. | void Parma_Polyhedra_Library::Octagonal_Shape< T >::drop_some_non_integer_points | ( | const Variables_Set & | vars, | 
| Complexity_Class | complexity = ANY_COMPLEXITY | ||
| ) | 
Possibly tightens *this by dropping some points with non-integer coordinates for the space dimensions corresponding to vars. 
| vars | Points with non-integer coordinates for these variables/space-dimensions can be discarded. | 
| complexity | The maximal complexity of any algorithms used. | 
complexity is ANY_COMPLEXITY. | 
 | inline | 
Assigns to *this the result of computing the CC76-extrapolation between *this and y. 
| y | An OS that must be contained in *this. | 
| tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). | 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::CC76_extrapolation_assign | ( | const Octagonal_Shape< T > & | y, | 
| Iterator | first, | ||
| Iterator | last, | ||
| unsigned * | tp = 0 | ||
| ) | 
Assigns to *this the result of computing the CC76-extrapolation between *this and y. 
| y | An OS that must be contained in *this. | 
| first | An iterator that points to the first stop_point. | 
| last | An iterator that points to the last stop_point. | 
| tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). | 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::BHMZ05_widening_assign | ( | const Octagonal_Shape< T > & | y, | 
| unsigned * | tp = 0 | ||
| ) | 
Assigns to *this the result of computing the BHMZ05-widening between *this and y. 
| y | An OS that must be contained in *this. | 
| tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). | 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::limited_BHMZ05_extrapolation_assign | ( | const Octagonal_Shape< T > & | y, | 
| const Constraint_System & | cs, | ||
| unsigned * | tp = 0 | ||
| ) | 
Improves the result of the BHMZ05-widening computation by also enforcing those constraints in cs that are satisfied by all the points of *this. 
| y | An OS that must be contained in *this. | 
| cs | The system of constraints used to improve the widened OS. | 
| tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). | 
| std::invalid_argument | Thrown if *this,yandcsare dimension-incompatible or if there is incsa strict inequality. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::CC76_narrowing_assign | ( | const Octagonal_Shape< T > & | y) | 
Restores from y the constraints of *this, lost by CC76-extrapolation applications. 
| y | An OS that must contain *this. | 
| std::invalid_argument | Thrown if *thisandyare dimension-incompatible. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::limited_CC76_extrapolation_assign | ( | const Octagonal_Shape< T > & | y, | 
| const Constraint_System & | cs, | ||
| unsigned * | tp = 0 | ||
| ) | 
Improves the result of the CC76-extrapolation computation by also enforcing those constraints in cs that are satisfied by all the points of *this. 
| y | An OS that must be contained in *this. | 
| cs | The system of constraints used to improve the widened OS. | 
| tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). | 
| std::invalid_argument | Thrown if *this,yandcsare dimension-incompatible or ifcscontains a strict inequality. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::add_space_dimensions_and_embed | ( | dimension_type | m) | 
Adds m new dimensions and embeds the old OS into the new space. 
| m | The number of dimensions to add. | 
The new dimensions will be those having the highest indexes in the new OS, which is characterized by a system of constraints in which the variables running through the new dimensions are not constrained. For instance, when starting from the OS  and adding a third dimension, the result will be the OS
 and adding a third dimension, the result will be the OS 
![\[ \bigl\{\, (x, y, z)^\transpose \in \Rset^3 \bigm| (x, y)^\transpose \in \cO \,\bigr\}. \]](form_809.png) 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::add_space_dimensions_and_project | ( | dimension_type | m) | 
Adds m new dimensions to the OS and does not embed it in the new space. 
| m | The number of dimensions to add. | 
The new dimensions will be those having the highest indexes in the new OS, which is characterized by a system of constraints in which the variables running through the new dimensions are all constrained to be equal to 0. For instance, when starting from the OS  and adding a third dimension, the result will be the OS
 and adding a third dimension, the result will be the OS 
![\[ \bigl\{\, (x, y, 0)^\transpose \in \Rset^3 \bigm| (x, y)^\transpose \in \cO \,\bigr\}. \]](form_810.png) 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::concatenate_assign | ( | const Octagonal_Shape< T > & | y) | 
Assigns to *this the concatenation of *this and y, taken in this order. 
| std::length_error | Thrown if the concatenation would cause the vector space to exceed dimension max_space_dimension(). | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::remove_space_dimensions | ( | const Variables_Set & | vars) | 
| 
 | inline | 
Removes the higher dimensions so that the resulting space will have dimension new_dimension. 
| std::invalid_argument | Thrown if new_dimensionis greater than the space dimension of*this. | 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::map_space_dimensions | ( | const Partial_Function & | pfunc) | 
Remaps the dimensions of the vector space according to a partial function.
| pfunc | The partial function specifying the destiny of each dimension. | 
The template type parameter Partial_Function must provide the following methods.
 returns true if and only if the represented partial function has an empty codomain (i.e., it is always undefined). The has_empty_codomain() method will always be called before the methods below. However, if has_empty_codomain() returns true, none of the functions below will be called. 
returns the maximum value that belongs to the codomain of the partial function.
 Let  be the represented function and
 be the represented function and  be the value of
 be the value of i. If  is defined in
 is defined in  , then
, then  is assigned to
 is assigned to j and true is returned. If  is undefined in
 is undefined in  , then
, then false is returned.
The result is undefined if pfunc does not encode a partial function with the properties described in the specification of the mapping operator. 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::expand_space_dimension | ( | Variable | var, | 
| dimension_type | m | ||
| ) | 
Creates m copies of the space dimension corresponding to var. 
| var | The variable corresponding to the space dimension to be replicated; | 
| m | The number of replicas to be created. | 
| std::invalid_argument | Thrown if vardoes not correspond to a dimension of the vector space. | 
| std::length_error | Thrown if adding mnew space dimensions would cause the vector space to exceed dimensionmax_space_dimension(). | 
If *this has space dimension  , with
, with  , and
, and var has space dimension  , then the
, then the  -th space dimension is expanded to
-th space dimension is expanded to m new space dimensions  ,
,  ,
,  ,
,  .
. 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::fold_space_dimensions | ( | const Variables_Set & | vars, | 
| Variable | dest | ||
| ) | 
Folds the space dimensions in vars into dest. 
| vars | The set of Variable objects corresponding to the space dimensions to be folded; | 
| dest | The variable corresponding to the space dimension that is the destination of the folding operation. | 
| std::invalid_argument | Thrown if *thisis dimension-incompatible withdestor with one of the Variable objects contained invars. Also thrown ifdestis contained invars. | 
If *this has space dimension  , with
, with  ,
, dest has space dimension  ,
, vars is a set of variables whose maximum space dimension is also less than or equal to  , and
, and dest is not a member of vars, then the space dimensions corresponding to variables in vars are folded into the  -th space dimension.
-th space dimension. 
| void Parma_Polyhedra_Library::Octagonal_Shape< T >::export_interval_constraints | ( | U & | dest) | const | 
Applies to dest the interval constraints embedded in *this. 
| dest | The object to which the constraints will be added. | 
| std::invalid_argument | Thrown if *thisis dimension-incompatible withdest. | 
The template type parameter U must provide the following methods.
returns the space dimension of the object.
sets the object to an empty object.
 restricts the object by applying the lower bound lb to the space dimension dim and returns false if and only if the object becomes empty. 
 restricts the object by applying the upper bound ub to the space dimension dim and returns false if and only if the object becomes empty. 
| 
 | inline | 
Refines store with the constraints defining *this. 
| store | The interval floating point abstract store to refine. | 
| 
 | inline | 
Returns a 32-bit hash code for *this. 
If x and y are such that x == y, then x.hash_code() == y.hash_code(). 
| 
 | related | 
Output operator.
Writes a textual representation of oct on s: false is written if oct is an empty polyhedron; true is written if oct is a universe polyhedron; a system of constraints defining oct is written otherwise, all constraints separated by ", ". 
| 
 | related | 
Swaps x with y. 
| 
 | related | 
Returns true if and only if x and y are the same octagon. 
Note that x and y may be dimension-incompatible shapes: in this case, the value false is returned. 
| 
 | related | 
Returns true if and only if x and y are different shapes. 
Note that x and y may be dimension-incompatible shapes: in this case, the value true is returned. 
| 
 | related | 
Computes the rectilinear (or Manhattan) distance between x and y. 
If the rectilinear distance between x and y is defined, stores an approximation of it into r and returns true; returns false otherwise.
The direction of the approximation is specified by dir.
All computations are performed using variables of type Checked_Number<To, Extended_Number_Policy>. 
| 
 | related | 
Computes the rectilinear (or Manhattan) distance between x and y. 
If the rectilinear distance between x and y is defined, stores an approximation of it into r and returns true; returns false otherwise.
The direction of the approximation is specified by dir.
All computations are performed using variables of type Checked_Number<Temp, Extended_Number_Policy>. 
| 
 | related | 
Computes the rectilinear (or Manhattan) distance between x and y. 
If the rectilinear distance between x and y is defined, stores an approximation of it into r and returns true; returns false otherwise.
The direction of the approximation is specified by dir.
All computations are performed using the temporary variables tmp0, tmp1 and tmp2. 
| 
 | related | 
Computes the euclidean distance between x and y. 
If the euclidean distance between x and y is defined, stores an approximation of it into r and returns true; returns false otherwise.
The direction of the approximation is specified by dir.
All computations are performed using variables of type Checked_Number<To, Extended_Number_Policy>. 
| 
 | related | 
Computes the euclidean distance between x and y. 
If the euclidean distance between x and y is defined, stores an approximation of it into r and returns true; returns false otherwise.
The direction of the approximation is specified by dir.
All computations are performed using variables of type Checked_Number<Temp, Extended_Number_Policy>. 
| 
 | related | 
Computes the euclidean distance between x and y. 
If the euclidean distance between x and y is defined, stores an approximation of it into r and returns true; returns false otherwise.
The direction of the approximation is specified by dir.
All computations are performed using the temporary variables tmp0, tmp1 and tmp2. 
| 
 | related | 
Computes the  distance between
 distance between x and y. 
If the  distance between
 distance between x and y is defined, stores an approximation of it into r and returns true; returns false otherwise.
The direction of the approximation is specified by dir.
All computations are performed using variables of type Checked_Number<To, Extended_Number_Policy>. 
| 
 | related | 
Computes the  distance between
 distance between x and y. 
If the  distance between
 distance between x and y is defined, stores an approximation of it into r and returns true; returns false otherwise.
The direction of the approximation is specified by dir.
All computations are performed using variables of type Checked_Number<Temp, Extended_Number_Policy>. 
| 
 | related | 
Computes the  distance between
 distance between x and y. 
If the  distance between
 distance between x and y is defined, stores an approximation of it into r and returns true; returns false otherwise.
The direction of the approximation is specified by dir.
All computations are performed using the temporary variables tmp0, tmp1 and tmp2. 
| 
 | related | 
| 
 | related | 
| 
 | related | 
| 
 | related | 
| 
 | related | 
| 
 | related | 
| 
 | related | 
| 
 | related | 
| 
 | related | 
| 
 | related | 
| 
 | related | 
| 
 | related | 
| 
 | related |