24 #ifndef PPL_Bit_Matrix_inlines_hh
25 #define PPL_Bit_Matrix_inlines_hh 1
27 #include "assertions.hh"
40 return std::vector<Bit_Row>().max_size();
53 row_size(y.row_size) {
64 PPL_ASSERT(n <=
rows.size());
88 PPL_ASSERT(k <
rows.size());
94 PPL_ASSERT(k <
rows.size());
111 std::vector<Bit_Row> tmp;
130 return std::binary_search(
rows.begin(),
rows.end(), row,
148 #endif // !defined(PPL_Bit_Matrix_inlines_hh)
void swap(CO_Tree &x, CO_Tree &y)
bool operator()(const Bit_Row &x, const Bit_Row &y) const
size_t dimension_type
An unsigned integral type for representing space dimensions.
void swap(Bit_Matrix &x, Bit_Matrix &y)
dimension_type num_rows() const
Returns the number of rows of *this.
Bit_Matrix()
Default constructor.
bool operator!=(const Bit_Matrix &x, const Bit_Matrix &y)
A row in a matrix of bits.
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).
int compare(const Linear_Expression &x, const Linear_Expression &y)
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.
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.
std::vector< Bit_Row > rows
Contains the rows of the matrix.
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.