![]() |
OR-Tools
9.6
|
Matrix version of the RevBitSet class.
Definition at line 457 of file constraint_solveri.h.
Public Member Functions | |
| RevBitMatrix (int64_t rows, int64_t columns) | |
| ~RevBitMatrix () | |
| void | SetToOne (Solver *const solver, int64_t row, int64_t column) |
| Sets the 'column' bit in the 'row' row. More... | |
| void | SetToZero (Solver *const solver, int64_t row, int64_t column) |
| Erases the 'column' bit in the 'row' row. More... | |
| bool | IsSet (int64_t row, int64_t column) const |
| Returns whether the 'column' bit in the 'row' row is set. More... | |
| int64_t | Cardinality (int row) const |
| Returns the number of bits set to one in the 'row' row. More... | |
| bool | IsCardinalityZero (int row) const |
| Is bitset of row 'row' null? More... | |
| bool | IsCardinalityOne (int row) const |
| Does the 'row' bitset contains only one bit set? More... | |
| int64_t | GetFirstBit (int row, int start) const |
| Returns the first bit in the row 'row' which position is >= 'start'. More... | |
| void | ClearAll (Solver *const solver) |
| Cleans all bits. More... | |
Private Member Functions | |
| void | SetToOne (Solver *const solver, int64_t index) |
| Sets the 'index' bit. More... | |
| void | SetToZero (Solver *const solver, int64_t index) |
| Erases the 'index' bit. More... | |
| bool | IsSet (int64_t index) const |
| Returns whether the 'index' bit is set. More... | |
| int64_t | Cardinality () const |
| Returns the number of bits set to one. More... | |
| bool | IsCardinalityZero () const |
| Is bitset null? More... | |
| bool | IsCardinalityOne () const |
| Does it contains only one bit set? More... | |
| int64_t | GetFirstBit (int start) const |
| Gets the index of the first bit set starting from start. More... | |
| RevBitMatrix | ( | int64_t | rows, |
| int64_t | columns | ||
| ) |
Definition at line 163 of file utilities.cc.
| ~RevBitMatrix | ( | ) |
Definition at line 169 of file utilities.cc.
| int64_t Cardinality | ( | int | row | ) | const |
Returns the number of bits set to one in the 'row' row.
Definition at line 188 of file utilities.cc.
| void ClearAll | ( | Solver *const | solver | ) |
Cleans all bits.
Definition at line 221 of file utilities.cc.
| int64_t GetFirstBit | ( | int | row, |
| int | start | ||
| ) | const |
Returns the first bit in the row 'row' which position is >= 'start'.
It returns -1 if there are none.
Definition at line 205 of file utilities.cc.
| bool IsCardinalityOne | ( | int | row | ) | const |
Does the 'row' bitset contains only one bit set?
Definition at line 195 of file utilities.cc.
| bool IsCardinalityZero | ( | int | row | ) | const |
Is bitset of row 'row' null?
Definition at line 200 of file utilities.cc.
|
inline |
Returns whether the 'column' bit in the 'row' row is set.
Definition at line 467 of file constraint_solveri.h.
| void SetToOne | ( | Solver *const | solver, |
| int64_t | row, | ||
| int64_t | column | ||
| ) |
Sets the 'column' bit in the 'row' row.
Definition at line 171 of file utilities.cc.
| void SetToZero | ( | Solver *const | solver, |
| int64_t | row, | ||
| int64_t | column | ||
| ) |
Erases the 'column' bit in the 'row' row.
Definition at line 179 of file utilities.cc.