Inherits Parma_Polyhedra_Library::Generator_System.
Public Member Functions | |
Grid_Generator_System () | |
Default constructor: builds an empty system of generators. | |
Grid_Generator_System (const Grid_Generator_System &gs) | |
Ordinary copy-constructor. | |
Grid_Generator_System (dimension_type dim) | |
Builds an empty system of generators of dimension dim . | |
Grid_Generator_System (const Grid_Generator &g) | |
Builds the singleton system containing only generator g . | |
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 Grid_Generator &g) |
Inserts into *this a copy of the generator g , increasing the number of space dimensions if needed. | |
void | recycling_insert (Grid_Generator &g) |
Inserts into *this the generator g , increasing the number of space dimensions if needed. | |
void | recycling_insert (Grid_Generator_System &gs) |
Inserts into *this the generators in gs , 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. | |
void | swap (Grid_Generator_System &y) |
Swaps *this with y . | |
memory_size_type | external_memory_in_bytes () const |
Returns the size in bytes of the memory managed by *this . | |
memory_size_type | total_memory_in_bytes () const |
Returns the total size in bytes of the memory occupied by *this . | |
void | affine_image (dimension_type v, const Linear_Expression &expr, Coefficient_traits::const_reference denominator) |
Assigns to a given variable an affine expression. | |
dimension_type | num_generators () const |
Returns the number of generators in the system. | |
dimension_type | num_parameters () const |
Returns the number of parameters in the system. | |
dimension_type | num_lines () const |
Returns the number of lines in the system. | |
bool | has_points () const |
Returns true if and only if *this contains one or more points. | |
bool | is_equal_to (const Grid_Generator_System y) const |
Returns true if *this is identical to y . | |
Grid_Generator & | operator[] (dimension_type k) |
Returns the k- th generator of the system. | |
const Grid_Generator & | operator[] (dimension_type k) const |
Returns a constant reference to the k- th generator of the system. | |
bool | OK () const |
Checks if all the invariants are satisfied. | |
void | add_universe_rows_and_columns (dimension_type dims) |
Adds dims rows and dims columns of zeroes to the matrix, initializing the added rows as in the universe system. | |
void | remove_space_dimensions (const Variables_Set &to_be_removed) |
Removes all the specified dimensions from the generator system. | |
void | remove_higher_space_dimensions (dimension_type new_dimension) |
Removes the higher dimensions of the system so that the resulting system will have dimension new_dimension . | |
Static Public Member Functions | |
static dimension_type | max_space_dimension () |
Returns the maximum space dimension a Grid_Generator_System can handle. | |
Friends | |
bool | operator== (const Grid_Generator_System &x, const Grid_Generator_System &y) |
Returns true if and only if x and y are identical. | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &s, const Grid_Generator_System &gs) |
Output operator. | |
void | swap (Parma_Polyhedra_Library::Grid_Generator_System &x, Parma_Polyhedra_Library::Grid_Generator_System &y) |
Specializes std::swap . | |
Classes | |
class | const_iterator |
An iterator over a system of grid generators. More... |
An object of the class Grid_Generator_System is a system of grid generators, i.e., a multiset of objects of the class Grid_Generator (lines, parameters and 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 grid generators which is meant to define a non-empty grid must include at least one point: the reason is that lines and parameters need a supporting point (lines only specify directions while parameters only specify direction and distance.
x
and y
are defined as follows: Variable x(0); Variable y(1);
Grid_Generator_System gs; gs.insert(grid_line(x + 0*y));
gs.insert(grid_point(0*x + 0*y));
gs.insert(grid_point(0*x));
gs.insert(grid_point(0*x + 1*y));
Grid_Generator_System gs; gs.insert(parameter(x + 0*y)); gs.insert(grid_point(0*x + 0*y));
Grid_Generator_System gs; gs.insert(grid_point(0*x + 0*y)); gs.insert(grid_point(0*x + 3*y)); gs.insert(grid_point(3*x + 0*y));
gs
and gs1
. Grid_Generator_System gs; gs.insert(grid_point(0*x + 0*y)); gs.insert(parameter(0*x + 3*y)); gs.insert(parameter(3*x + 0*y)); Grid_Generator_System gs1; gs1.insert(grid_point(3*x + 3*y)); gs1.insert(parameter(0*x + 3*y)); gs1.insert(parameter(3*x + 0*y));
Grid_Generator_System gs; gs.insert(grid_point(1*x + 1*y)); gs.insert(parameter(1*x - 1*y));
void Parma_Polyhedra_Library::Grid_Generator_System::insert | ( | const Grid_Generator & | g | ) |
Inserts into *this
a copy of the generator g
, increasing the number of space dimensions if needed.
If g
is an all-zero parameter then the only action is to ensure that the space dimension of *this
is at least the space dimension of g
.
void Parma_Polyhedra_Library::Grid_Generator_System::affine_image | ( | dimension_type | v, | |
const Linear_Expression & | expr, | |||
Coefficient_traits::const_reference | denominator | |||
) |
Assigns to a given variable an affine expression.
v | Index of the column to which the affine transformation is assigned; | |
expr | The numerator of the affine transformation: ![]() | |
denominator | The denominator of the affine transformation; |
denominator
that will be used as denominator of the affine transformation. The denominator is required to be a positive integer and its default value is 1.
The affine transformation assigns to each element of v
-th column the follow expression:
expr
is a constant parameter and unaltered by this computation.
Reimplemented from Parma_Polyhedra_Library::Generator_System.
bool Parma_Polyhedra_Library::Grid_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 Grid_Generator.
Reimplemented from Parma_Polyhedra_Library::Generator_System.
void Parma_Polyhedra_Library::Grid_Generator_System::add_universe_rows_and_columns | ( | dimension_type | dims | ) |
Adds dims
rows and dims
columns of zeroes to the matrix, initializing the added rows as in the universe system.
dims | The number of rows and columns to be added: must be strictly positive. |
void Parma_Polyhedra_Library::Grid_Generator_System::remove_space_dimensions | ( | const Variables_Set & | to_be_removed | ) |
Removes all the specified dimensions from the generator system.
std::invalid_argument | Thrown if the highest space dimension of the variables in to_be_removed is higher than the space dimension of *this . |
void Parma_Polyhedra_Library::Grid_Generator_System::remove_higher_space_dimensions | ( | dimension_type | new_dimension | ) |
Removes the higher dimensions of the system so that the resulting system will have dimension new_dimension
.
std::invalid_argument | Thrown if the new_dimension is higher than the space dimension of *this . |
bool operator== | ( | const Grid_Generator_System & | x, | |
const Grid_Generator_System & | y | |||
) | [friend] |
Returns true
if and only if x
and y
are identical.
std::ostream & operator<< | ( | std::ostream & | s, | |
const Grid_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 ", ".
void swap | ( | Parma_Polyhedra_Library::Grid_Generator_System & | x, | |
Parma_Polyhedra_Library::Grid_Generator_System & | y | |||
) | [related] |
Specializes std::swap
.