C++ Reference: class RevBitSet

Note: This documentation is automatically generated.

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

Return type: int64_t

Returns the number of bits set to one.

ClearAll

Return type: void

Arguments: Solver* const solver

Cleans all bits.

GetFirstBit

Return type: int64_t

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_t index

Returns whether the 'index' bit is set.

RevBitSet

Return type: explicit

Arguments: int64_t size

~RevBitSet

SetToOne

Return type: void

Arguments: Solver* const solver, int64_t index

Sets the 'index' bit.

SetToZero

Return type: void

Arguments: Solver* const solver, int64_t index

Erases the 'index' bit.