Google OR-Tools: operations_research::RevBitMatrix Class Reference

Matrix version of the RevBitSet class. More...

Matrix version of the RevBitSet class.

Definition at line 471 of file constraint_solveri.h.

#include <constraint_solveri.h>

operations_research::RevBitSet

Public Member Functions

 RevBitMatrix (int64_t rows, int64_t columns)
 ~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()

operations_research::RevBitMatrix::~RevBitMatrix ( )

◆ Cardinality()

int64_t operations_research::RevBitMatrix::Cardinality ( int row) const

Returns the number of bits set to one in the 'row' row.

Definition at line 183 of file utilities.cc.

◆ ClearAll()

void operations_research::RevBitMatrix::ClearAll ( Solver * solver)

◆ GetFirstBit()

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 200 of file utilities.cc.

◆ IsCardinalityOne()

bool operations_research::RevBitMatrix::IsCardinalityOne ( int row) const

Does the 'row' bitset contains only one bit set?

Definition at line 190 of file utilities.cc.

◆ IsCardinalityZero()

bool operations_research::RevBitMatrix::IsCardinalityZero ( int row) const

◆ IsSet()

bool operations_research::RevBitMatrix::IsSet ( int64_t row,
int64_t column ) const
inline

◆ SetToOne()

void operations_research::RevBitMatrix::SetToOne ( Solver * solver,
int64_t row,
int64_t column )

Sets the 'column' bit in the 'row' row.

Definition at line 166 of file utilities.cc.

◆ SetToZero()

void operations_research::RevBitMatrix::SetToZero ( Solver * solver,
int64_t row,
int64_t column )

Erases the 'column' bit in the 'row' row.

Definition at line 174 of file utilities.cc.


The documentation for this class was generated from the following files: