Bitset Listing#
Functions
- LIBRAPID_SIMPLE_IO_NORANGE (uint64_t numBits COMMA bool stackAlloc, librapid::BitSet< numBits COMMA stackAlloc >) template< uint64_t numElements
- bool stackAlloc std::ostream & operator<< (std::ostream &os, const librapid::BitSet< numElements, stackAlloc > &bitset)
-
template<uint64_t numBits, bool stackAlloc, typename Char>
struct formatter<librapid::BitSet<numBits, stackAlloc>, Char> - #include <bitset.hpp>
Public Functions
-
template<typename ParseContext>
inline FMT_CONSTEXPR auto parse(ParseContext &ctx) -> const Char*
-
template<typename FormatContext>
inline FMT_CONSTEXPR auto format(const Type &val, FormatContext &ctx) const -> decltype(ctx.out())
Private Types
-
using Type = librapid::BitSet<numBits, stackAlloc>#
-
template<typename ParseContext>
-
namespace librapid
Functions
-
template<typename T>
uint64_t popCount(const T &value)
-
template<uint64_t numBits, bool stackAlloc>
uint64_t popCount(const BitSet<numBits, stackAlloc> &bitset)
-
template<uint64_t numBits_ = 64, bool stackAlloc_ = true>
class BitSet - #include <bitset.hpp>
Public Types
-
template<uint64_t otherBits, bool otherStackAlloc>
using BitSetMerger = BitSet
-
using ElementType = uint64_t
-
using StorageType = std::conditional_t<stackAlloc, std::array<ElementType, numElements>, ElementType*>
Public Functions
-
inline BitSet()
-
inline BitSet(const BitSet &other)
-
BitSet(BitSet &&other) = default
-
inline constexpr BitSet(uint64_t value)
-
inline constexpr BitSet(const std::string &str, char zero = '0', char one = '1')
-
inline ~BitSet()
-
inline BitSet &set(uint64_t index, bool value)
-
inline BitSet &set(uint64_t start, uint64_t end, bool value)
-
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 last() 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)
-
inline BitSet &operator<<=(int64_t shift)
-
inline BitSet &operator>>=(int64_t shift)
-
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 BitSet operator<<(int64_t shift) const
-
inline BitSet operator>>(int64_t shift) const
-
inline BitSet operator~() const
-
inline bool operator==(const BitSet &other) const
-
inline const auto &data() const
-
inline auto &data()
-
template<typename Integer = ElementType>
inline int toInt() const
Public Static Attributes
-
static constexpr bool stackAlloc = stackAlloc_
-
static constexpr uint64_t bitsPerElement = sizeof(ElementType) * 8
-
static constexpr uint64_t numBits = numBits_
-
static constexpr uint64_t numElements = (numBits + bitsPerElement - 1) / bitsPerElement
Protected Functions
-
inline constexpr uint64_t highMask() const
-
inline void zero()
-
inline void init()
-
inline void emptyInit()
Private Members
-
StorageType m_data#
-
template<uint64_t otherBits, bool otherStackAlloc>
-
template<typename T>