Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set | ||
|
||
// doxy/ or-tools/ src/ constraint_solver/ |
#include <constraint_solveri.h>
Public Member Functions | |
RevBitSet (int64 size) | |
RevBitSet. | |
~RevBitSet () | |
void | SetToOne (Solver *const solver, int64 pos) |
Sets the 'pos' bit. | |
void | SetToZero (Solver *const solver, int64 pos) |
Erases the 'pos' bit. | |
bool | IsSet (int64 pos) const |
Returns whether the 'pos' bit is set. | |
int64 | Cardinality () const |
Returns the number of bits set to one. | |
bool | IsCardinalityZero () const |
Is bitset null? | |
bool | IsCardinalityOne () const |
Does it contains only one bit set? | |
int64 | GetFirstBit (int start) const |
Gets the index of the first bit set starting from start. | |
void | ClearAll (Solver *const solver) |
Cleans all bits. | |
Friends | |
class | RevBitMatrix |
This class is useful to maintain supports.
Definition at line 446 of file constraint_solveri.h.
operations_research::RevBitSet::RevBitSet | ( | int64 | size | ) | [explicit] |
operations_research::RevBitSet::~RevBitSet | ( | ) |
Definition at line 71 of file utilities.cc.
void operations_research::RevBitSet::SetToOne | ( | Solver *const | solver, | |
int64 | pos | |||
) |
void operations_research::RevBitSet::SetToZero | ( | Solver *const | solver, | |
int64 | pos | |||
) |
bool operations_research::RevBitSet::IsSet | ( | int64 | pos | ) | const |
int64 operations_research::RevBitSet::Cardinality | ( | ) | const |
bool operations_research::RevBitSet::IsCardinalityZero | ( | ) | const |
bool operations_research::RevBitSet::IsCardinalityOne | ( | ) | const |
int64 operations_research::RevBitSet::GetFirstBit | ( | int | start | ) | const |
Gets the index of the first bit set starting from start.
It returns -1 if the bitset is empty after start.
Definition at line 147 of file utilities.cc.
void operations_research::RevBitSet::ClearAll | ( | Solver *const | solver | ) |
Cleans all bits.
Reimplemented in operations_research::RevBitMatrix.
Definition at line 151 of file utilities.cc.
friend class RevBitMatrix [friend] |
Definition at line 469 of file constraint_solveri.h.