24 #ifndef PPL_Bit_Matrix_defs_hh
25 #define PPL_Bit_Matrix_defs_hh 1
35 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
38 void swap(Bit_Matrix& x, Bit_Matrix& y);
39 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
43 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
46 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
165 template <
typename Row>
171 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
174 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
177 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
180 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
187 #endif // !defined(PPL_Bit_Matrix_defs_hh)
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
void swap(CO_Tree &x, CO_Tree &y)
bool operator()(const Bit_Row &x, const Bit_Row &y) const
The base class for systems of constraints and generators.
size_t dimension_type
An unsigned integral type for representing space dimensions.
void resize(dimension_type new_n_rows, dimension_type new_n_columns)
Resizes the matrix copying the old contents.
dimension_type num_rows() const
Returns the number of rows of *this.
Bit_Matrix()
Default constructor.
void add_recycled_row(Bit_Row &row)
Adds row to *this.
A row in a matrix of bits.
void transpose()
Transposes the matrix.
#define PPL_OUTPUT_DECLARATIONS
void remove_trailing_columns(dimension_type n)
Removes the last n columns.
memory_size_type total_memory_in_bytes() const
Returns the total size in bytes of the memory occupied by *this.
void clear()
Clears the matrix deallocating all its rows.
Ordering predicate (used when implementing the sort algorithm).
void remove_trailing_rows(dimension_type n)
Removes the last n rows.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
Bit_Matrix & operator=(const Bit_Matrix &y)
Assignment operator.
void m_swap(Bit_Matrix &y)
Swaps *this with y.
bool check_sorted() const
Checks whether *this is sorted. It does NOT check for duplicates.
bool OK() const
Checks if all the invariants are satisfied.
dimension_type num_columns() const
Returns the number of columns of *this.
The entire library is confined to this namespace.
static dimension_type max_num_rows()
Returns the maximum number of rows of a Bit_Matrix.
dimension_type row_size
Size of the initialized part of each row.
void sort_rows()
Sorts the rows and removes duplicates.
std::vector< Bit_Row > rows
Contains the rows of the matrix.
bool operator==(const Box< ITV > &x, const Box< ITV > &y)
bool sorted_contains(const Bit_Row &row) const
Looks for row in *this, which is assumed to be sorted.
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
Bit_Row & operator[](dimension_type k)
Subscript operator.
void transpose_assign(const Bit_Matrix &y)
Makes *this a transposed copy of y.