![]() |
Vcsn
2.4
Be Rational
|
Weighted set: labels are non-negative integers, weights are bools. More...
#include <wet.hh>
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_t & | set () const |
| set_t & | set () |
| 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... | |
Weighted set: labels are non-negative integers, weights are bools.
| using vcsn::detail::wet_bitset::const_iterator = iterator_impl<const value_type, const set_t> |
| using vcsn::detail::wet_bitset::key_t = unsigned |
|
private |
| using vcsn::detail::wet_bitset::value_t = bool |
|
inline |
Definition at line 576 of file wet.hh.
References vcsn::label_of(), set(), and vcsn::weight_of().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Operators for when wet_bitset is used as a bitset.
Definition at line 773 of file wet.hh.
References set_.
|
inline |
|
inline |
Definition at line 709 of file wet.hh.
References vcsn::detail::v, and vcsn::detail::void.
Definition at line 715 of file wet.hh.
References key(), set(), and vcsn::detail::v.
Definition at line 721 of file wet.hh.
References vcsn::detail::v, and vcsn::detail::void.
Allow wet_bitset to be used in containers.
|
static |
|
static |
|
private |
Definition at line 553 of file wet.hh.
Referenced by cend(), end(), find(), operator&(), operator-(), and set().