carl  24.04
Computer ARithmetic Library
carl::BitVector Class Reference

#include <BitVector.h>

Collaboration diagram for carl::BitVector:

Data Structures

class  forward_iterator
 

Public Types

using const_iterator = forward_iterator
 

Public Member Functions

 BitVector ()=default
 
 BitVector (unsigned pos)
 
void clear ()
 
size_t size () const
 
void reserve (size_t capacity)
 
bool empty () const
 
size_t findFirstSetBit () const
 
void setBit (unsigned pos, bool val=true)
 
bool getBit (unsigned pos) const
 
bool subsetOf (const BitVector &superset)
 
BitVectorcalculateUnion (const BitVector &rhs)
 
BitVectoroperator|= (const BitVector &rhs)
 
forward_iterator begin () const
 
forward_iterator end () const
 
void print (std::ostream &os=std::cout) const
 

Protected Attributes

std::vector< unsigned > mBits
 

Friends

bool operator== (const BitVector &lhs, const BitVector &rhs)
 
BitVector operator| (const BitVector &lhs, const BitVector &rhs)
 

Detailed Description

Definition at line 19 of file BitVector.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 173 of file BitVector.h.

Constructor & Destructor Documentation

◆ BitVector() [1/2]

carl::BitVector::BitVector ( )
default

◆ BitVector() [2/2]

carl::BitVector::BitVector ( unsigned  pos)
inlineexplicit

Definition at line 23 of file BitVector.h.

Here is the call graph for this function:

Member Function Documentation

◆ begin()

forward_iterator carl::BitVector::begin ( ) const
inline

Definition at line 175 of file BitVector.h.

Here is the caller graph for this function:

◆ calculateUnion()

BitVector& carl::BitVector::calculateUnion ( const BitVector rhs)
inline

Definition at line 100 of file BitVector.h.

Here is the caller graph for this function:

◆ clear()

void carl::BitVector::clear ( )
inline

Definition at line 27 of file BitVector.h.

Here is the caller graph for this function:

◆ empty()

bool carl::BitVector::empty ( ) const
inline

Definition at line 40 of file BitVector.h.

◆ end()

forward_iterator carl::BitVector::end ( ) const
inline

Definition at line 179 of file BitVector.h.

◆ findFirstSetBit()

size_t carl::BitVector::findFirstSetBit ( ) const
inline

Definition at line 48 of file BitVector.h.

Here is the call graph for this function:

◆ getBit()

bool carl::BitVector::getBit ( unsigned  pos) const
inline

Definition at line 83 of file BitVector.h.

Here is the caller graph for this function:

◆ operator|=()

BitVector& carl::BitVector::operator|= ( const BitVector rhs)
inline

Definition at line 108 of file BitVector.h.

◆ print()

void carl::BitVector::print ( std::ostream &  os = std::cout) const
inline

Definition at line 183 of file BitVector.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reserve()

void carl::BitVector::reserve ( size_t  capacity)
inline

Definition at line 36 of file BitVector.h.

◆ setBit()

void carl::BitVector::setBit ( unsigned  pos,
bool  val = true 
)
inline

Definition at line 66 of file BitVector.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

size_t carl::BitVector::size ( ) const
inline

Definition at line 32 of file BitVector.h.

Here is the caller graph for this function:

◆ subsetOf()

bool carl::BitVector::subsetOf ( const BitVector superset)

Definition at line 47 of file BitVector.cpp.

Friends And Related Function Documentation

◆ operator==

bool operator== ( const BitVector lhs,
const BitVector rhs 
)
friend

Definition at line 37 of file BitVector.cpp.

◆ operator|

BitVector operator| ( const BitVector lhs,
const BitVector rhs 
)
friend

Definition at line 6 of file BitVector.cpp.

Field Documentation

◆ mBits

std::vector<unsigned> carl::BitVector::mBits
protected

Definition at line 191 of file BitVector.h.


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