Awali
Another Weighted Automata library
Public Types | Public Member Functions | Static Public Member Functions
awali::sttc::nullableset< LabelSet > Class Template Reference

Implementation of labels are nullables (letter or empty). More...

#include <fwd.hh>

Public Types

using helper_t = internal::nullable_helper< labelset_t >
 
using kind_t = typename helper_t::kind_t
 
using labelset_ptr = std::shared_ptr< const labelset_t >
 
using labelset_t = LabelSet
 
using self_type = nullableset
 
using value_t = typename helper_t::value_t
 

Public Member Functions

 nullableset (const labelset_t &ls)
 
 nullableset (const std::shared_ptr< const labelset_t > &ls)
 
value_t conv (self_type, value_t v) const
 
value_t conv (std::istream &i) const
 
std::set< value_tconvs (std::istream &i) const
 
bool is_letter (const value_t &v) const
 
bool is_valid (value_t v) const
 
bool is_zero (const value_t &v) const
 
const labelset_ptr labelset () const
 
bool open (bool o) const
 Whether unknown letters should be added, or rejected. More...
 
value_t parse (const std::string &s, size_t &p, bool fixed_domain=true) const
 
std::ostream & print (value_t l, std::ostream &o, const std::string &format="text") const
 
std::ostream & print_set (std::ostream &o, const std::string &format="text") const
 
size_t size (const value_t &v) const
 
template<unsigned version = version::fsm_json>
json::node_tto_json () const
 
value_t transpose (const value_t &l) const
 
template<typename... Args>
value_t value (Args &&... args) const
 
template<unsigned version = version::fsm_json>
value_t value_from_json (json::node_t *p) const
 
template<unsigned version = version::fsm_json>
json::node_tvalue_to_json (value_t value) const
 
std::string vname (bool full=true) const
 
value_t zero () const
 

Static Public Member Functions

static bool equals (const value_t &l, const value_t &r)
 Whether l == r. More...
 
static constexpr bool has_one ()
 
static size_t hash (const value_t &v)
 
static constexpr bool is_free ()
 
static constexpr bool is_letterized ()
 
static ATTRIBUTE_PURE bool is_one (value_t l)
 
static constexpr bool is_ratexpset ()
 
static bool is_special (const value_t &l)
 
static bool less_than (const value_t &l, const value_t &r)
 Whether l < r. More...
 
static nullableset make (std::istream &i)
 Build from the description in is. More...
 
static void make_nullableset_kind (std::istream &is)
 
static constexpr ATTRIBUTE_PURE value_t one ()
 
static std::string sname ()
 
static value_t special ()
 

Detailed Description

template<typename LabelSet>
class awali::sttc::nullableset< LabelSet >

Implementation of labels are nullables (letter or empty).

Member Typedef Documentation

◆ helper_t

template<typename LabelSet >
using awali::sttc::nullableset< LabelSet >::helper_t = internal::nullable_helper<labelset_t>

◆ kind_t

template<typename LabelSet >
using awali::sttc::nullableset< LabelSet >::kind_t = typename helper_t::kind_t

◆ labelset_ptr

template<typename LabelSet >
using awali::sttc::nullableset< LabelSet >::labelset_ptr = std::shared_ptr<const labelset_t>

◆ labelset_t

template<typename LabelSet >
using awali::sttc::nullableset< LabelSet >::labelset_t = LabelSet

◆ self_type

template<typename LabelSet >
using awali::sttc::nullableset< LabelSet >::self_type = nullableset

◆ value_t

template<typename LabelSet >
using awali::sttc::nullableset< LabelSet >::value_t = typename helper_t::value_t

Constructor & Destructor Documentation

◆ nullableset() [1/2]

template<typename LabelSet >
awali::sttc::nullableset< LabelSet >::nullableset ( const labelset_t ls)

◆ nullableset() [2/2]

template<typename LabelSet >
awali::sttc::nullableset< LabelSet >::nullableset ( const std::shared_ptr< const labelset_t > &  ls)

Member Function Documentation

◆ conv() [1/2]

template<typename LabelSet >
value_t awali::sttc::nullableset< LabelSet >::conv ( self_type  ,
value_t  v 
) const

◆ conv() [2/2]

template<typename LabelSet >
value_t awali::sttc::nullableset< LabelSet >::conv ( std::istream &  i) const
Exceptions
std::domain_errorif there is no label here.

◆ convs()

template<typename LabelSet >
std::set<value_t> awali::sttc::nullableset< LabelSet >::convs ( std::istream &  i) const

◆ equals()

template<typename LabelSet >
static bool awali::sttc::nullableset< LabelSet >::equals ( const value_t l,
const value_t r 
)
static

Whether l == r.

◆ has_one()

template<typename LabelSet >
static constexpr bool awali::sttc::nullableset< LabelSet >::has_one ( )
staticconstexpr

◆ hash()

template<typename LabelSet >
static size_t awali::sttc::nullableset< LabelSet >::hash ( const value_t v)
static

◆ is_free()

template<typename LabelSet >
static constexpr bool awali::sttc::nullableset< LabelSet >::is_free ( )
staticconstexpr

◆ is_letter()

template<typename LabelSet >
bool awali::sttc::nullableset< LabelSet >::is_letter ( const value_t v) const

◆ is_letterized()

template<typename LabelSet >
static constexpr bool awali::sttc::nullableset< LabelSet >::is_letterized ( )
staticconstexpr

◆ is_one()

template<typename LabelSet >
static ATTRIBUTE_PURE bool awali::sttc::nullableset< LabelSet >::is_one ( value_t  l)
static

◆ is_ratexpset()

template<typename LabelSet >
static constexpr bool awali::sttc::nullableset< LabelSet >::is_ratexpset ( )
staticconstexpr

◆ is_special()

template<typename LabelSet >
static bool awali::sttc::nullableset< LabelSet >::is_special ( const value_t l)
static

◆ is_valid()

template<typename LabelSet >
bool awali::sttc::nullableset< LabelSet >::is_valid ( value_t  v) const

◆ is_zero()

template<typename LabelSet >
bool awali::sttc::nullableset< LabelSet >::is_zero ( const value_t v) const

◆ labelset()

template<typename LabelSet >
const labelset_ptr awali::sttc::nullableset< LabelSet >::labelset ( ) const

◆ less_than()

template<typename LabelSet >
static bool awali::sttc::nullableset< LabelSet >::less_than ( const value_t l,
const value_t r 
)
static

Whether l < r.

◆ make()

template<typename LabelSet >
static nullableset awali::sttc::nullableset< LabelSet >::make ( std::istream &  i)
static

Build from the description in is.

◆ make_nullableset_kind()

template<typename LabelSet >
static void awali::sttc::nullableset< LabelSet >::make_nullableset_kind ( std::istream &  is)
static

◆ one()

template<typename LabelSet >
static constexpr ATTRIBUTE_PURE value_t awali::sttc::nullableset< LabelSet >::one ( )
staticconstexpr

◆ open()

template<typename LabelSet >
bool awali::sttc::nullableset< LabelSet >::open ( bool  o) const

Whether unknown letters should be added, or rejected.

Parameters
owhether to accept unknown letters
Returns
the previous status.

◆ parse()

template<typename LabelSet >
value_t awali::sttc::nullableset< LabelSet >::parse ( const std::string &  s,
size_t &  p,
bool  fixed_domain = true 
) const

◆ print()

template<typename LabelSet >
std::ostream& awali::sttc::nullableset< LabelSet >::print ( value_t  l,
std::ostream &  o,
const std::string &  format = "text" 
) const

◆ print_set()

template<typename LabelSet >
std::ostream& awali::sttc::nullableset< LabelSet >::print_set ( std::ostream &  o,
const std::string &  format = "text" 
) const

◆ size()

template<typename LabelSet >
size_t awali::sttc::nullableset< LabelSet >::size ( const value_t v) const

◆ sname()

template<typename LabelSet >
static std::string awali::sttc::nullableset< LabelSet >::sname ( )
static

◆ special()

template<typename LabelSet >
static value_t awali::sttc::nullableset< LabelSet >::special ( )
static

◆ to_json()

template<typename LabelSet >
template<unsigned version = version::fsm_json>
json::node_t* awali::sttc::nullableset< LabelSet >::to_json ( ) const

◆ transpose()

template<typename LabelSet >
value_t awali::sttc::nullableset< LabelSet >::transpose ( const value_t l) const

◆ value()

template<typename LabelSet >
template<typename... Args>
value_t awali::sttc::nullableset< LabelSet >::value ( Args &&...  args) const

◆ value_from_json()

template<typename LabelSet >
template<unsigned version = version::fsm_json>
value_t awali::sttc::nullableset< LabelSet >::value_from_json ( json::node_t p) const

◆ value_to_json()

template<typename LabelSet >
template<unsigned version = version::fsm_json>
json::node_t* awali::sttc::nullableset< LabelSet >::value_to_json ( value_t  value) const

◆ vname()

template<typename LabelSet >
std::string awali::sttc::nullableset< LabelSet >::vname ( bool  full = true) const

◆ zero()

template<typename LabelSet >
value_t awali::sttc::nullableset< LabelSet >::zero ( ) const

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