Rosetta 3.3
Public Types | Public Member Functions | Friends
utility::BitVector< B > Class Template Reference

Simple bit vector. More...

#include <BitVector.hh>

Collaboration diagram for utility::BitVector< B >:
Collaboration graph
[legend]

List of all members.

Public Types

typedefBit
typedef std::vector< boolBits
typedef bool value_type
typedef boolreference
typedef bool const & const_reference
typedef boolpointer
typedef bool const * const_pointer
typedef Bits::iterator iterator
typedef Bits::const_iterator const_iterator
typedef Bits::size_type size_type
typedef bool Value
typedef boolReference
typedef bool const & ConstReference
typedef boolPointer
typedef bool const * ConstPointer
typedef Bits::iterator Iterator
typedef Bits::const_iterator ConstIterator
typedef Bits::size_type Size

Public Member Functions

 BitVector ()
 Default constructor.
 BitVector (Bit const &i)
 Bit constructor (implicit)
 BitVector (Bit const &i, Bit const &j)
 2 Bit constructor
 BitVector (Bit const &i, Bit const &j, Bit const &k)
 3 Bit constructor
 BitVector (Bit const &i, Bit const &j, Bit const &k, Bit const &l)
 4 Bit constructor
 BitVector (Bit const &i, Bit const &j, Bit const &k, Bit const &l, Bit const &m)
 5 Bit constructor
 ~BitVector ()
 Destructor.
BitVectoroperator+= (BitVector const &s)
 += BitVector: Union
BitVectoroperator|= (BitVector const &s)
 |= BitVector: Union
BitVectoroperator-= (BitVector const &s)
 -= BitVector: Difference
BitVectoroperator+= (Bit const &i)
 += Bit
BitVectoroperator|= (Bit const &i)
 |= Bit
BitVectoroperator-= (Bit const &i)
 -= Bit
void shrink ()
 Shrink the bit vector to remove unused capacity.
void expand (Size const &n)
 Expand the bit vector if necessary to the specified size.
void expand_tight (Size const &n)
 Expand the bit vector if necessary to the specified size and remove excess capacity.
void swap (BitVector &s)
 swap( BitVector )
Size size () const
 Size.
bool empty () const
 Empty?
bool operator[] (Bit const &i) const
 BitVector[ i ] const.
ConstIterator begin () const
 Begin iterator.
Iterator begin ()
 Begin iterator.
ConstIterator end () const
 End iterator.
Iterator end ()
 End iterator.

Friends

BitVector operator+ (BitVector const &a, BitVector const &b)
 BitVector + BitVector: Union.
BitVector operator| (BitVector const &a, BitVector const &b)
 BitVector | BitVector: Union.
BitVector operator- (BitVector const &a, BitVector const &b)
 BitVector - BitVector: Difference.
void swap (BitVector &a, BitVector &b)
 swap( BitVector, BitVector )
bool operator== (BitVector const &a, BitVector const &b)
 BitVector == BitVector.
bool operator!= (BitVector const &a, BitVector const &b)
 BitVector != BitVector.

Detailed Description

template<typename B>
class utility::BitVector< B >

Simple bit vector.


Member Typedef Documentation

template<typename B >
typedef B utility::BitVector< B >::Bit
template<typename B >
typedef std::vector< bool > utility::BitVector< B >::Bits
template<typename B >
typedef bool const* utility::BitVector< B >::const_pointer
template<typename B >
typedef bool const& utility::BitVector< B >::const_reference
template<typename B >
typedef bool const* utility::BitVector< B >::ConstPointer
template<typename B >
typedef bool const& utility::BitVector< B >::ConstReference
template<typename B >
typedef Bits::iterator utility::BitVector< B >::Iterator
template<typename B >
typedef Bits::iterator utility::BitVector< B >::iterator
template<typename B >
typedef bool* utility::BitVector< B >::pointer
template<typename B >
typedef bool* utility::BitVector< B >::Pointer
template<typename B >
typedef bool& utility::BitVector< B >::reference
template<typename B >
typedef bool& utility::BitVector< B >::Reference
template<typename B >
typedef Bits::size_type utility::BitVector< B >::Size
template<typename B >
typedef Bits::size_type utility::BitVector< B >::size_type
template<typename B >
typedef bool utility::BitVector< B >::Value
template<typename B >
typedef bool utility::BitVector< B >::value_type

Constructor & Destructor Documentation

template<typename B >
utility::BitVector< B >::BitVector ( ) [inline]

