24 #ifndef PPL_Congruence_System_inlines_hh
25 #define PPL_Congruence_System_inlines_hh 1
31 inline const Congruence&
93 space_dimension_(cgs.space_dimension_),
94 representation_(cgs.representation_) {
101 space_dimension_(cgs.space_dimension_),
140 rows[i].set_representation(r);
174 : i(y.i), csp(y.csp) {
195 return i.operator->();
226 : i(iter), csp(&cgs.
rows) {
259 return rows.external_memory_in_bytes();
264 return rows.external_memory_in_bytes() +
sizeof(*this);
275 #endif // !defined(PPL_Congruence_System_inlines_hh)
void remove_trailing_rows(dimension_type n)
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...
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 strong_normalize()
Calls normalize, then divides out common factors.
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().
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.
const_iterator & operator++()
Prefix increment operator.
static dimension_type max_space_dimension()
Returns the maximum space dimension a Congruence can handle.
const Congruence & operator*() const
Dereference operator.
bool OK() const
Checks if all the invariants are satisfied.
Swapping_Vector< Congruence > rows
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.
const_iterator begin() const
Returns the const_iterator pointing to the first congruence, if this is not empty; otherwise...
void swap(Congruence_System &x, Congruence_System &y)
Congruence_System & operator=(const Congruence_System &y)
Assignment operator.
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.
std::vector< T >::const_iterator const_iterator
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.
bool operator==(const const_iterator &y) const
Returns true if and only if *this and y are identical.
void clear()
Removes all the congruences and sets the space dimension to 0.