Inherited by Parma_Polyhedra_Library::Grid_Generator_System [private].
Public Member Functions | |
| Generator_System () | |
| Default constructor: builds an empty system of generators. | |
| Generator_System (const Generator &g) | |
Builds the singleton system containing only generator g. | |
| Generator_System (const Generator_System &gs) | |
| Ordinary copy-constructor. | |
| ~Generator_System () | |
| Destructor. | |
| Generator_System & | operator= (const Generator_System &y) |
| Assignment operator. | |
| dimension_type | space_dimension () const |
Returns the dimension of the vector space enclosing *this. | |
| void | clear () |
| Removes all the generators from the generator system and sets its space dimension to 0. | |
| void | insert (const Generator &g) |
Inserts in *this a copy of the generator g, increasing the number of space dimensions if needed. | |
| const_iterator | begin () const |
Returns the const_iterator pointing to the first generator, if *this is not empty; otherwise, returns the past-the-end const_iterator. | |
| const_iterator | end () const |
| Returns the past-the-end const_iterator. | |
| bool | OK () const |
| Checks if all the invariants are satisfied. | |
| 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. | |
| void | swap (Generator_System &y) |
Swaps *this with y. | |
Static Public Member Functions | |
| static dimension_type | max_space_dimension () |
| Returns the maximum space dimension a Generator_System can handle. | |
| static const Generator_System & | zero_dim_univ () |
| Returns the singleton system containing only Generator::zero_dim_point(). | |
Related Functions | |
| (Note that these are not member functions.) | |
| std::ostream & | operator<< (std::ostream &s, const Generator_System &gs) |
| Output operator. | |
| void | swap (Parma_Polyhedra_Library::Generator_System &x, Parma_Polyhedra_Library::Generator_System &y) |
Specializes std::swap. | |
Classes | |
| class | const_iterator |
| An iterator over a system of generators. More... | |
An object of the class Generator_System is a system of generators, i.e., a multiset of objects of the class Generator (lines, rays, points and closure points). When inserting generators in a system, space dimensions are automatically adjusted so that all the generators in the system are defined on the same vector space. A system of generators which is meant to define a non-empty polyhedron must include at least one point: the reason is that lines, rays and closure points need a supporting point (lines and rays only specify directions while closure points only specify points in the topological closure of the NNC polyhedron).
x and y are defined as follows: Variable x(0); Variable y(1);
axis (i.e., the first Cartesian axis) in
: Generator_System gs; gs.insert(line(x + 0*y));
axis, we can add the following code which inserts the origin of the space as a point: gs.insert(point(0*x + 0*y));
gs.insert(point(0*x));
axis through the point
. gs.insert(point(0*x + 1*y));
axis in
: Generator_System gs; gs.insert(ray(x + 0*y));
one just has to add the origin:
gs.insert(point(0*x + 0*y));
(the same as Example 1 for the system of constraints): Generator_System gs; gs.insert(point(0*x + 0*y)); gs.insert(point(0*x + 3*y)); gs.insert(point(3*x + 0*y)); gs.insert(point(3*x + 3*y));
Generator_System gs; gs.insert(point(x + y)); gs.insert(closure_point(0*x + 0*y)); gs.insert(closure_point(0*x + 3*y)); gs.insert(closure_point(3*x + 0*y)); gs.insert(closure_point(3*x + 3*y));
(the same as Example 2 for the system of constraints): Generator_System gs; gs.insert(point(0*x + 0*y)); gs.insert(point(0*x + 1*y)); gs.insert(ray(x - y));
| bool Parma_Polyhedra_Library::Generator_System::OK | ( | ) | const |
Checks if all the invariants are satisfied.
Returns true if and only if *this is a valid Linear_System and each row in the system is a valid Generator.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System.
| std::ostream & operator<< | ( | std::ostream & | s, | |
| const Generator_System & | gs | |||
| ) | [related] |
Output operator.
Writes false if gs is empty. Otherwise, writes on s the generators of gs, all in one row and separated by ", ".
1.4.6-20060227