C++ Reference: class SmallRevBitSet

This documentation is automatically generated.

This class represents a small reversible bitset (size <= 64). This class is useful to maintain supports.
Method
Cardinality

Return type: int64

Returns the number of bits set to one.

GetFirstOne

Return type: int64

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

IsCardinalityOne

Return type: bool

Does it contains only one bit set?

IsCardinalityZero

Return type: bool

Is bitset null?

SetToOne

Return type: void

Arguments: Solver* const solver, int64 pos

Sets the 'pos' bit.

SetToZero

Return type: void

Arguments: Solver* const solver, int64 pos

Erases the 'pos' bit.

SmallRevBitSet

Return type: explicit

Arguments: int64 size