24 #ifndef PPL_Expression_Adapter_inlines_hh
25 #define PPL_Expression_Adapter_inlines_hh 1
46 return inner().representation();
52 return inner().begin();
64 return inner().lower_bound(v);
70 return inner().space_dimension();
74 inline Coefficient_traits::const_reference
76 return inner().coefficient(v);
80 inline Coefficient_traits::const_reference
82 return inner().inhomogeneous_term();
88 return inner().is_zero();
94 return inner().all_homogeneous_terms_are_zero();
98 template <
typename Expression>
101 return inner().is_equal_to(y);
104 template <
typename T>
108 return inner().all_zeroes(vars);
111 template <
typename T>
112 inline Coefficient_traits::const_reference
114 return inner().get(i);
117 template <
typename T>
118 inline Coefficient_traits::const_reference
120 return inner().get(v);
123 template <
typename T>
127 return inner().all_zeroes(start, end);
130 template <
typename T>
134 return inner().num_zeroes(start, end);
137 template <
typename T>
141 return inner().gcd(start, end);
144 template <
typename T>
147 return inner().last_nonzero();
150 template <
typename T>
154 return inner().last_nonzero(first, last);
157 template <
typename T>
161 return inner().first_nonzero(first, last);
164 template <
typename T>
169 return inner().all_zeroes_except(vars, start, end);
172 template <
typename T>
176 inner().has_a_free_dimension_helper(x);
179 template <
typename T>
180 template <
typename Expression>
185 return inner().is_equal_to(y, start, end);
188 template <
typename T>
189 template <
typename Expression>
193 Coefficient_traits::const_reference c1,
194 Coefficient_traits::const_reference c2,
196 return inner().is_equal_to(y, c1, c2, start, end);
199 template <
typename T>
205 template <
typename T>
211 template <
typename T>
212 template <
typename Expression>
217 return inner().have_a_common_variable(y, first, last);
220 template <
typename T>
229 #endif // !defined(PPL_Expression_Adapter_inlines_hh)
T::raw_type raw_type
The raw, completely unwrapped type.
dimension_type last_nonzero() const
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.
T::const_reference inner_type
The type obtained by one-level unwrapping.
Expression_Adapter(const raw_type &expr)
Constructor.
bool all_zeroes(const Variables_Set &vars) const
Returns true if the coefficient of each variable in vars is zero.
bool is_equal_to(const Expression &y) const
Returns true if *this is equal to y.
A finite sparse sequence of coefficients.
void has_a_free_dimension_helper(std::set< dimension_type > &x) const
Removes from set x all the indexes of nonzero elements in *this.
A dimension of the vector space.
raw_type::const_iterator const_iterator
The type of const iterators on coefficients.
dimension_type num_zeroes(dimension_type start, dimension_type end) const
Returns the number of zero coefficient in [start, end).
dimension_type first_nonzero(dimension_type first, dimension_type last) const
Expression_Adapter_Transparent(const raw_type &expr)
Constructor.
inner_type inner() const
Returns an adapter after one-level unwrapping.
Representation representation() const
Returns the current representation of *this.
PPL_COEFFICIENT_TYPE Coefficient
An alias for easily naming the type of PPL coefficients.
Coefficient_traits::const_reference coefficient(Variable v) const
Returns the coefficient of v in *this.
bool have_a_common_variable(const Expression &y, Variable first, Variable last) const
Coefficient_traits::const_reference get(dimension_type i) const
Returns the i -th coefficient.
bool is_zero() const
Returns true if and only if *this is zero.
The entire library is confined to this namespace.
const_iterator lower_bound(Variable v) const
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...
void get_row(Dense_Row &r) const
Sets r to a copy of the row as adapted by *this.
bool all_homogeneous_terms_are_zero() const
Returns true if and only if all the homogeneous terms of *this are zero.
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
const_iterator begin() const
Iterator pointing to the first nonzero variable coefficient.
Coefficient gcd(dimension_type start, dimension_type end) const
Returns the gcd of the nonzero coefficients in [start,end). Returns zero if all the coefficients in t...
Coefficient_traits::const_reference inhomogeneous_term() const
Returns the inhomogeneous term of *this.
const_iterator end() const
Iterator pointing after the last nonzero variable coefficient.