Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

Parma_Polyhedra_Library::AskTell< CS > Class Template Reference

The ask and tell construction on constraint systems. More...

List of all members.

Public Member Functions

 AskTell (dimension_type num_dimensions=0, bool universe=true)
 Builds a universe (top) or empty (bottom) ask-and-tell agent.
 AskTell (const AskTell &y)
 Ordinary copy-constructor.
AskTelloperator= (const AskTell &y)
 The assignment operator. (*this and y can be dimension-incompatible.).
void swap (AskTell &y)
 Swaps *this with y.
 AskTell (const ConSys &cs)
 Creates an ask-and-tell constraint system with the same information contents as cs.
AskTelladd_pair (const CS &ask, const CS &tell)
 Adds to *this the pair constituted by ask and tell.
void upper_bound_assign (const AskTell &y)
 Assigns to *this an upper bound of *this and y.
void meet_assign (const AskTell &y)
 Assigns to *this the meet of *this and y.
void concatenate_assign (const AskTell &y)
 Assigns to *this the concatenation of *this and y.
bool definitely_entails (const AskTell &y) const
 Returns true if *this definitely entails y. Returns false if *this may not entail y (i.e., if *this does not entail y or if entailment could not be decided).
bool is_top () const
 Returns true if and only if *this is the top element of the ask-and-tell constraint system (i.e., it represents the universe).
bool is_bottom () const
 Returns true if and only if *this is the bottom element of the ask-and-tell constraint system (i.e., it represents the empty set).
dimension_type space_dimension () const
 Returns the dimension of the vector space enclosing *this.
void add_constraint (const Constraint &c)
 Intersects *this with (a copy of) constraint c.
void add_constraints (const ConSys &cs)
 Intersects *this with (a copy of) the constraints in cs.
void add_dimensions_and_embed (dimension_type m)
 Adds m new dimensions and embeds the old polyhedron in the new space.
void add_dimensions_and_project (dimension_type m)
 Adds m new dimensions to the polyhedron and does not embed it in the new space.
void remove_dimensions (const Variables_Set &to_be_removed)
 Removes all the specified dimensions.
void remove_higher_dimensions (dimension_type new_dimension)
 Removes the higher dimensions so that the resulting space will have dimension new_dimension.
bool OK () const
 Checks if all the invariants are satisfied.

Related Functions

(Note that these are not member functions.)

void swap (Parma_Polyhedra_Library::AskTell< CS > &x, Parma_Polyhedra_Library::AskTell< CS > &y)
 Specializes std::swap.


Detailed Description

template<typename CS>
class Parma_Polyhedra_Library::AskTell< CS >

The ask and tell construction on constraint systems.

This class offers a generic implementation of ask-and-tell constraint systems as defined in [Bag98].


Constructor & Destructor Documentation

template<typename CS>
Parma_Polyhedra_Library::AskTell< CS >::AskTell dimension_type  num_dimensions = 0,
bool  universe = true
[explicit]
 

Builds a universe (top) or empty (bottom) ask-and-tell agent.

Parameters:
num_dimensions The number of dimensions of the vector space enclosing the ask-and-tell agent;
universe If true, a universe ask-and-tell agent is built; an empty agent is built otherwise.


Member Function Documentation

template<typename CS>
void Parma_Polyhedra_Library::AskTell< CS >::concatenate_assign const AskTell< CS > &  y  ) 
 

Assigns to *this the concatenation of *this and y.

Seeing an ask-and-tell agent as a set of tuples, this method assigns to *this all the tuples that can be obtained by concatenating, in the order given, a tuple of *this with a tuple of y.

template<typename CS>
void Parma_Polyhedra_Library::AskTell< CS >::add_constraint const Constraint c  ) 
 

Intersects *this with (a copy of) constraint c.

Exceptions:
std::invalid_argument Thrown if *this and constraint c are topology-incompatible or dimension-incompatible.

template<typename CS>
void Parma_Polyhedra_Library::AskTell< CS >::add_constraints const ConSys &  cs  ) 
 

Intersects *this with (a copy of) the constraints in cs.

Parameters:
cs Contains the constraints to intersect with.
Exceptions:
std::invalid_argument Thrown if *this and cs are topology-incompatible or dimension-incompatible.

template<typename CS>
void Parma_Polyhedra_Library::AskTell< CS >::remove_dimensions const Variables_Set to_be_removed  ) 
 

Removes all the specified dimensions.

Parameters:
to_be_removed The set of Variable objects corresponding to the dimensions to be removed.
Exceptions:
std::invalid_argument Thrown if *this is dimension-incompatible with one of the Variable objects contained in to_be_removed.

template<typename CS>
void Parma_Polyhedra_Library::AskTell< CS >::remove_higher_dimensions dimension_type  new_dimension  ) 
 

Removes the higher dimensions so that the resulting space will have dimension new_dimension.

Exceptions:
std::invalid_argument Thrown if new_dimensions is greater than the space dimension of *this.


Generated on Wed Aug 18 18:41:40 2004 for PPL by doxygen 1.3.8-20040812