24 #ifndef PPL_Dense_Row_defs_hh
25 #define PPL_Dense_Row_defs_hh 1
38 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
41 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
230 Coefficient_traits::const_reference x);
258 template <
typename Func1,
typename Func2>
260 const Func1& f,
const Func2& g);
286 template <
typename Func1,
typename Func2>
288 const Func1& g,
const Func2& h);
318 template <
typename Func1,
typename Func2,
typename Func3>
320 const Func1& f,
const Func2& g,
const Func3& h);
343 Coefficient_traits::const_reference coeff1,
344 Coefficient_traits::const_reference coeff2);
355 Coefficient_traits::const_reference c1,
356 Coefficient_traits::const_reference c2,
445 Coefficient_traits::const_reference
operator*()
const;
485 Coefficient_traits::const_reference
operator*()
const;
515 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
518 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
521 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
524 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
525 void iter_swap(std::vector<Dense_Row>::iterator x,
526 std::vector<Dense_Row>::iterator y);
528 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
531 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
534 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
537 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
540 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
542 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
544 Coefficient_traits::const_reference coeff1,
545 Coefficient_traits::const_reference coeff2);
547 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
551 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
553 Coefficient_traits::const_reference c1,
554 Coefficient_traits::const_reference c2,
562 #endif // !defined(PPL_Dense_Row_defs_hh)
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
void swap(CO_Tree &x, CO_Tree &y)
bool operator!=(const iterator &x) const
A finite sequence of coefficients.
std::ptrdiff_t difference_type
memory_size_type external_memory_in_bytes() const
Returns a lower bound to the size in bytes of the memory managed by *this.
Dense_Row & operator=(const Dense_Row &y)
Assignment operator.
size_t dimension_type
An unsigned integral type for representing space dimensions.
void normalize()
Normalizes the modulo of coefficients so that they are mutually prime.
void linear_combine(Dense_Row &x, const Dense_Row &y, Coefficient_traits::const_reference coeff1, Coefficient_traits::const_reference coeff2)
std::allocator< Coefficient > coeff_allocator
The allocator used to allocate/deallocate vec.
void combine(const Dense_Row &y, const Func1 &f, const Func2 &g, const Func3 &h)
Calls g(x[i],y[i]), for each i.
void linear_combine(const Dense_Row &y, Coefficient_traits::const_reference coeff1, Coefficient_traits::const_reference coeff2)
Dense_Row()
Constructs an empty row.
void swap_coefficients(dimension_type i, dimension_type j)
A finite sparse sequence of coefficients.
Coefficient_traits::const_reference reference
memory_size_type total_memory_in_bytes() const
Returns a lower bound to the total size in bytes of the memory occupied by *this. ...
const_iterator & operator++()
void reset(dimension_type i)
Coefficient_traits::const_reference operator*() const
dimension_type size() const
Gives the number of coefficients currently in use.
#define PPL_OUTPUT_DECLARATIONS
dimension_type size
The number of coefficients in the row.
Coefficient & operator[](dimension_type k)
Returns a reference to the element of the row indexed by k.
static dimension_type max_size()
Returns the size() of the largest possible Dense_Row.
void add_zeroes_and_shift(dimension_type n, dimension_type i)
Adds n zeroes before index i.
const Coefficient value_type
dimension_type index() const
Returns the index of the element pointed to by *this.
bool operator==(const const_iterator &x) const
void m_swap(Dense_Row &y)
Swaps *this with y.
void clear()
Resets all the elements of this row.
dimension_type index() const
Returns the index of the element pointed to by *this.
PPL_COEFFICIENT_TYPE Coefficient
An alias for easily naming the type of PPL coefficients.
iterator find(dimension_type i)
Provided for compatibility with Sparse_Row.
bool operator==(const iterator &x) const
void expand_within_capacity(dimension_type new_size)
Expands the row to size new_size.
void init(const Sparse_Row &row)
void shrink(dimension_type new_size)
Shrinks the row by erasing elements at the end.
bool OK() const
Checks if all the invariants are satisfied.
The entire library is confined to this namespace.
std::bidirectional_iterator_tag iterator_category
iterator lower_bound(dimension_type i)
Provided for compatibility with Sparse_Row.
const_iterator & operator--()
void combine_needs_first(const Dense_Row &y, const Func1 &f, const Func2 &g)
Calls g(x[i],y[i]), for each i.
void combine_needs_second(const Dense_Row &y, const Func1 &g, const Func2 &h)
Calls g(x[i],y[i]), for each i.
void resize(dimension_type sz)
Resizes the row to sz.
dimension_type capacity
The capacity of the row.
iterator insert(dimension_type i, Coefficient_traits::const_reference x)
Provided for compatibility with Sparse_Row.
dimension_type capacity() const
Returns the capacity of the row.
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 ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
Coefficient & operator*()
bool operator!=(const const_iterator &x) const
std::ptrdiff_t difference_type