C++ Reference: class UnsortedNullableRevBitset

Note: This documentation is automatically generated.

This class represents a reversible bitset. It is meant to represent a set of active bits. It does not offer direct access, but just methods that can reversibly subtract another bitset, or check if the current active bitset intersects with another bitset.
Method
active_words

Return type: const RevIntSet<int>&

Returns the set of active word indices.

ActiveWordSize

Return type: int

This method returns the number of non null 64 bit words in the bitset representation.

bit_size

Return type: int64_t

Returns the number of bits given in the constructor of the bitset.

Empty

Return type: bool

This method returns true if the active bitset is null.

Init

Return type: void

Arguments: Solver* const solver, const std::vector<uint64_t>& mask

This methods overwrites the active bitset with the mask. This method should be called only once.

Intersects

Return type: bool

Arguments: const std::vector<uint64_t>& mask, int* support_index

This method returns true iff the mask and the active bitset have a non null intersection. support_index is used as an accelerator: - The first word tested to check the intersection will be the '*support_index'th one. - If the intersection is not null, the support_index will be filled with the index of the word that does intersect with the mask. This can be reused later to speed-up the check.

RevAnd

Return type: bool

Arguments: Solver* const solver, const std::vector<uint64_t>& mask

This method ANDs the mask with the active bitset. It returns true if the active bitset was changed in the process.

RevSubtract

Return type: bool

Arguments: Solver* const solver, const std::vector<uint64_t>& mask

This method subtracts the mask from the active bitset. It returns true if the active bitset was changed in the process.

UnsortedNullableRevBitset

Return type: explicit

Arguments: int bit_size

Size is the number of bits to store in the bitset.

~UnsortedNullableRevBitset

word_size

Return type: int64_t

Returns the number of 64 bit words used to store the bitset.