C++ Reference
C++ Reference: Routing
RevBitMatrix
Detailed Description
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... | |
Constructor & Destructor Documentation
◆ RevBitMatrix()
| RevBitMatrix | ( | int64_t | rows, |
| int64_t | columns | ||
| ) |
◆ ~RevBitMatrix()
| ~RevBitMatrix | ( | ) |
Member Function Documentation
◆ Cardinality()
| int64_t Cardinality | ( | int | row | ) | const |
Returns the number of bits set to one in the 'row' row.
◆ ClearAll()
| void ClearAll | ( | Solver *const | solver | ) |
Cleans all bits.
◆ GetFirstBit()
| 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.
◆ IsCardinalityOne()
| bool IsCardinalityOne | ( | int | row | ) | const |
Does the 'row' bitset contains only one bit set?
◆ IsCardinalityZero()
| bool IsCardinalityZero | ( | int | row | ) | const |
Is bitset of row 'row' null?
◆ IsSet()
|
inline |
Returns whether the 'column' bit in the 'row' row is set.
Definition at line 467 of file constraint_solveri.h.
◆ SetToOne()
| void SetToOne | ( | Solver *const | solver, |
| int64_t | row, | ||
| int64_t | column | ||
| ) |
Sets the 'column' bit in the 'row' row.
◆ SetToZero()
| void SetToZero | ( | Solver *const | solver, |
| int64_t | row, | ||
| int64_t | column | ||
| ) |
Erases the 'column' bit in the 'row' row.
The documentation for this class was generated from the following file: