vg
tools for working with variation graphs
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
vg::SmallBitset Class Reference

#include <small_bitset.hpp>

Public Types

typedef std::uint64_t value_type
 

Public Member Functions

 SmallBitset ()
 
 SmallBitset (size_t n)
 
 ~SmallBitset ()
 
 SmallBitset (const SmallBitset &another)
 
 SmallBitset (SmallBitset &&another)
 
SmallBitsetoperator= (const SmallBitset &another)
 
SmallBitsetoperator= (SmallBitset &&another)
 
size_t size () const
 
bool small () const
 
size_t data_size () const
 
size_t count () const
 
void insert (size_t i)
 
bool contains (size_t i) const
 
void operator|= (const SmallBitset &another)
 
void operator&= (const SmallBitset &another)
 

Private Member Functions

void clear ()
 
void copy (const SmallBitset &another)
 
void move (SmallBitset &another)
 

Private Attributes

size_t universe_size
 
union {
   value_type   value
 
   value_type *   pointer
 
data
 

Static Private Attributes

constexpr static size_t VALUE_SHIFT = 6
 
constexpr static size_t VALUE_BITS = static_cast<size_t>(1) << VALUE_SHIFT
 
constexpr static size_t VALUE_MASK = VALUE_BITS - 1
 

Detailed Description

A small bitset. We expect that the universe size is usually at most 64.

Member Typedef Documentation

◆ value_type

typedef std::uint64_t vg::SmallBitset::value_type

Constructor & Destructor Documentation

◆ SmallBitset() [1/4]

vg::SmallBitset::SmallBitset ( )
inline

◆ SmallBitset() [2/4]

vg::SmallBitset::SmallBitset ( size_t  n)
inlineexplicit

◆ ~SmallBitset()

vg::SmallBitset::~SmallBitset ( )
inline

◆ SmallBitset() [3/4]

vg::SmallBitset::SmallBitset ( const SmallBitset another)
inline

◆ SmallBitset() [4/4]

vg::SmallBitset::SmallBitset ( SmallBitset &&  another)
inline

Member Function Documentation

◆ clear()

void vg::SmallBitset::clear ( )
inlineprivate

◆ contains()

bool vg::SmallBitset::contains ( size_t  i) const
inline

◆ copy()

void vg::SmallBitset::copy ( const SmallBitset another)
inlineprivate

◆ count()

size_t vg::SmallBitset::count ( ) const
inline

◆ data_size()

size_t vg::SmallBitset::data_size ( ) const
inline

◆ insert()

void vg::SmallBitset::insert ( size_t  i)
inline

◆ move()

void vg::SmallBitset::move ( SmallBitset another)
inlineprivate

◆ operator&=()

void vg::SmallBitset::operator&= ( const SmallBitset another)
inline

◆ operator=() [1/2]

SmallBitset& vg::SmallBitset::operator= ( const SmallBitset another)
inline

◆ operator=() [2/2]

SmallBitset& vg::SmallBitset::operator= ( SmallBitset &&  another)
inline

◆ operator|=()

void vg::SmallBitset::operator|= ( const SmallBitset another)
inline

◆ size()

size_t vg::SmallBitset::size ( ) const
inline

◆ small()

bool vg::SmallBitset::small ( ) const
inline

Member Data Documentation

◆ data

union { ... } vg::SmallBitset::data

◆ pointer

value_type* vg::SmallBitset::pointer

◆ universe_size

size_t vg::SmallBitset::universe_size
private

◆ value

value_type vg::SmallBitset::value

◆ VALUE_BITS

constexpr static size_t vg::SmallBitset::VALUE_BITS = static_cast<size_t>(1) << VALUE_SHIFT
staticconstexprprivate

◆ VALUE_MASK

constexpr static size_t vg::SmallBitset::VALUE_MASK = VALUE_BITS - 1
staticconstexprprivate

◆ VALUE_SHIFT

constexpr static size_t vg::SmallBitset::VALUE_SHIFT = 6
staticconstexprprivate

The documentation for this class was generated from the following file: