24 #ifndef PPL_Expression_Hide_Inhomo_inlines_hh
25 #define PPL_Expression_Hide_Inhomo_inlines_hh 1
37 inline Coefficient_traits::const_reference
47 return this->inner().all_homogeneous_terms_are_zero();
51 template <
typename Expression>
60 if (y.inhomogeneous_term() != 0) {
64 return this->inner().is_equal_to(y, 1, x_dim + 1);
68 inline Coefficient_traits::const_reference
74 return this->inner().get(i);
79 inline Coefficient_traits::const_reference
81 return this->inner().get(v);
88 return this->inner().all_zeroes(vars);
101 return this->inner().all_zeroes(start, end);
104 template <
typename T>
116 nz += this->inner().num_zeroes(start, end);
120 template <
typename T>
130 return this->inner().gcd(start, end);
133 template <
typename T>
136 return this->inner().last_nonzero();
139 template <
typename T>
149 return this->inner().last_nonzero(first, last);
152 template <
typename T>
162 return this->inner().first_nonzero(first, last);
165 template <
typename T>
176 return this->inner().all_zeroes_except(vars, start, end);
179 template <
typename T>
183 bool had_0 = (y.count(0) == 1);
184 this->inner().has_a_free_dimension_helper(y);
190 template <
typename T>
191 template <
typename Expression>
202 return this->inner().is_equal_to(y, start, end);
205 template <
typename T>
206 template <
typename Expression>
210 Coefficient_traits::const_reference c1,
211 Coefficient_traits::const_reference c2,
219 return this->inner().is_equal_to(y, c1, c2, start, end);
222 template <
typename T>
225 this->inner().get_row(r);
229 template <
typename T>
232 this->inner().get_row(r);
238 #endif // !defined(PPL_Expression_Hide_Inhomo_inlines_hh)
Coefficient_traits::const_reference inhomogeneous_term() const
Returns the constant zero.
bool is_equal_to(const Expression &y) const
Returns true if *this is equal to y.
T::raw_type raw_type
The raw, completely unwrapped type.
Expression_Hide_Inhomo(const raw_type &expr)
Constructor.
A finite sequence of coefficients.
size_t dimension_type
An unsigned integral type for representing space dimensions.
An std::set of variables' indexes.
An adapter for Linear_Expression objects.
void get_row(Dense_Row &r) const
Sets r to a copy of the row as adapted by *this.
iterator reset(iterator i)
Resets to zero the value pointed to by i.
bool all_zeroes(const Variables_Set &vars) const
Returns true if the coefficient of each variable in vars is zero.
A finite sparse sequence of coefficients.
Coefficient gcd(dimension_type start, dimension_type end) const
Returns the gcd of the nonzero coefficients in [start,end). If all the coefficients in this range are...
A dimension of the vector space.
void reset(dimension_type i)
dimension_type first_nonzero(dimension_type first, dimension_type last) const
void has_a_free_dimension_helper(std::set< dimension_type > &x) const
Removes from set x all the indexes of nonzero elements in *this.
dimension_type last_nonzero() const
Coefficient_traits::const_reference get(dimension_type i) const
Returns the i-th coefficient.
PPL_COEFFICIENT_TYPE Coefficient
An alias for easily naming the type of PPL coefficients.
Coefficient_traits::const_reference Coefficient_zero()
Returns a const reference to a Coefficient with value 0.
The entire library is confined to this namespace.
dimension_type num_zeroes(dimension_type start, dimension_type end) const
Returns the number of zero coefficient in [start, end).
bool all_zeroes_except(const Variables_Set &vars, dimension_type start, dimension_type end) const
Returns true if all coefficients in [start,end), except those corresponding to variables in vars...
bool is_zero() const
Returns true if and only if *this is zero.