Vcsn
2.0
Be Rational
|
Implementation of labels are nullables (letter or empty). More...
#include <fwd.hh>
Public Types | |
using | labelset_t = LabelSet |
using | labelset_ptr = std::shared_ptr< const labelset_t > |
using | self_type = nullableset |
using | helper_t = detail::nullable_helper< labelset_t > |
using | kind_t = typename helper_t::kind_t |
using | value_t = typename helper_t::value_t |
using | word_t = typename labelset_t::word_t |
Public Member Functions | |
nullableset (const labelset_t &ls) | |
nullableset (const std::shared_ptr< const labelset_t > &ls) | |
std::string | vname (bool full=true) const |
bool | open (bool o) const |
Whether unknown letters should be added, or rejected. More... | |
bool | is_valid (value_t v) const |
value_t | conv (self_type, value_t v) const |
value_t | conv (oneset, typename oneset::value_t) const |
template<typename LabelSet_ > | |
value_t | conv (const LabelSet_ &ls, typename LabelSet_::value_t v) const |
Conversion from another type: first by the wrapped labelset, and then by our wrappers (in case the wrapped labelset does not support "one"). More... | |
const labelset_ptr | labelset () const |
template<typename... Args> | |
value_t | value (Args &&...args) const |
word_t | word (const value_t &l) const |
size_t | size (const value_t &v) const |
value_t | conv (std::istream &i) const |
std::set< value_t > | convs (std::istream &i) const |
std::ostream & | print (value_t l, std::ostream &o, symbol format=symbol{"text"}) const |
value_t | zero () const |
bool | is_zero (const value_t &v) const |
bool | is_letter (const value_t &v) const |
value_t | transpose (const value_t &l) const |
std::ostream & | print_set (std::ostream &o, symbol format=symbol{"text"}) const |
Static Public Member Functions | |
static std::string | sname () |
static nullableset | make (std::istream &i) |
Build from the description in is. More... | |
static constexpr bool | has_one () |
static constexpr bool | is_ratexpset () |
static constexpr bool | is_letterized () |
static constexpr bool | is_free () |
static ATTRIBUTE_PURE constexpr value_t | one () |
static ATTRIBUTE_PURE bool | is_one (value_t l) |
static bool | equals (const value_t &l, const value_t &r) |
Whether l == r. More... | |
static bool | less_than (const value_t &l, const value_t &r) |
Whether l < r. More... | |
static value_t | special () |
static bool | is_special (const value_t &v) |
static size_t | hash (const value_t &v) |
static void | make_nullableset_kind (std::istream &is) |
static labelset_t::value_t | get_value (const value_t &v) |
Return the value when it's not one. More... | |
Public Attributes | |
labelset_ptr | ls_ |
Implementation of labels are nullables (letter or empty).
using vcsn::nullableset< LabelSet >::helper_t = detail::nullable_helper<labelset_t> |
Definition at line 177 of file nullableset.hh.
using vcsn::nullableset< LabelSet >::kind_t = typename helper_t::kind_t |
Definition at line 178 of file nullableset.hh.
using vcsn::nullableset< LabelSet >::labelset_ptr = std::shared_ptr<const labelset_t> |
Definition at line 175 of file nullableset.hh.
using vcsn::nullableset< LabelSet >::labelset_t = LabelSet |
Definition at line 174 of file nullableset.hh.
using vcsn::nullableset< LabelSet >::self_type = nullableset |
Definition at line 176 of file nullableset.hh.
using vcsn::nullableset< LabelSet >::value_t = typename helper_t::value_t |
Definition at line 180 of file nullableset.hh.
using vcsn::nullableset< LabelSet >::word_t = typename labelset_t::word_t |
Definition at line 181 of file nullableset.hh.
|
inline |
Definition at line 183 of file nullableset.hh.
|
inline |
Definition at line 187 of file nullableset.hh.
|
inline |
Definition at line 259 of file nullableset.hh.
Referenced by vcsn::nullableset< LabelSet >::conv().
|
inline |
Definition at line 265 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::one().
|
inline |
Conversion from another type: first by the wrapped labelset, and then by our wrappers (in case the wrapped labelset does not support "one").
Definition at line 275 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::conv(), vcsn::nullableset< LabelSet >::labelset(), and vcsn::nullableset< LabelSet >::value().
|
inline |
Definition at line 345 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::ls_, vcsn::nullableset< LabelSet >::one(), vcsn::require(), vcsn::str_escape(), and vcsn::nullableset< LabelSet >::value().
|
inline |
Definition at line 362 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::ls_, and vcsn::nullableset< LabelSet >::value().
|
inlinestatic |
Whether l == r.
Definition at line 300 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::get_value(), and vcsn::nullableset< LabelSet >::is_one().
|
inlinestatic |
Return the value when it's not one.
Definition at line 432 of file nullableset.hh.
References vcsn::detail::nullable_helper< LabelSet >::get_value().
Referenced by vcsn::nullableset< LabelSet >::equals(), vcsn::nullableset< LabelSet >::hash(), vcsn::nullableset< LabelSet >::is_letter(), vcsn::nullableset< LabelSet >::is_special(), vcsn::nullableset< LabelSet >::is_valid(), vcsn::nullableset< LabelSet >::is_zero(), vcsn::nullableset< LabelSet >::less_than(), vcsn::nullableset< LabelSet >::size(), vcsn::nullableset< LabelSet >::transpose(), and vcsn::nullableset< LabelSet >::word().
|
inlinestatic |
Definition at line 216 of file nullableset.hh.
|
inlinestatic |
Definition at line 336 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::get_value(), and vcsn::detail::nullable_helper< LabelSet >::is_one().
|
inlinestatic |
Definition at line 233 of file nullableset.hh.
|
inline |
Definition at line 401 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::get_value(), and vcsn::nullableset< LabelSet >::labelset().
|
inlinestatic |
Definition at line 228 of file nullableset.hh.
|
inlinestatic |
Definition at line 247 of file nullableset.hh.
References vcsn::detail::nullable_helper< LabelSet >::is_one().
Referenced by vcsn::nullableset< LabelSet >::equals(), vcsn::nullableset< LabelSet >::is_special(), vcsn::nullableset< LabelSet >::is_valid(), vcsn::nullableset< LabelSet >::less_than(), vcsn::nullableset< LabelSet >::size(), and vcsn::nullableset< LabelSet >::transpose().
|
inlinestatic |
Definition at line 222 of file nullableset.hh.
|
inlinestatic |
Definition at line 325 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::get_value(), and vcsn::nullableset< LabelSet >::is_one().
|
inline |
Definition at line 253 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::get_value(), vcsn::nullableset< LabelSet >::is_one(), and vcsn::nullableset< LabelSet >::labelset().
|
inline |
Definition at line 395 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::get_value(), and vcsn::nullableset< LabelSet >::labelset().
|
inline |
Definition at line 280 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::ls_.
Referenced by vcsn::nullableset< LabelSet >::conv(), vcsn::nullableset< LabelSet >::is_letter(), vcsn::nullableset< LabelSet >::is_valid(), vcsn::nullableset< LabelSet >::is_zero(), vcsn::nullableset< LabelSet >::open(), vcsn::random_label(), vcsn::nullableset< LabelSet >::vname(), vcsn::nullableset< LabelSet >::word(), and vcsn::nullableset< LabelSet >::zero().
|
inlinestatic |
Whether l < r.
Definition at line 308 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::get_value(), vcsn::nullableset< LabelSet >::is_one(), and vcsn::less_than().
|
inlinestatic |
Build from the description in is.
Definition at line 202 of file nullableset.hh.
References vcsn::detail::nullable_helper< LabelSet >::make().
|
inlinestatic |
Definition at line 383 of file nullableset.hh.
References vcsn::eat().
Referenced by vcsn::detail::nullable_helper< LabelSet >::make(), and vcsn::detail::nullable_helper< letterset< GenSet > >::make().
|
inlinestatic |
Definition at line 240 of file nullableset.hh.
References vcsn::detail::nullable_helper< LabelSet >::one().
Referenced by vcsn::nullableset< LabelSet >::conv(), and vcsn::random_label().
|
inline |
Whether unknown letters should be added, or rejected.
o | whether to accept unknown letters |
Definition at line 210 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::labelset().
|
inline |
Definition at line 372 of file nullableset.hh.
|
inline |
Definition at line 415 of file nullableset.hh.
|
inline |
Definition at line 330 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::get_value(), and vcsn::nullableset< LabelSet >::is_one().
|
inlinestatic |
Definition at line 191 of file nullableset.hh.
References vcsn::sname().
|
inlinestatic |
Definition at line 319 of file nullableset.hh.
References vcsn::detail::nullable_helper< LabelSet >::special().
|
inline |
Definition at line 407 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::get_value(), vcsn::nullableset< LabelSet >::is_one(), vcsn::nullableset< LabelSet >::ls_, and vcsn::nullableset< LabelSet >::value().
|
inline |
Definition at line 287 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::ls_, and vcsn::detail::nullable_helper< LabelSet >::value().
Referenced by vcsn::nullableset< LabelSet >::conv(), vcsn::nullableset< LabelSet >::convs(), vcsn::random_label(), vcsn::nullableset< LabelSet >::transpose(), and vcsn::nullableset< LabelSet >::zero().
|
inline |
Definition at line 196 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::labelset().
|
inline |
Definition at line 293 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::get_value(), and vcsn::nullableset< LabelSet >::labelset().
|
inline |
Definition at line 389 of file nullableset.hh.
References vcsn::nullableset< LabelSet >::labelset(), and vcsn::nullableset< LabelSet >::value().
labelset_ptr vcsn::nullableset< LabelSet >::ls_ |
Definition at line 437 of file nullableset.hh.
Referenced by vcsn::nullableset< LabelSet >::conv(), vcsn::nullableset< LabelSet >::convs(), vcsn::nullableset< LabelSet >::labelset(), vcsn::nullableset< LabelSet >::transpose(), and vcsn::nullableset< LabelSet >::value().