24 #ifndef PPL_Matrix_defs_hh
25 #define PPL_Matrix_defs_hh 1
33 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
34 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
36 template <
typename Row>
347 const_iterator
begin()
const;
353 const_iterator
end()
const;
411 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
413 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
414 template <
typename Row>
417 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
420 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
421 template <
typename Row>
424 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
427 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
428 template <
typename Row>
437 #endif // !defined(PPL_Matrix_defs_hh)
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
void swap(CO_Tree &x, CO_Tree &y)
void swap_columns(dimension_type i, dimension_type j)
Swaps the columns having indexes i and j.
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool ascii_load(std::istream &s)
Loads the row from an ASCII representation generated using ascii_dump().
static dimension_type max_num_columns()
Returns the maximum number of columns of a Sparse_Matrix.
iterator end()
Returns an iterator pointing after the last row.
void remove_trailing_columns(dimension_type n)
Shrinks the matrix by removing its n trailing columns.
Matrix(dimension_type n=0)
Constructs a square matrix with the given size, filled with unstored zeroes.
Swapping_Vector< Row >::iterator iterator
A sparse matrix of Coefficient.
void permute_columns(const std::vector< dimension_type > &cycles)
Permutes the columns of the matrix.
Swapping_Vector< Row >::const_iterator const_iterator
memory_size_type total_memory_in_bytes() const
Returns the total size in bytes of the memory occupied by *this.
void add_zero_rows_and_columns(dimension_type n, dimension_type m)
Adds n rows and m columns of zeroes to the matrix.
void add_zero_rows(dimension_type n)
Adds to the matrix n rows of zeroes.
void clear()
Equivalent to resize(0,0).
#define PPL_OUTPUT_DECLARATIONS
void remove_rows(iterator first, iterator last)
iterator begin()
Returns an iterator pointing to the first row.
void add_row(const Row &x)
Adds a copy of the row x at the end of the matrix.
dimension_type num_columns() const
Returns the number of columns in the matrix.
bool has_no_rows() const
Returns true if and only if *this has no rows.
void remove_trailing_rows(dimension_type n)
Removes from the matrix the last n rows.
dimension_type num_columns_
The number of columns in this matrix.
static dimension_type max_num_rows()
Returns the maximum number of rows of a Sparse_Matrix.
The entire library is confined to this namespace.
Swapping_Vector< Row > rows
The vector that stores the matrix's elements.
Row & operator[](dimension_type i)
Returns a reference to the i-th row.
dimension_type capacity() const
Returns the capacity of the row vector.
void reserve_rows(dimension_type n)
Reserves space for at least n rows.
void add_recycled_row(Row &y)
Adds the row y to the matrix.
void resize(dimension_type n)
Equivalent to resize(n, n).
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 OK() const
Checks if all the invariants are satisfied.
void remove_column(dimension_type i)
Removes the i-th from the matrix, shifting other columns to the left.
void add_zero_columns(dimension_type n)
Adds n columns of zeroes to the matrix.
dimension_type num_rows() const
Returns the number of rows in the matrix.
void m_swap(Matrix &x)
Swaps (*this) with x.