Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <bitset.h>
Classes | |
class | ConstView |
When speed matter, caching the base pointer helps. More... | |
class | Iterator |
class | View |
Public Types | |
using | value_type = IndexType |
Public Member Functions | |
Bitset64 () | |
Bitset64 (IndexType size) | |
Bitset64 (const Bitset64 &)=delete | |
This type is neither copyable nor movable. | |
Bitset64 & | operator= (const Bitset64 &)=delete |
ConstView | const_view () const |
View | view () |
IndexType | size () const |
Returns how many bits this Bitset64 can hold. | |
void | PushBack (bool value) |
Appends value at the end of the bitset. | |
void | resize (int size) |
Resizes the Bitset64 to the given number of bits. New bits are sets to 0. | |
void | Resize (IndexType size) |
void | ClearAndResize (IndexType size) |
Changes the number of bits the Bitset64 can hold and set all of them to 0. | |
void | ClearAll () |
Sets all bits to 0. | |
void | Clear (IndexType i) |
Sets the bit at position i to 0. | |
void | ClearBucket (IndexType i) |
Sets bucket containing bit i to 0. | |
void | ClearTwoBits (IndexType i) |
Clears the bits at position i and i ^ 1. | |
bool | AreOneOfTwoBitsSet (IndexType i) const |
Returns true if the bit at position i or the one at position i ^ 1 is set. | |
bool | IsSet (IndexType i) const |
Returns true if the bit at position i is set. | |
bool | operator[] (IndexType i) const |
Same as IsSet(). | |
void | Set (IndexType i) |
Sets the bit at position i to 1. | |
void | Set (IndexType i, bool value) |
If value is true, sets the bit at position i to 1, sets it to 0 otherwise. | |
void | CopyBucket (const Bitset64< IndexType > &other, IndexType i) |
Copies bucket containing bit i from "other" to "this". | |
template<typename OtherIndexType > | |
void | SetContentFromBitset (const Bitset64< OtherIndexType > &other) |
template<typename OtherIndexType > | |
void | SetContentFromBitsetOfSameSize (const Bitset64< OtherIndexType > &other) |
Same as SetContentFromBitset where "this" and "other" have the same size. | |
void | Intersection (const Bitset64< IndexType > &other) |
void | Union (const Bitset64< IndexType > &other) |
Iterator | begin () const |
Iterator | end () const |
std::string | DebugString () const |
Returns a 0/1 string representing the bitset. | |
Static Public Member Functions | |
static uint64_t | ConditionalXorOfTwoBits (IndexType i, uint64_t use1, Bitset64< IndexType >::ConstView set1, uint64_t use2, Bitset64< IndexType >::ConstView set2) |
Friends | |
template<class OtherIndexType > | |
class | Bitset64 |
This class is like an ITIVector<IndexType, bool> except that it provides a more efficient way to iterate over the positions set to true. It achieves this by caching the current uint64_t bucket in the Iterator and using LeastSignificantBitPosition64() to iterate over the positions at 1 in this bucket.
using operations_research::Bitset64< IndexType >::value_type = IndexType |
|
inline |
|
inlineexplicit |
|
delete |
This type is neither copyable nor movable.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |