![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Matrix version of the RevBitSet class. More...
Matrix version of the RevBitSet class.
Definition at line 473 of file constraint_solveri.h.
#include <constraint_solveri.h>
Public Member Functions | |
| RevBitMatrix (int64_t rows, int64_t columns) | |
| --— RevBitMatrix --— | |
| ~RevBitMatrix () | |
| void | SetToOne (Solver *solver, int64_t row, int64_t column) |
| Sets the 'column' bit in the 'row' row. | |
| void | SetToZero (Solver *solver, int64_t row, int64_t column) |
| Erases the 'column' bit in the 'row' row. | |
| bool | IsSet (int64_t row, int64_t column) const |
| Returns whether the 'column' bit in the 'row' row is set. | |
| int64_t | Cardinality (int row) const |
| Returns the number of bits set to one in the 'row' row. | |
| bool | IsCardinalityZero (int row) const |
| Is bitset of row 'row' null? | |
| bool | IsCardinalityOne (int row) const |
| Does the 'row' bitset contains only one bit set? | |
| int64_t | GetFirstBit (int row, int start) const |
| void | ClearAll (Solver *solver) |
| Cleans all bits. | |
| operations_research::RevBitMatrix::RevBitMatrix | ( | int64_t | rows, |
| int64_t | columns ) |
--— RevBitMatrix --—
Definition at line 163 of file utilities.cc.
| operations_research::RevBitMatrix::~RevBitMatrix | ( | ) |
Definition at line 169 of file utilities.cc.
| int64_t operations_research::RevBitMatrix::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 operations_research::RevBitMatrix::ClearAll | ( | Solver * | solver | ) |
Cleans all bits.
Definition at line 221 of file utilities.cc.
| int64_t operations_research::RevBitMatrix::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 operations_research::RevBitMatrix::IsCardinalityOne | ( | int | row | ) | const |
Does the 'row' bitset contains only one bit set?
Definition at line 195 of file utilities.cc.
| bool operations_research::RevBitMatrix::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 483 of file constraint_solveri.h.
| void operations_research::RevBitMatrix::SetToOne | ( | Solver * | solver, |
| int64_t | row, | ||
| int64_t | column ) |
Sets the 'column' bit in the 'row' row.
Definition at line 171 of file utilities.cc.
| void operations_research::RevBitMatrix::SetToZero | ( | Solver * | solver, |
| int64_t | row, | ||
| int64_t | column ) |
Erases the 'column' bit in the 'row' row.
Definition at line 179 of file utilities.cc.