PPL
1.2
|
A system of congruences. More...
#include <Congruence_System_defs.hh>
Classes | |
class | const_iterator |
An iterator over a system of congruences. More... | |
Public Types | |
typedef Congruence | row_type |
Public Member Functions | |
Congruence_System (Representation r=default_representation) | |
Default constructor: builds an empty system of congruences. More... | |
Congruence_System (dimension_type d, Representation r=default_representation) | |
Builds an empty (i.e. zero rows) system of dimension d . More... | |
Congruence_System (const Congruence &cg, Representation r=default_representation) | |
Builds the singleton system containing only congruence cg . More... | |
Congruence_System (const Constraint &c, Representation r=default_representation) | |
If c represents the constraint ![]() ![]() | |
Congruence_System (const Constraint_System &cs, Representation r=default_representation) | |
Builds a system containing copies of any equalities in cs . More... | |
Congruence_System (const Congruence_System &cgs) | |
Ordinary copy constructor. More... | |
Congruence_System (const Congruence_System &cgs, Representation r) | |
Copy constructor with specified representation. More... | |
~Congruence_System () | |
Destructor. More... | |
Congruence_System & | operator= (const Congruence_System &y) |
Assignment operator. More... | |
Representation | representation () const |
Returns the current representation of *this. More... | |
void | set_representation (Representation r) |
Converts *this to the specified representation. More... | |
dimension_type | space_dimension () const |
Returns the dimension of the vector space enclosing *this . More... | |
bool | is_equal_to (const Congruence_System &y) const |
Returns true if and only if *this is exactly equal to y . More... | |
bool | has_linear_equalities () const |
Returns true if and only if *this contains one or more linear equalities. More... | |
void | clear () |
Removes all the congruences and sets the space dimension to 0. More... | |
void | insert (const Congruence &cg) |
Inserts in *this a copy of the congruence cg , increasing the number of space dimensions if needed. More... | |
void | insert (Congruence &cg, Recycle_Input) |
Inserts in *this the congruence cg , stealing its contents and increasing the number of space dimensions if needed. More... | |
void | insert (const Constraint &c) |
Inserts in *this a copy of the equality constraint c , seen as a modulo 0 congruence, increasing the number of space dimensions if needed. More... | |
void | insert (const Congruence_System &y) |
Inserts in *this a copy of the congruences in y , increasing the number of space dimensions if needed. More... | |
void | insert (Congruence_System &cgs, Recycle_Input) |
Inserts into *this the congruences in cgs , increasing the number of space dimensions if needed. More... | |
bool | empty () const |
Returns true if and only if *this has no congruences. More... | |
const_iterator | begin () const |
Returns the const_iterator pointing to the first congruence, if this is not empty; otherwise, returns the past-the-end const_iterator. More... | |
const_iterator | end () const |
Returns the past-the-end const_iterator. More... | |
bool | OK () const |
Checks if all the invariants are satisfied. More... | |
void | ascii_dump () const |
Writes to std::cerr an ASCII representation of *this . More... | |
void | ascii_dump (std::ostream &s) const |
Writes to s an ASCII representation of *this . More... | |
void | print () const |
Prints *this to std::cerr using operator<< . More... | |
bool | ascii_load (std::istream &s) |
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this accordingly. Returns true if successful, false otherwise. More... | |
memory_size_type | total_memory_in_bytes () const |
Returns the total size in bytes of the memory occupied by *this . More... | |
memory_size_type | external_memory_in_bytes () const |
Returns the size in bytes of the memory managed by *this . More... | |
dimension_type | num_equalities () const |
Returns the number of equalities. More... | |
dimension_type | num_proper_congruences () const |
Returns the number of proper congruences. More... | |
void | m_swap (Congruence_System &y) |
Swaps *this with y . More... | |
void | add_unit_rows_and_space_dimensions (dimension_type dims) |
Adds dims rows and dims space dimensions to the matrix, initializing the added rows as in the unit congruence system. More... | |
void | permute_space_dimensions (const std::vector< Variable > &cycle) |
Permutes the space dimensions of the system. More... | |
void | swap_space_dimensions (Variable v1, Variable v2) |
Swaps the columns having indexes i and j . More... | |
bool | set_space_dimension (dimension_type new_space_dim) |
Sets the number of space dimensions to new_space_dim . More... | |
Static Public Member Functions | |
static dimension_type | max_space_dimension () |
Returns the maximum space dimension a Congruence_System can handle. More... | |
static void | initialize () |
Initializes the class. More... | |
static void | finalize () |
Finalizes the class. More... | |
static const Congruence_System & | zero_dim_empty () |
Returns the system containing only Congruence::zero_dim_false(). More... | |
Static Public Attributes | |
static const Representation | default_representation = SPARSE |
Protected Member Functions | |
bool | satisfies_all_congruences (const Grid_Generator &g) const |
Returns true if g satisfies all the congruences. More... | |
Private Member Functions | |
dimension_type | num_rows () const |
Returns the number of rows in the system. More... | |
bool | has_no_rows () const |
Returns true if num_rows()==0. More... | |
const Congruence & | operator[] (dimension_type k) const |
Returns a constant reference to the k- th congruence of the system. More... | |
void | normalize_moduli () |
Adjusts all expressions to have the same moduli. More... | |
void | affine_preimage (Variable v, const Linear_Expression &expr, Coefficient_traits::const_reference denominator) |
Substitutes a given column of coefficients by a given affine expression. More... | |
void | concatenate (const Congruence_System &y) |
Concatenates copies of the congruences from y onto *this . More... | |
void | insert_verbatim (Congruence &cg, Recycle_Input) |
Inserts in *this the congruence cg , stealing its contents and increasing the number of space dimensions if needed. More... | |
void | remove_rows (dimension_type first, dimension_type last, bool keep_sorted) |
Makes the system shrink by removing the rows in [first,last). More... | |
void | remove_trailing_rows (dimension_type n) |
bool | has_a_free_dimension () const |
Returns true if and only if any of the dimensions in *this is free of constraint. More... | |
Private Attributes | |
Swapping_Vector< Congruence > | rows |
dimension_type | space_dimension_ |
Representation | representation_ |
Static Private Attributes | |
static const Congruence_System * | zero_dim_empty_p = 0 |
Holds (between class initialization and finalization) a pointer to the singleton system containing only Congruence::zero_dim_false(). More... | |
Friends | |
class | Grid |
bool | operator== (const Congruence_System &x, const Congruence_System &y) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &s, const Congruence_System &cgs) |
bool | operator== (const Congruence_System &x, const Congruence_System &y) |
bool | operator== (const Congruence_System &x, const Congruence_System &y) |
std::ostream & | operator<< (std::ostream &s, const Congruence_System &cgs) |
Output operator. More... | |
void | swap (Congruence_System &x, Congruence_System &y) |
void | swap (Congruence_System &x, Congruence_System &y) |
A system of congruences.
An object of the class Congruence_System is a system of congruences, i.e., a multiset of objects of the class Congruence. When inserting congruences in a system, space dimensions are automatically adjusted so that all the congruences in the system are defined on the same vector space.
x
and y
are defined as follows: x
and y
values is odd.x
axis: Definition at line 103 of file Congruence_System_defs.hh.
Definition at line 106 of file Congruence_System_defs.hh.
|
inlineexplicit |
Default constructor: builds an empty system of congruences.
Definition at line 68 of file Congruence_System_inlines.hh.
|
inlineexplicit |
Builds an empty (i.e. zero rows) system of dimension d
.
Definition at line 111 of file Congruence_System_inlines.hh.
|
inlineexplicit |
Builds the singleton system containing only congruence cg
.
Definition at line 75 of file Congruence_System_inlines.hh.
References insert().
|
inlineexplicit |
If c
represents the constraint , builds the singleton system containing only constraint
.
std::invalid_argument | Thrown if c is not an equality constraint. |
Definition at line 83 of file Congruence_System_inlines.hh.
References insert().
|
explicit |
Builds a system containing copies of any equalities in cs
.
Definition at line 41 of file Congruence_System.cc.
References Parma_Polyhedra_Library::Constraint_System::begin(), Parma_Polyhedra_Library::Constraint_System::end(), and insert().
|
inline |
Ordinary copy constructor.
Definition at line 91 of file Congruence_System_inlines.hh.
|
inline |
Copy constructor with specified representation.
Definition at line 98 of file Congruence_System_inlines.hh.
References num_rows(), representation(), and rows.
|
inline |
void Parma_Polyhedra_Library::Congruence_System::add_unit_rows_and_space_dimensions | ( | dimension_type | dims | ) |
Adds dims
rows and dims
space dimensions to the matrix, initializing the added rows as in the unit congruence system.
dims | The number of rows and space dimensions to be added: must be strictly positive. |
Turns the matrix
into the
matrix
where
is the
unit matrix of the form
. The matrix is expanded avoiding reallocation whenever possible.
Definition at line 463 of file Congruence_System.cc.
References Parma_Polyhedra_Library::Coefficient_zero(), Parma_Polyhedra_Library::Linear_Expression::set_space_dimension(), and Parma_Polyhedra_Library::swap().
Referenced by Parma_Polyhedra_Library::Grid::add_space_dimensions().
|
private |
Substitutes a given column of coefficients by a given affine expression.
v | Index of the column to which the affine transformation is substituted; |
expr | The numerator of the affine transformation: ![]() |
denominator | The denominator of the affine transformation. |
We allow affine transformations (see the Section Operations on Rational Grids) to have rational coefficients. Since the coefficients of linear expressions are integers we also provide an integer 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 substitutes the matrix of congruences by a new matrix whose elements are built from the old one
as follows:
expr
is a constant parameter and unaltered by this computation.
Definition at line 329 of file Congruence_System.cc.
References Parma_Polyhedra_Library::Variable::space_dimension(), and Parma_Polyhedra_Library::Linear_Expression::space_dimension().
void Parma_Polyhedra_Library::Congruence_System::ascii_dump | ( | std::ostream & | s | ) | const |
Writes to s
an ASCII representation of *this
.
Definition at line 342 of file Congruence_System.cc.
References Parma_Polyhedra_Library::ascii_dump(), ascii_dump(), num_rows(), and space_dimension().
void Parma_Polyhedra_Library::Congruence_System::ascii_dump | ( | ) | const |
Writes to std::cerr
an ASCII representation of *this
.
Referenced by ascii_dump(), and Parma_Polyhedra_Library::Grid::OK().
bool Parma_Polyhedra_Library::Congruence_System::ascii_load | ( | std::istream & | s | ) |
Loads from s
an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this
accordingly. Returns true
if successful, false
otherwise.
Definition at line 357 of file Congruence_System.cc.
References Parma_Polyhedra_Library::ascii_load(), Parma_Polyhedra_Library::Congruence::ascii_load(), and c.
|
inline |
Returns the const_iterator pointing to the first congruence, if this
is not empty; otherwise, returns the past-the-end const_iterator.
Definition at line 230 of file Congruence_System_inlines.hh.
References rows, and Parma_Polyhedra_Library::Congruence_System::const_iterator::skip_forward().
Referenced by Parma_Polyhedra_Library::Polyhedron::add_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::add_congruences(), Parma_Polyhedra_Library::Octagonal_Shape< T >::add_congruences(), Parma_Polyhedra_Library::Box< ITV >::add_congruences_no_check(), Parma_Polyhedra_Library::Grid::add_recycled_congruences(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::approximate_partition(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::congruences(), Parma_Polyhedra_Library::Constraint_System::Constraint_System(), Parma_Polyhedra_Library::Grid::difference_assign(), empty(), Parma_Polyhedra_Library::Grid::expand_space_dimension(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::minimized_congruences(), operator<<(), Parma_Polyhedra_Library::Congruences_Reduction< D1, D2 >::product_reduce(), Parma_Polyhedra_Library::Box< ITV >::refine_no_check(), Parma_Polyhedra_Library::Polyhedron::refine_with_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::refine_with_congruences(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_with_congruences().
|
inline |
Removes all the congruences and sets the space dimension to 0.
Definition at line 156 of file Congruence_System_inlines.hh.
References rows, and space_dimension_.
Referenced by Parma_Polyhedra_Library::Grid::conversion(), and insert().
|
private |
Concatenates copies of the congruences from y
onto *this
.
y | The congruence system to append to this . The number of rows in y must be strictly positive. |
The matrix for the new system of congruences is obtained by leaving the old system in the upper left-hand side and placing the congruences of y
in the lower right-hand side, and padding with zeroes.
Definition at line 490 of file Congruence_System.cc.
References num_rows(), rows, Parma_Polyhedra_Library::Congruence::set_representation(), Parma_Polyhedra_Library::Congruence::shift_space_dimensions(), space_dimension(), and Parma_Polyhedra_Library::swap().
|
inline |
Returns true
if and only if *this
has no congruences.
Definition at line 243 of file Congruence_System_inlines.hh.
References begin(), and end().
|
inline |
Returns the past-the-end const_iterator.
Definition at line 237 of file Congruence_System_inlines.hh.
References rows.
Referenced by Parma_Polyhedra_Library::Polyhedron::add_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::add_congruences(), Parma_Polyhedra_Library::Octagonal_Shape< T >::add_congruences(), Parma_Polyhedra_Library::Box< ITV >::add_congruences_no_check(), Parma_Polyhedra_Library::Grid::add_recycled_congruences(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::approximate_partition(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::congruences(), Parma_Polyhedra_Library::Constraint_System::Constraint_System(), Parma_Polyhedra_Library::Grid::difference_assign(), empty(), Parma_Polyhedra_Library::Grid::expand_space_dimension(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::minimized_congruences(), operator<<(), Parma_Polyhedra_Library::Congruences_Reduction< D1, D2 >::product_reduce(), Parma_Polyhedra_Library::Box< ITV >::refine_no_check(), Parma_Polyhedra_Library::Polyhedron::refine_with_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::refine_with_congruences(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_with_congruences(), and Parma_Polyhedra_Library::Congruence_System::const_iterator::skip_forward().
|
inline |
Returns the size in bytes of the memory managed by *this
.
Definition at line 258 of file Congruence_System_inlines.hh.
References rows.
|
static |
Finalizes the class.
Definition at line 400 of file Congruence_System.cc.
Referenced by Parma_Polyhedra_Library::Init::~Init().
|
private |
Returns true
if and only if any of the dimensions in *this
is free of constraint.
Any equality or proper congruence affecting a dimension constrains that dimension.
This method assumes the system is in minimal form.
Definition at line 310 of file Congruence_System.cc.
bool Parma_Polyhedra_Library::Congruence_System::has_linear_equalities | ( | ) | const |
Returns true
if and only if *this
contains one or more linear equalities.
Definition at line 232 of file Congruence_System.cc.
References num_rows().
|
inlineprivate |
Returns true
if num_rows()==0.
Definition at line 42 of file Congruence_System_inlines.hh.
References num_rows().
Referenced by Parma_Polyhedra_Library::Grid::add_recycled_congruences(), and Parma_Polyhedra_Library::Grid::intersection_assign().
|
static |
Initializes the class.
Definition at line 393 of file Congruence_System.cc.
References Parma_Polyhedra_Library::Congruence::zero_dim_false().
Referenced by Parma_Polyhedra_Library::Init::Init().
|
inline |
Inserts in *this
a copy of the congruence cg
, increasing the number of space dimensions if needed.
The copy of cg
will be strongly normalized after being inserted.
Definition at line 53 of file Congruence_System_inlines.hh.
Referenced by Congruence_System(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::congruences(), Parma_Polyhedra_Library::Box< ITV >::congruences(), Parma_Polyhedra_Library::Grid::contains_integer_point(), Parma_Polyhedra_Library::Grid::Grid(), Parma_Polyhedra_Library::Grid::intersection_assign(), Parma_Polyhedra_Library::Grid::limited_congruence_extrapolation_assign(), Parma_Polyhedra_Library::Grid::limited_extrapolation_assign(), Parma_Polyhedra_Library::Grid::limited_generator_extrapolation_assign(), Parma_Polyhedra_Library::BD_Shape< T >::minimized_congruences(), Parma_Polyhedra_Library::Octagonal_Shape< T >::minimized_congruences(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::minimized_congruences(), Parma_Polyhedra_Library::Grid::select_wider_congruences(), and Parma_Polyhedra_Library::Grid::simplify_using_context_assign().
|
inline |
Inserts in *this
the congruence cg
, stealing its contents and increasing the number of space dimensions if needed.
cg
will be strongly normalized.
Definition at line 59 of file Congruence_System_inlines.hh.
References insert_verbatim(), OK(), Parma_Polyhedra_Library::Congruence::OK(), and Parma_Polyhedra_Library::Congruence::strong_normalize().
void Parma_Polyhedra_Library::Congruence_System::insert | ( | const Constraint & | c | ) |
Inserts in *this
a copy of the equality constraint c
, seen as a modulo 0 congruence, increasing the number of space dimensions if needed.
The modulo 0 congruence will be strongly normalized after being inserted.
std::invalid_argument | Thrown if c is a relational constraint. |
Definition at line 132 of file Congruence_System.cc.
References Parma_Polyhedra_Library::Constraint::space_dimension(), Parma_Polyhedra_Library::Congruence::strong_normalize(), and Parma_Polyhedra_Library::swap().
void Parma_Polyhedra_Library::Congruence_System::insert | ( | const Congruence_System & | y | ) |
Inserts in *this
a copy of the congruences in y
, increasing the number of space dimensions if needed.
The inserted copies will be strongly normalized.
Definition at line 164 of file Congruence_System.cc.
References num_rows(), rows, space_dimension(), and Parma_Polyhedra_Library::swap().
void Parma_Polyhedra_Library::Congruence_System::insert | ( | Congruence_System & | cgs, |
Recycle_Input | |||
) |
Inserts into *this
the congruences in cgs
, increasing the number of space dimensions if needed.
Definition at line 146 of file Congruence_System.cc.
References clear(), num_rows(), rows, space_dimension(), and Parma_Polyhedra_Library::swap().
|
private |
Inserts in *this
the congruence cg
, stealing its contents and increasing the number of space dimensions if needed.
This method inserts cg
in the given form, instead of first strong normalizing cg
as insert would do.
Definition at line 111 of file Congruence_System.cc.
References Parma_Polyhedra_Library::Congruence::OK(), Parma_Polyhedra_Library::Congruence::set_representation(), Parma_Polyhedra_Library::Congruence::set_space_dimension(), Parma_Polyhedra_Library::Congruence::space_dimension(), and Parma_Polyhedra_Library::swap().
Referenced by Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::Grid::expand_space_dimension(), insert(), and Parma_Polyhedra_Library::Grid::simplify().
bool Parma_Polyhedra_Library::Congruence_System::is_equal_to | ( | const Congruence_System & | y | ) | const |
Returns true
if and only if *this
is exactly equal to y
.
Definition at line 227 of file Congruence_System.cc.
|
inline |
Swaps *this
with y
.
Definition at line 248 of file Congruence_System_inlines.hh.
References OK(), representation_, rows, space_dimension_, swap(), and Parma_Polyhedra_Library::swap().
Referenced by swap().
|
inlinestatic |
Returns the maximum space dimension a Congruence_System can handle.
Definition at line 146 of file Congruence_System_inlines.hh.
References Parma_Polyhedra_Library::Congruence::max_space_dimension().
Referenced by Parma_Polyhedra_Library::Grid::max_space_dimension().
|
private |
Adjusts all expressions to have the same moduli.
Definition at line 186 of file Congruence_System.cc.
References Parma_Polyhedra_Library::exact_div_assign(), Parma_Polyhedra_Library::lcm_assign(), num_rows(), and PPL_DIRTY_TEMP_COEFFICIENT.
Referenced by Parma_Polyhedra_Library::Grid::simplify().
PPL::dimension_type Parma_Polyhedra_Library::Congruence_System::num_equalities | ( | ) | const |
Returns the number of equalities.
Definition at line 251 of file Congruence_System.cc.
Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PSET >::approximate_partition_aux(), Parma_Polyhedra_Library::Grid::congruence_widening_assign(), Parma_Polyhedra_Library::Grid_Certificate::Grid_Certificate(), and Parma_Polyhedra_Library::Grid::quick_equivalence_test().
PPL::dimension_type Parma_Polyhedra_Library::Congruence_System::num_proper_congruences | ( | ) | const |
Returns the number of proper congruences.
Definition at line 263 of file Congruence_System.cc.
References Parma_Polyhedra_Library::Congruence::is_proper_congruence().
Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PSET >::approximate_partition_aux(), and Parma_Polyhedra_Library::Grid_Certificate::Grid_Certificate().
|
inlineprivate |
Returns the number of rows in the system.
Definition at line 37 of file Congruence_System_inlines.hh.
References rows.
Referenced by ascii_dump(), concatenate(), Congruence_System(), Parma_Polyhedra_Library::Grid::congruence_widening_assign(), Parma_Polyhedra_Library::Grid::construct(), Parma_Polyhedra_Library::Grid::conversion(), has_linear_equalities(), has_no_rows(), insert(), Parma_Polyhedra_Library::Grid::is_included_in(), Parma_Polyhedra_Library::Grid::limited_congruence_extrapolation_assign(), Parma_Polyhedra_Library::Grid::limited_extrapolation_assign(), Parma_Polyhedra_Library::Grid::limited_generator_extrapolation_assign(), Parma_Polyhedra_Library::Grid::lower_triangular(), normalize_moduli(), operator==(), Parma_Polyhedra_Library::Grid::quick_equivalence_test(), remove_trailing_rows(), set_representation(), Parma_Polyhedra_Library::Grid::simplify(), and Parma_Polyhedra_Library::Grid::simplify_using_context_assign().
bool Parma_Polyhedra_Library::Congruence_System::OK | ( | ) | const |
Checks if all the invariants are satisfied.
Returns true
if and only if all rows have space dimension space_dimension_, each row in the system is a valid Congruence and the space dimension is consistent with the number of congruences.
Definition at line 407 of file Congruence_System.cc.
References Parma_Polyhedra_Library::Congruence::OK(), Parma_Polyhedra_Library::Congruence::representation(), and Parma_Polyhedra_Library::Congruence::space_dimension().
Referenced by Parma_Polyhedra_Library::Grid::construct(), Parma_Polyhedra_Library::Grid::conversion(), insert(), m_swap(), set_representation(), and Parma_Polyhedra_Library::Grid::simplify().
|
inline |
Assignment operator.
Definition at line 122 of file Congruence_System_inlines.hh.
References swap().
|
inlineprivate |
Returns a constant reference to the k-
th congruence of the system.
Definition at line 32 of file Congruence_System_inlines.hh.
References rows.
void Parma_Polyhedra_Library::Congruence_System::permute_space_dimensions | ( | const std::vector< Variable > & | cycle | ) |
Permutes the space dimensions of the system.
cycle | A vector representing a cycle of the permutation according to which the columns must be rearranged. |
The cycle
vector represents a cycle of a permutation of space dimensions. For example, the permutation can be represented by the vector containing
.
Definition at line 56 of file Congruence_System.cc.
References Parma_Polyhedra_Library::Congruence::permute_space_dimensions().
Referenced by Parma_Polyhedra_Library::Grid::map_space_dimensions().
void Parma_Polyhedra_Library::Congruence_System::print | ( | ) | const |
Prints *this
to std::cerr
using operator<<
.
|
private |
Makes the system shrink by removing the rows in [first,last).
If keep_sorted
is true
, the ordering of the remaining rows will be preserved.
Definition at line 65 of file Congruence_System.cc.
References Parma_Polyhedra_Library::swap().
|
inlineprivate |
Definition at line 47 of file Congruence_System_inlines.hh.
References num_rows(), and rows.
Referenced by Parma_Polyhedra_Library::Grid::simplify().
|
inline |
Returns the current representation of *this.
Definition at line 129 of file Congruence_System_inlines.hh.
References representation_.
Referenced by Congruence_System().
|
protected |
Returns true
if g
satisfies all the congruences.
Definition at line 277 of file Congruence_System.cc.
References Parma_Polyhedra_Library::Scalar_Products::assign(), Parma_Polyhedra_Library::Grid_Generator::divisor(), Parma_Polyhedra_Library::Congruence::is_equality(), Parma_Polyhedra_Library::Grid_Generator::is_line(), Parma_Polyhedra_Library::Congruence::modulus(), PPL_DIRTY_TEMP_COEFFICIENT, and Parma_Polyhedra_Library::Grid_Generator::space_dimension().
Referenced by Parma_Polyhedra_Library::Grid::is_included_in().
|
inline |
Converts *this to the specified representation.
Definition at line 134 of file Congruence_System_inlines.hh.
References num_rows(), OK(), representation_, and rows.
bool Parma_Polyhedra_Library::Congruence_System::set_space_dimension | ( | dimension_type | new_space_dim | ) |
Sets the number of space dimensions to new_space_dim
.
If new_space_dim
is lower than the current space dimension, the coefficients referring to the removed space dimensions are lost.
Definition at line 92 of file Congruence_System.cc.
Referenced by Parma_Polyhedra_Library::Grid::add_space_dimensions(), Parma_Polyhedra_Library::Grid::construct(), Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::Grid::Grid(), Parma_Polyhedra_Library::Grid::remove_higher_space_dimensions(), and Parma_Polyhedra_Library::Grid::set_empty().
|
inline |
Returns the dimension of the vector space enclosing *this
.
Definition at line 151 of file Congruence_System_inlines.hh.
References space_dimension_.
Referenced by Parma_Polyhedra_Library::Box< ITV >::add_congruences(), Parma_Polyhedra_Library::Polyhedron::add_congruences(), Parma_Polyhedra_Library::Grid::add_congruences(), Parma_Polyhedra_Library::Box< ITV >::add_congruences_no_check(), Parma_Polyhedra_Library::Grid::add_recycled_congruences(), Parma_Polyhedra_Library::Grid::add_space_dimensions(), ascii_dump(), Parma_Polyhedra_Library::Box< ITV >::Box(), concatenate(), Parma_Polyhedra_Library::Grid::construct(), Parma_Polyhedra_Library::Grid::conversion(), insert(), Parma_Polyhedra_Library::Grid::limited_congruence_extrapolation_assign(), Parma_Polyhedra_Library::Grid::limited_extrapolation_assign(), Parma_Polyhedra_Library::Grid::limited_generator_extrapolation_assign(), Parma_Polyhedra_Library::Grid::lower_triangular(), Parma_Polyhedra_Library::Octagonal_Shape< T >::Octagonal_Shape(), Parma_Polyhedra_Library::Box< ITV >::refine_no_check(), Parma_Polyhedra_Library::Box< ITV >::refine_with_congruences(), Parma_Polyhedra_Library::Polyhedron::refine_with_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::refine_with_congruences(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_with_congruences(), Parma_Polyhedra_Library::Grid::select_wider_congruences(), Parma_Polyhedra_Library::Grid::simplify(), Parma_Polyhedra_Library::Box< ITV >::throw_dimension_incompatible(), Parma_Polyhedra_Library::Grid::throw_dimension_incompatible(), and Parma_Polyhedra_Library::Polyhedron::throw_dimension_incompatible().
Swaps the columns having indexes i
and j
.
Definition at line 104 of file Congruence_System.cc.
|
inline |
Returns the total size in bytes of the memory occupied by *this
.
Definition at line 263 of file Congruence_System_inlines.hh.
References rows.
|
inlinestatic |
Returns the system containing only Congruence::zero_dim_false().
Definition at line 162 of file Congruence_System_inlines.hh.
References zero_dim_empty_p.
Referenced by Parma_Polyhedra_Library::Box< ITV >::congruences(), Parma_Polyhedra_Library::BD_Shape< T >::minimized_congruences(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::minimized_congruences().
|
friend |
Definition at line 516 of file Congruence_System_defs.hh.
|
related |
Definition at line 428 of file Congruence_System.cc.
References begin(), end(), and Parma_Polyhedra_Library::Congruence::strong_normalize().
|
related |
Output operator.
Writes true
if cgs
is empty. Otherwise, writes on s
the congruences of cgs
, all in one row and separated by ", ".
|
related |
|
related |
Definition at line 448 of file Congruence_System.cc.
References num_rows().
|
friend |
|
related |
Definition at line 269 of file Congruence_System_inlines.hh.
References m_swap().
|
related |
Referenced by m_swap(), and operator=().
|
static |
Definition at line 108 of file Congruence_System_defs.hh.
|
private |
Definition at line 503 of file Congruence_System_defs.hh.
Referenced by m_swap(), representation(), and set_representation().
|
private |
Definition at line 499 of file Congruence_System_defs.hh.
Referenced by begin(), clear(), concatenate(), Congruence_System(), Parma_Polyhedra_Library::Grid::construct(), Parma_Polyhedra_Library::Grid::conversion(), end(), external_memory_in_bytes(), insert(), m_swap(), num_rows(), operator[](), remove_trailing_rows(), set_representation(), Parma_Polyhedra_Library::Grid::simplify(), and total_memory_in_bytes().
|
private |
Definition at line 501 of file Congruence_System_defs.hh.
Referenced by clear(), m_swap(), and space_dimension().
|
staticprivate |
Holds (between class initialization and finalization) a pointer to the singleton system containing only Congruence::zero_dim_false().
Definition at line 497 of file Congruence_System_defs.hh.
Referenced by zero_dim_empty().