24 #ifndef PPL_Bit_Row_defs_hh
25 #define PPL_Bit_Row_defs_hh 1
35 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
38 void swap(Bit_Row& x, Bit_Row& y);
39 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
41 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
44 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
46 iter_swap(std::vector<Bit_Row>::iterator x,
47 std::vector<Bit_Row>::iterator y);
51 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
54 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
55 bool operator==(
const Bit_Row& x,
const Bit_Row& y);
57 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
60 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
61 bool operator!=(
const Bit_Row& x,
const Bit_Row& y);
63 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
76 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
77 int compare(
const Bit_Row& x,
const Bit_Row& y);
79 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
82 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
83 bool subset_or_equal(
const Bit_Row& x,
const Bit_Row& y);
85 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
92 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
93 bool subset_or_equal(
const Bit_Row& x,
const Bit_Row& y,
96 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
99 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
100 bool strict_subset(
const Bit_Row& x,
const Bit_Row& y);
104 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
107 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
135 void set(
unsigned long k);
141 void clear(
unsigned long k);
168 unsigned long first()
const;
174 unsigned long next(
unsigned long position)
const;
177 unsigned long last()
const;
183 unsigned long prev(
unsigned long position)
const;
214 #endif // !defined(PPL_Bit_Row_defs_hh)
void set_until(unsigned long k)
Sets bits up to position k (excluded).
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
bool OK() const
Checks if all the invariants are satisfied.
void swap(CO_Tree &x, CO_Tree &y)
void intersection_assign(const Bit_Row &x, const Bit_Row &y)
Assigns to *this the set-theoretic intersection of x and y.
void union_assign(const Bit_Row &x, const Bit_Row &y)
Assigns to *this the set-theoretic union of x and y.
unsigned long last() const
Returns the index of the last set bit or ULONG_MAX if no bit is set.
friend bool operator==(const Bit_Row &x, const Bit_Row &y)
unsigned long prev(unsigned long position) const
Returns the index of the first set bit before position or ULONG_MAX if no bits before position is set...
Bit_Row & operator=(const Bit_Row &y)
Assignment operator.
void set(unsigned long k)
Sets the bit in position k.
void difference_assign(const Bit_Row &x, const Bit_Row &y)
Assigns to *this the set-theoretic difference of x and y.
unsigned long count_ones() const
Returns the number of set bits in the row.
memory_size_type total_memory_in_bytes() const
Returns the total size in bytes of the memory occupied by *this.
friend bool operator!=(const Bit_Row &x, const Bit_Row &y)
A row in a matrix of bits.
mpz_t vec
Bit-vector representing the row.
friend bool subset_or_equal(const Bit_Row &x, const Bit_Row &y)
bool empty() const
Returns true if no bit is set in the row.
friend int compare(const Bit_Row &x, const Bit_Row &y)
unsigned long first() const
Returns the index of the first set bit or ULONG_MAX if no bit is set.
int compare(const Linear_Expression &x, const Linear_Expression &y)
void m_swap(Bit_Row &y)
Swaps *this with y.
bool operator[](unsigned long k) const
Returns the truth value corresponding to the bit in position k.
void clear()
Clears all the bits of the row.
void clear_from(unsigned long k)
Clears bits from position k (included) onward.
The entire library is confined to this namespace.
Bit_Row()
Default constructor.
bool operator==(const Box< ITV > &x, const Box< ITV > &y)
unsigned long next(unsigned long position) const
Returns the index of the first set bit after position or ULONG_MAX if no bit after position is set...
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
void union_helper(const Bit_Row &y, const Bit_Row &z)
Assigns to *this the union of y and z.
friend bool strict_subset(const Bit_Row &x, const Bit_Row &y)