Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <bitset.h>
Public Member Functions | |
SparseBitset () | |
SparseBitset (IntegerType size) | |
SparseBitset (const SparseBitset &)=delete | |
This type is neither copyable nor movable. | |
SparseBitset & | operator= (const SparseBitset &)=delete |
IntegerType | size () const |
void | SparseClearAll () |
void | ClearAll () |
void | ClearAndResize (IntegerType size) |
void | Resize (IntegerType size) |
bool | operator[] (IntegerType index) const |
void | Set (IntegerType index) |
void | SetUnsafe (IntegerType index) |
void | Clear (IntegerType index) |
int | NumberOfSetCallsWithDifferentArguments () const |
const std::vector< IntegerType > & | PositionsSetAtLeastOnce () const |
void | NotifyAllClear () |
Bitset64< IntegerType >::ConstView | const_view () const |
A simple utility class to set/unset integer in a range [0, size). This is optimized for sparsity.
|
inline |
|
inlineexplicit |
|
delete |
This type is neither copyable nor movable.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Tells the class that all its bits are cleared, so it can reset to_clear_ to the empty vector. Note that this call is "unsafe" since the fact that the class is actually all cleared is only checked in debug mode.
This is useful to iterate on the "set" positions while clearing them for instance. This way, after the loop, a client can call this for efficiency.
|
inline |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |