C++ Reference: class RevBitSet

This documentation is automatically generated.

This class represents a reversible bitset. This class is useful to maintain supports.
Method
Cardinality

Return type: int64

Returns the number of bits set to one.

ClearAll

Return type: void

Arguments: Solver* const solver

Cleans all bits.

GetFirstBit

Return type: int64

Arguments: int start

Gets the index of the first bit set starting from start. It returns -1 if the bitset is empty after start.

IsCardinalityOne

Return type: bool

Does it contains only one bit set?

IsCardinalityZero

Return type: bool

Is bitset null?

IsSet

Return type: bool

Arguments: int64 index

Returns whether the 'index' bit is set.

RevBitSet

Return type: explicit

Arguments: int64 size

~RevBitSet

SetToOne

Return type: void

Arguments: Solver* const solver, int64 index

Sets the 'index' bit.

SetToZero

Return type: void

Arguments: Solver* const solver, int64 index

Erases the 'index' bit.