C++ Reference: class SmallRevBitSet

Note: 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_t

Returns the number of bits set to one.

GetFirstOne

Return type: int64_t

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

Sets the 'pos' bit.

SetToZero

Return type: void

Arguments: Solver* const solver, int64_t pos

Erases the 'pos' bit.

SmallRevBitSet

Return type: explicit

Arguments: int64_t size