Template Class BitSet#
Defined in File bitset.hpp
Class Documentation#
-
template<uint64_t numBits_ = 64, bool stackAlloc_ = true>
class BitSet# Public Types
- template<uint64_t otherBits, bool otherStackAlloc> BitSetMerger = BitSet<(numBits_ > otherBits ? numBits_ :otherBits), stackAlloc_ &&otherStackAlloc >
-
using ElementType = uint64_t#
-
using StorageType = std::conditional_t<stackAlloc, std::array<ElementType, numElements>, ElementType*>#
Public Functions
-
inline BitSet()#
-
inline constexpr BitSet(uint64_t value)#
-
inline constexpr BitSet(const std::string &str, char zero = '0', char one = '1')#
-
inline ~BitSet()#
-
inline bool get(uint64_t index) const#
-
inline bool any() const#
-
inline bool all() const#
-
inline bool none() const#
-
inline uint64_t first() const#
-
inline uint64_t popCount() const#
-
template<uint64_t otherBits = numBits, bool otherStackAlloc = stackAlloc>
inline BitSet &operator|=(const BitSet<otherBits, otherStackAlloc> &other)#
-
template<uint64_t otherBits = numBits, bool otherStackAlloc = stackAlloc>
inline BitSet &operator&=(const BitSet<otherBits, otherStackAlloc> &other)#
-
template<uint64_t otherBits = numBits, bool otherStackAlloc = stackAlloc>
inline BitSet &operator^=(const BitSet<otherBits, otherStackAlloc> &other)#
-
template<uint64_t otherBits = numBits, bool otherStackAlloc = stackAlloc>
inline auto operator|(const BitSet<otherBits, otherStackAlloc> &other) const -> BitSetMerger<otherBits, otherStackAlloc>#
-
template<uint64_t otherBits = numBits, bool otherStackAlloc = stackAlloc>
inline auto operator&(const BitSet<otherBits, otherStackAlloc> &other) const -> BitSetMerger<otherBits, otherStackAlloc>#
-
template<uint64_t otherBits = numBits, bool otherStackAlloc = stackAlloc>
inline auto operator^(const BitSet<otherBits, otherStackAlloc> &other) const -> BitSetMerger<otherBits, otherStackAlloc>#
-
inline const auto &data() const#
-
inline auto &data()#
Public Members
- friend BitSet< numBits_, !stackAlloc_ >
Public Static Attributes
-
static constexpr bool stackAlloc = stackAlloc_#
-
static constexpr uint64_t bitsPerElement = sizeof(ElementType) * 8#
-
static constexpr uint64_t numElements = (numBits + bitsPerElement - 1) / bitsPerElement#