24 #ifndef PPL_Congruence_inlines_hh
25 #define PPL_Congruence_inlines_hh 1
39 : expr(cg.expr), modulus_(cg.modulus_) {
44 : expr(cg.expr, r), modulus_(cg.modulus_) {
50 : expr(cg.expr, new_space_dimension), modulus_(cg.modulus_) {
58 : expr(cg.expr, new_space_dimension, r), modulus_(cg.modulus_) {
94 Coefficient_traits::const_reference m,
105 Coefficient_traits::const_reference n,
209 inline Coefficient_traits::const_reference
222 inline Coefficient_traits::const_reference
227 inline Coefficient_traits::const_reference
285 #endif // !defined(PPL_Congruence_inlines_hh)
A transparent adapter for Linear_Expression objects.
Congruence & operator/=(Coefficient_traits::const_reference k)
Multiplies k into the modulus of *this.
Congruence & operator=(const Congruence &y)
Assignment operator.
Coefficient_traits::const_reference modulus() const
Returns a const reference to the modulus of *this.
A linear equality or inequality.
void swap(CO_Tree &x, CO_Tree &y)
void set_space_dimension(dimension_type n)
Sets the dimension of the vector space enclosing *this to n .
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool is_equal_at_dimension(Variable v, const Congruence &cg) const
Returns true if *this is equal to cg in dimension v.
Coefficient_traits::const_reference inhomogeneous_term() const
Returns the inhomogeneous term of *this.
void strong_normalize()
Calls normalize, then divides out common factors.
void m_swap(Congruence &y)
Swaps *this with y.
expr_type expression() const
Partial read access to the (adapted) internal expression.
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
Coefficient_traits::const_reference inhomogeneous_term() const
Returns the inhomogeneous term of *this.
bool is_equal_to(const Linear_Expression &x) const
Coefficient_traits::const_reference coefficient(Variable v) const
Returns the coefficient of v in *this.
bool is_proper_congruence() const
Returns true if the modulus is greater than zero.
void swap_space_dimensions(Variable v1, Variable v2)
Swaps the coefficients of the variables v1 and v2 .
void set_representation(Representation r)
Converts *this to the specified representation.
static dimension_type max_space_dimension()
Returns the maximum space dimension a Congruence can handle.
static const Congruence & zero_dim_false()
Returns a reference to the false (zero-dimension space) congruence .
A dimension of the vector space.
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
static dimension_type max_space_dimension()
Returns the maximum space dimension a Linear_Expression can handle.
static Congruence create(const Linear_Expression &e1, const Linear_Expression &e2, Representation r=default_representation)
Returns the congruence .
static const Congruence & zero_dim_integrality()
Returns a reference to the true (zero-dimension space) congruence , also known as the integrality con...
bool OK() const
Checks if all the invariants are satisfied.
void permute_space_dimensions(const std::vector< Variable > &cycle)
Permutes the space dimensions of the expression.
void set_representation(Representation r)
Converts *this to the specified representation.
void set_modulus(Coefficient_traits::const_reference m)
void swap(Congruence &x, Congruence &y)
bool is_equality() const
Returns true if *this is an equality.
Congruence operator%=(const Linear_Expression &e1, const Linear_Expression &e2)
static const Congruence * zero_dim_false_p
Holds (between class initialization and finalization) a pointer to the false (zero-dimension space) c...
Enable_If< Is_Native< T >::value, memory_size_type >::type external_memory_in_bytes(const T &)
For native types, returns the size in bytes of the memory managed by the type of the (unused) paramet...
Congruence(Representation r=default_representation)
Constructs the 0 = 0 congruence with space dimension 0 .
void throw_dimension_incompatible(const char *method, const char *v_name, Variable v) const
Throws a std::invalid_argument exception containing the appropriate error message.
void swap_space_dimensions(Variable v1, Variable v2)
Swaps the coefficients of the variables v1 and v2 .
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
Congruence operator/(const Congruence &cg, Coefficient_traits::const_reference k)
void permute_space_dimensions(const std::vector< Variable > &cycles)
Congruence operator/(const Constraint &c, Coefficient_traits::const_reference m)
The entire library is confined to this namespace.
Representation representation() const
Returns the current representation of *this.
bool operator==(const Congruence &x, const Congruence &y)
Congruence operator%=(const Linear_Expression &e, Coefficient_traits::const_reference n)
Representation representation() const
Returns the current representation of *this.
void shift_space_dimensions(Variable v, dimension_type n)
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
bool operator!=(const Congruence &x, const Congruence &y)
Coefficient_traits::const_reference coefficient(Variable v) const
Returns the coefficient of v in *this.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
Expression_Adapter_Transparent< Linear_Expression > expr_type
The type of the (adapted) internal expression.
void set_space_dimension(dimension_type n)
bool le(Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
memory_size_type total_memory_in_bytes() const
Returns a lower bound to the total size in bytes of the memory occupied by *this. ...
static const Congruence * zero_dim_integrality_p
Holds (between class initialization and finalization) a pointer to the true (zero-dimension space) co...
void shift_space_dimensions(Variable v, dimension_type n)