C++ Reference
C++ Reference: Routing
RevBitMatrix
Detailed Description
Matrix version of the RevBitSet class.
Definition at line 463 of file constraint_solveri.h.
Public Member Functions | |
RevBitMatrix (int64 rows, int64 columns) | |
~RevBitMatrix () | |
void | SetToOne (Solver *const solver, int64 row, int64 column) |
Sets the 'column' bit in the 'row' row. More... | |
void | SetToZero (Solver *const solver, int64 row, int64 column) |
Erases the 'column' bit in the 'row' row. More... | |
bool | IsSet (int64 row, int64 column) const |
Returns whether the 'column' bit in the 'row' row is set. More... | |
int64 | 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 | 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 index) |
Sets the 'index' bit. More... | |
void | SetToZero (Solver *const solver, int64 index) |
Erases the 'index' bit. More... | |
bool | IsSet (int64 index) const |
Returns whether the 'index' bit is set. More... | |
int64 | 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 | GetFirstBit (int start) const |
Gets the index of the first bit set starting from start. More... | |
Constructor & Destructor Documentation
◆ RevBitMatrix()
RevBitMatrix | ( | int64 | rows, |
int64 | columns | ||
) |
◆ ~RevBitMatrix()
~RevBitMatrix | ( | ) |
Member Function Documentation
◆ Cardinality()
int64 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 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 473 of file constraint_solveri.h.
◆ SetToOne()
void SetToOne | ( | Solver *const | solver, |
int64 | row, | ||
int64 | column | ||
) |
Sets the 'column' bit in the 'row' row.
◆ SetToZero()
void SetToZero | ( | Solver *const | solver, |
int64 | row, | ||
int64 | column | ||
) |
Erases the 'column' bit in the 'row' row.
The documentation for this class was generated from the following file: