Vcsn  2.3
Be Rational
vcsn::detail::wet_bitset Class Reference

Weighted set: labels are non-negative integers, weights are bools. More...

#include <wet.hh>

Collaboration diagram for vcsn::detail::wet_bitset:

Classes

struct  iterator_impl
 Iterator. More...
 

Public Types

using self_t = wet_bitset
 
using key_t = unsigned
 
using value_t = bool
 
using welement_t = welement< key_t, value_t >
 
using value_type = welement_t
 
using iterator = iterator_impl< value_type, set_t >
 Mutable iterator. More...
 
using const_iterator = iterator_impl< const value_type, const set_t >
 Const iterator. More...
 

Public Member Functions

 wet_bitset ()
 
 wet_bitset (size_t size)
 
 wet_bitset (std::initializer_list< value_type > p)
 
 wet_bitset (set_t &&set)
 
const set_tset () const
 
set_tset ()
 FIXME: Avoid this by exposing more interfaces. More...
 
void clear ()
 
bool empty () const
 
size_t size () const
 
auto begin () -> iterator
 
auto end () -> iterator
 
auto cbegin () const -> const_iterator
 
auto cend () const -> const_iterator
 
auto begin () const -> const_iterator
 
auto end () const -> const_iterator
 
void set (const key_t k, value_t v=true)
 
void set (const char k, value_t v=true)
 
void set (const iterator &, const value_t v=true)
 
auto erase (const_iterator pos) -> void
 
void erase (key_t k)
 
void erase (char k)
 
auto find (key_t k) const -> const_iterator
 
auto find (key_t k) -> iterator
 
auto find (char k) const -> const_iterator
 
auto find (char k) -> iterator
 
self_t operator- (const self_t &rhs) const
 Operators for when wet_bitset is used as a bitset. More...
 
self_t operator& (const self_t &rhs) const
 

Static Public Member Functions

static key_t key (char k)
 Special for char: map -1 to 255 (MAX_UCHAR), not MAX_INT. More...
 

Static Public Attributes

static constexpr wet_kind_t kind = wet_kind_t::bitset
 
static constexpr size_t npos = set_t::npos
 

Private Types

using set_t = boost::dynamic_bitset<>
 

Private Attributes

set_t set_
 

Friends

bool operator< (const self_t &lhs, const self_t &rhs)
 Allow wet_bitset to be used in containers. More...
 

Detailed Description

Weighted set: labels are non-negative integers, weights are bools.

Definition at line 546 of file wet.hh.

Member Typedef Documentation

Const iterator.

Definition at line 688 of file wet.hh.

Mutable iterator.

Definition at line 685 of file wet.hh.

Definition at line 555 of file wet.hh.

Definition at line 553 of file wet.hh.

using vcsn::detail::wet_bitset::set_t = boost::dynamic_bitset<>
private

Definition at line 549 of file wet.hh.

Definition at line 556 of file wet.hh.

Definition at line 558 of file wet.hh.

Definition at line 557 of file wet.hh.

Constructor & Destructor Documentation

vcsn::detail::wet_bitset::wet_bitset ( )
inline

Definition at line 567 of file wet.hh.

vcsn::detail::wet_bitset::wet_bitset ( size_t  size)
inline

Definition at line 569 of file wet.hh.

vcsn::detail::wet_bitset::wet_bitset ( std::initializer_list< value_type p)
inline

Definition at line 573 of file wet.hh.

References vcsn::label_of(), set(), and vcsn::weight_of().

Here is the call graph for this function:

vcsn::detail::wet_bitset::wet_bitset ( set_t &&  set)
inline

Definition at line 579 of file wet.hh.

References set().

Here is the call graph for this function:

Member Function Documentation

auto vcsn::detail::wet_bitset::begin ( ) -> iterator
inline

Definition at line 690 of file wet.hh.

auto vcsn::detail::wet_bitset::begin ( ) const -> const_iterator
inline

Definition at line 696 of file wet.hh.

References cbegin().

Here is the call graph for this function:

auto vcsn::detail::wet_bitset::cbegin ( ) const -> const_iterator
inline

Definition at line 693 of file wet.hh.

Referenced by begin().

auto vcsn::detail::wet_bitset::cend ( ) const -> const_iterator
inline

Definition at line 694 of file wet.hh.

References set_.

Referenced by end().

void vcsn::detail::wet_bitset::clear ( )
inline

Definition at line 594 of file wet.hh.

bool vcsn::detail::wet_bitset::empty ( ) const
inline

Definition at line 599 of file wet.hh.

auto vcsn::detail::wet_bitset::end ( ) -> iterator
inline

Definition at line 691 of file wet.hh.

References set_.

Referenced by find().

auto vcsn::detail::wet_bitset::end ( ) const -> const_iterator
inline

Definition at line 697 of file wet.hh.

References cend().

Here is the call graph for this function:

auto vcsn::detail::wet_bitset::erase ( const_iterator  pos) -> void
inline

Definition at line 722 of file wet.hh.

Referenced by erase().

void vcsn::detail::wet_bitset::erase ( key_t  k)
inline

Definition at line 728 of file wet.hh.

void vcsn::detail::wet_bitset::erase ( char  k)
inline

Definition at line 733 of file wet.hh.

References erase(), and key().

Here is the call graph for this function:

auto vcsn::detail::wet_bitset::find ( key_t  k) const -> const_iterator
inline

Definition at line 738 of file wet.hh.

References end(), and set_.

Referenced by find().

Here is the call graph for this function:

auto vcsn::detail::wet_bitset::find ( key_t  k) -> iterator
inline

Definition at line 747 of file wet.hh.

References end(), and set_.

Here is the call graph for this function:

auto vcsn::detail::wet_bitset::find ( char  k) const -> const_iterator
inline

Definition at line 756 of file wet.hh.

References find(), and key().

Here is the call graph for this function:

auto vcsn::detail::wet_bitset::find ( char  k) -> iterator
inline

Definition at line 762 of file wet.hh.

References find(), and key().

Here is the call graph for this function:

static key_t vcsn::detail::wet_bitset::key ( char  k)
inlinestatic

Special for char: map -1 to 255 (MAX_UCHAR), not MAX_INT.

Definition at line 700 of file wet.hh.

Referenced by erase(), find(), and set().

self_t vcsn::detail::wet_bitset::operator& ( const self_t rhs) const
inline

Definition at line 774 of file wet.hh.

References set_.

self_t vcsn::detail::wet_bitset::operator- ( const self_t rhs) const
inline

Operators for when wet_bitset is used as a bitset.

Definition at line 769 of file wet.hh.

References set_.

const set_t& vcsn::detail::wet_bitset::set ( ) const
inline

Definition at line 583 of file wet.hh.

References set_.

Referenced by set(), and wet_bitset().

set_t& vcsn::detail::wet_bitset::set ( )
inline

FIXME: Avoid this by exposing more interfaces.

Definition at line 589 of file wet.hh.

References set_.

void vcsn::detail::wet_bitset::set ( const key_t  k,
value_t  v = true 
)
inline

Definition at line 705 of file wet.hh.

References vcsn::detail::v, and vcsn::detail::void.

void vcsn::detail::wet_bitset::set ( const char  k,
value_t  v = true 
)
inline

Definition at line 711 of file wet.hh.

References key(), set(), and vcsn::detail::v.

Here is the call graph for this function:

void vcsn::detail::wet_bitset::set ( const iterator ,
const value_t  v = true 
)
inline

Definition at line 717 of file wet.hh.

References vcsn::detail::v, and vcsn::detail::void.

size_t vcsn::detail::wet_bitset::size ( ) const
inline

Definition at line 604 of file wet.hh.

Friends And Related Function Documentation

bool operator< ( const self_t lhs,
const self_t rhs 
)
friend

Allow wet_bitset to be used in containers.

Definition at line 780 of file wet.hh.

Member Data Documentation

constexpr wet_kind_t vcsn::detail::wet_bitset::kind = wet_kind_t::bitset
static

Definition at line 554 of file wet.hh.

constexpr size_t vcsn::detail::wet_bitset::npos = set_t::npos
static

Definition at line 609 of file wet.hh.

set_t vcsn::detail::wet_bitset::set_
private

Definition at line 550 of file wet.hh.

Referenced by cend(), end(), find(), operator&(), operator-(), and set().


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