24 #ifndef PPL_Congruence_System_defs_hh
25 #define PPL_Congruence_System_defs_hh 1
42 operator==(
const Congruence_System& x,
const Congruence_System& y);
251 :
public std::iterator<std::forward_iterator_tag,
324 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
330 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
457 Coefficient_traits::const_reference denominator);
524 namespace IO_Operators {
539 swap(Congruence_System& x, Congruence_System& y);
545 #endif // !defined(PPL_Congruence_System_defs_hh)
void remove_trailing_rows(dimension_type n)
void swap_space_dimensions(Variable v1, Variable v2)
Swaps the columns having indexes i and j.
A linear equality or inequality.
void swap(CO_Tree &x, CO_Tree &y)
Representation representation_
void set_representation(Representation r)
Converts *this to the specified representation.
static dimension_type max_space_dimension()
Returns the maximum space dimension a Congruence_System can handle.
size_t dimension_type
An unsigned integral type for representing space dimensions.
void insert(const Congruence &cg)
Inserts in *this a copy of the congruence cg, increasing the number of space dimensions if needed...
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
const Congruence * operator->() const
Indirect member selector.
bool operator!=(const const_iterator &y) const
Returns true if and only if *this and y are different.
void concatenate(const Congruence_System &y)
Concatenates copies of the congruences from y onto *this.
bool set_space_dimension(dimension_type new_space_dim)
Sets the number of space dimensions to new_space_dim.
std::ostream & operator<<(std::ostream &s, const Ask_Tell< D > &x)
const_iterator end() const
Returns the past-the-end const_iterator.
static const Congruence_System & zero_dim_empty()
Returns the system containing only Congruence::zero_dim_false().
dimension_type num_equalities() const
Returns the number of equalities.
void insert_verbatim(Congruence &cg, Recycle_Input)
Inserts in *this the congruence cg, stealing its contents and increasing the number of space dimensio...
const_iterator()
Default constructor.
const_iterator & operator=(const const_iterator &y)
Assignment operator.
void normalize_moduli()
Adjusts all expressions to have the same moduli.
const_iterator & operator++()
Prefix increment operator.
A dimension of the vector space.
bool satisfies_all_congruences(const Grid_Generator &g) const
Returns true if g satisfies all the congruences.
const Congruence & operator*() const
Dereference operator.
Swapping_Vector< Congruence > rows
#define PPL_OUTPUT_DECLARATIONS
static void initialize()
Initializes the class.
dimension_type space_dimension_
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
const Swapping_Vector< Congruence > * csp
A const pointer to the vector of congruences.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
const Congruence & operator[](dimension_type k) const
Returns a constant reference to the k- th congruence of the system.
memory_size_type total_memory_in_bytes() const
Returns the total size in bytes of the memory occupied by *this.
Representation representation() const
Returns the current representation of *this.
bool OK() const
Checks if all the invariants are satisfied.
dimension_type num_proper_congruences() const
Returns the number of proper congruences.
const_iterator begin() const
Returns the const_iterator pointing to the first congruence, if this is not empty; otherwise...
bool has_linear_equalities() const
Returns true if and only if *this contains one or more linear equalities.
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.
Congruence_System & operator=(const Congruence_System &y)
Assignment operator.
static const Representation default_representation
void permute_space_dimensions(const std::vector< Variable > &cycle)
Permutes the space dimensions of the system.
static const Congruence_System * zero_dim_empty_p
Holds (between class initialization and finalization) a pointer to the singleton system containing on...
The entire library is confined to this namespace.
~Congruence_System()
Destructor.
An iterator over a system of congruences.
dimension_type num_rows() const
Returns the number of rows in the system.
~const_iterator()
Destructor.
bool empty() const
Returns true if and only if *this has no congruences.
bool has_a_free_dimension() const
Returns true if and only if any of the dimensions in *this is free of constraint. ...
std::vector< T >::const_iterator const_iterator
Sparse representation: only the nonzero coefficient are stored. If there are many nonzero coefficient...
bool is_equal_to(const Congruence_System &y) const
Returns true if and only if *this is exactly equal to y.
bool operator==(const Box< ITV > &x, const Box< ITV > &y)
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
bool has_no_rows() const
Returns true if num_rows()==0.
Congruence_System(Representation r=default_representation)
Default constructor: builds an empty system of congruences.
Swapping_Vector< Congruence >::const_iterator i
The const iterator over the vector of congruences.
void skip_forward()
*this skips to the next non-trivial congruence.
void m_swap(Congruence_System &y)
Swaps *this with y.
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 co...
void remove_rows(dimension_type first, dimension_type last, bool keep_sorted)
Makes the system shrink by removing the rows in [first,last).
bool operator==(const const_iterator &y) const
Returns true if and only if *this and y are identical.
A grid line, parameter or grid point.
friend bool operator==(const Congruence_System &x, const Congruence_System &y)
void clear()
Removes all the congruences and sets the space dimension to 0.
static void finalize()
Finalizes the class.