dlvhex  2.5.0
bm::bvector< Alloc >::counted_enumerator Class Reference

Constant input iterator designed to enumerate "ON" bits counted_enumerator keeps bitcount, ie number of ON bits starting from the position 0 in the bit string up to the currently enumerated bit. More...

#include <vs10/bm/bm.h>

Inheritance diagram for bm::bvector< Alloc >::counted_enumerator:
Collaboration diagram for bm::bvector< Alloc >::counted_enumerator:

Public Types

typedef std::input_iterator_tag iterator_category
typedef std::input_iterator_tag iterator_category

Public Member Functions

 counted_enumerator ()
 counted_enumerator (const enumerator &en)
counted_enumeratoroperator= (const enumerator &en)
counted_enumeratoroperator++ ()
counted_enumerator operator++ (int)
bm::id_t count () const
 Number of bits ON starting from the .
 counted_enumerator ()
 counted_enumerator (const enumerator &en)
counted_enumeratoroperator= (const enumerator &en)
counted_enumeratoroperator++ ()
counted_enumerator operator++ (int)
bm::id_t count () const
 Number of bits ON starting from the .

Private Attributes

bm::id_t bit_count_

Detailed Description

template<class Alloc>
class bm::bvector< Alloc >::counted_enumerator

Constant input iterator designed to enumerate "ON" bits counted_enumerator keeps bitcount, ie number of ON bits starting from the position 0 in the bit string up to the currently enumerated bit.

When increment operator called current position is increased by 1.

Definition at line 731 of file bm.h.


Member Typedef Documentation

template<class Alloc>
typedef std::input_iterator_tag bm::bvector< Alloc >::counted_enumerator::iterator_category

Reimplemented from bm::bvector< Alloc >::enumerator.

Definition at line 735 of file bm.h.

template<class Alloc>
typedef std::input_iterator_tag bm::bvector< Alloc >::counted_enumerator::iterator_category

Reimplemented from bm::bvector< Alloc >::enumerator.

Definition at line 735 of file bm.h.


Constructor & Destructor Documentation

template<class Alloc>
bm::bvector< Alloc >::counted_enumerator::counted_enumerator ( ) [inline]

Definition at line 737 of file bm.h.

template<class Alloc>
bm::bvector< Alloc >::counted_enumerator::counted_enumerator ( const enumerator en) [inline]
template<class Alloc>
bm::bvector< Alloc >::counted_enumerator::counted_enumerator ( ) [inline]

Definition at line 737 of file bm.h.

template<class Alloc>
bm::bvector< Alloc >::counted_enumerator::counted_enumerator ( const enumerator en) [inline]

Member Function Documentation

template<class Alloc>
bm::id_t bm::bvector< Alloc >::counted_enumerator::count ( ) const [inline]

Number of bits ON starting from the .

Method returns number of ON bits fromn the bit 0 to the current bit For the first bit in bitvector it is 1, for the second 2

Definition at line 777 of file bm.h.

References bm::bvector< Alloc >::counted_enumerator::bit_count_.

template<class Alloc>
bm::id_t bm::bvector< Alloc >::counted_enumerator::count ( ) const [inline]

Number of bits ON starting from the .

Method returns number of ON bits fromn the bit 0 to the current bit For the first bit in bitvector it is 1, for the second 2

Definition at line 777 of file bm.h.

References bm::bvector< Alloc >::counted_enumerator::bit_count_.

template<class Alloc>
counted_enumerator& bm::bvector< Alloc >::counted_enumerator::operator++ ( ) [inline]
template<class Alloc>
counted_enumerator& bm::bvector< Alloc >::counted_enumerator::operator++ ( ) [inline]
template<class Alloc>
counted_enumerator bm::bvector< Alloc >::counted_enumerator::operator++ ( int  ) [inline]
template<class Alloc>
counted_enumerator bm::bvector< Alloc >::counted_enumerator::operator++ ( int  ) [inline]
template<class Alloc>
counted_enumerator& bm::bvector< Alloc >::counted_enumerator::operator= ( const enumerator en) [inline]
template<class Alloc>
counted_enumerator& bm::bvector< Alloc >::counted_enumerator::operator= ( const enumerator en) [inline]

Field Documentation


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