Default constructor.

template<typename B >
utility::BitVector< B >::BitVector ( Bit const &  i) [inline]

Bit constructor (implicit)

References color_pdb::i.

template<typename B >
utility::BitVector< B >::BitVector ( Bit const &  i,
Bit const &  j 
) [inline]

2 Bit constructor

References color_pdb::i.

template<typename B >
utility::BitVector< B >::BitVector ( Bit const &  i,
Bit const &  j,
Bit const &  k 
) [inline]

3 Bit constructor

References color_pdb::i.

template<typename B >
utility::BitVector< B >::BitVector ( Bit const &  i,
Bit const &  j,
Bit const &  k,
Bit const &  l 
) [inline]

4 Bit constructor

References color_pdb::i, and basic::options::OptionKeys::in::file::l.

template<typename B >
utility::BitVector< B >::BitVector ( Bit const &  i,
Bit const &  j,
Bit const &  k,
Bit const &  l,
Bit const &  m 
) [inline]

5 Bit constructor

References color_pdb::i, and basic::options::OptionKeys::in::file::l.

template<typename B >
utility::BitVector< B >::~BitVector ( ) [inline]

Destructor.


Member Function Documentation

template<typename B >
ConstIterator utility::BitVector< B >::begin ( ) const [inline]

Begin iterator.

template<typename B >
Iterator utility::BitVector< B >::begin ( ) [inline]

Begin iterator.

template<typename B >
bool utility::BitVector< B >::empty ( ) const [inline]

Empty?

template<typename B >
ConstIterator utility::BitVector< B >::end ( ) const [inline]

End iterator.

template<typename B >
Iterator utility::BitVector< B >::end ( ) [inline]

End iterator.

template<typename B >
void utility::BitVector< B >::expand ( Size const &  n) [inline]

Expand the bit vector if necessary to the specified size.

Referenced by utility::BitVector< B >::operator+=(), utility::BitVector< B >::operator-=(), and utility::BitVector< B >::operator|=().

template<typename B >
void utility::BitVector< B >::expand_tight ( Size const &  n) [inline]

Expand the bit vector if necessary to the specified size and remove excess capacity.

References utility::BitVector< B >::shrink().

Referenced by utility::BitVector< B >::operator+=(), utility::BitVector< B >::operator-=(), and utility::BitVector< B >::operator|=().

template<typename B >
BitVector& utility::BitVector< B >::operator+= ( Bit const &  i) [inline]
template<typename B >
BitVector& utility::BitVector< B >::operator+= ( BitVector< B > const &  s) [inline]
template<typename B >
BitVector& utility::BitVector< B >::operator-= ( Bit const &  i) [inline]
template<typename B >
BitVector& utility::BitVector< B >::operator-= ( BitVector< B > const &  s) [inline]
template<typename B >
bool utility::BitVector< B >::operator[] ( Bit const &  i) const [inline]

BitVector[ i ] const.

template<typename B >
BitVector& utility::BitVector< B >::operator|= ( BitVector< B > const &  s) [inline]
template<typename B >
BitVector& utility::BitVector< B >::operator|= ( Bit const &  i) [inline]
template<typename B >
void utility::BitVector< B >::shrink ( ) [inline]

Shrink the bit vector to remove unused capacity.

Referenced by utility::BitVector< B >::expand_tight().

template<typename B >
Size utility::BitVector< B >::size ( ) const [inline]

Size.

template<typename B >
void utility::BitVector< B >::swap ( BitVector< B > &  s) [inline]

swap( BitVector )


Friends And Related Function Documentation

template<typename B >
bool operator!= ( BitVector< B > const &  a,
BitVector< B > const &  b 
) [friend]
template<typename B >
BitVector operator+ ( BitVector< B > const &  a,
BitVector< B > const &  b 
) [friend]

BitVector + BitVector: Union.

template<typename B >
BitVector operator- ( BitVector< B > const &  a,
BitVector< B > const &  b 
) [friend]

BitVector - BitVector: Difference.

template<typename B >
bool operator== ( BitVector< B > const &  a,
BitVector< B > const &  b 
) [friend]
template<typename B >
BitVector operator| ( BitVector< B > const &  a,
BitVector< B > const &  b 
) [friend]

BitVector | BitVector: Union.

template<typename B >
void swap ( BitVector< B > &  a,
BitVector< B > &  b 
) [friend]

swap( BitVector, BitVector )


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines