Awali
Another Weighted Automata library
|
Implementation of labels are letters. More...
#include <letterset.hh>
Public Types | |
using | genset_ptr = std::shared_ptr< const genset_t > |
using | genset_t = GenSet |
using | kind_t = labels_are_letters |
using | letter_t = typename genset_t::letter_t |
using | letters_t = std::set< letter_t > |
using | self_type = letterset |
using | value_t = letter_t |
using | word_t = typename wordset< genset_t >::word_t |
Public Member Functions | |
letterset (const genset_t &gs={}) | |
letterset (const letters_t &letters) | |
letterset (const std::initializer_list< letter_t > &letters) | |
value_t | conv (std::istream &i) const |
Read one letter from i, return the corresponding label. More... | |
std::set< value_t > | convs (std::istream &i) const |
const genset_t & | genset () const |
bool | is_valid (value_t v) 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 (const value_t &l, std::ostream &o, const std::string &="text") const |
std::ostream & | print_set (std::ostream &o, const std::string &format="text") const |
template<unsigned version = version::fsm_json> | |
json::node_t * | to_json () const |
value_t | transpose (const value_t &v) const |
template<typename... Args> | |
value_t | value (Args &&... args) const |
Value constructor. More... | |
template<unsigned version = version::fsm_json> | |
value_t | value_from_json (json::node_t const *p) const |
template<unsigned version = version::fsm_json> | |
json::node_t * | value_to_json (value_t v) const |
std::string | vname (bool full=true) const |
word_t | word (value_t v) const |
Convert to a word. More... | |
Static Public Member Functions | |
static value_t | conv (self_type, value_t v) |
static bool | equals (const value_t l, const value_t r) |
Whether l == r. More... | |
static constexpr bool | has_one () |
static size_t | hash (value_t v) |
static constexpr bool | is_free () |
static constexpr bool | is_letterized () |
static constexpr bool | is_one (value_t) |
static constexpr bool | is_ratexpset () |
static bool | is_special (value_t v) ATTRIBUTE_PURE |
static bool | less_than (const value_t l, const value_t r) |
Whether l < r. More... | |
static word_t | letters_of (word_t v) |
Prepare to iterate over the letters of v. More... | |
static letterset | make (std::istream &is) |
Build from the description in is. More... | |
static size_t | size (value_t) |
static std::string | sname () |
static value_t | special () ATTRIBUTE_PURE |
Implementation of labels are letters.
using awali::sttc::letterset< GenSet >::genset_ptr = std::shared_ptr<const genset_t> |
using awali::sttc::letterset< GenSet >::genset_t = GenSet |
using awali::sttc::letterset< GenSet >::kind_t = labels_are_letters |
using awali::sttc::letterset< GenSet >::letter_t = typename genset_t::letter_t |
using awali::sttc::letterset< GenSet >::letters_t = std::set<letter_t> |
using awali::sttc::letterset< GenSet >::self_type = letterset |
using awali::sttc::letterset< GenSet >::value_t = letter_t |
using awali::sttc::letterset< GenSet >::word_t = typename wordset<genset_t>::word_t |
awali::sttc::letterset< GenSet >::letterset | ( | const genset_t & | gs = {} | ) |
awali::sttc::letterset< GenSet >::letterset | ( | const std::initializer_list< letter_t > & | letters | ) |
awali::sttc::letterset< GenSet >::letterset | ( | const letters_t & | letters | ) |
|
static |
value_t awali::sttc::letterset< GenSet >::conv | ( | std::istream & | i | ) | const |
Read one letter from i, return the corresponding label.
std::set<value_t> awali::sttc::letterset< GenSet >::convs | ( | std::istream & | i | ) | const |
|
static |
Whether l == r.
const genset_t& awali::sttc::letterset< GenSet >::genset | ( | ) | const |
|
staticconstexpr |
|
static |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
static |
bool awali::sttc::letterset< GenSet >::is_valid | ( | value_t | v | ) | const |
|
static |
Whether l < r.
|
static |
Prepare to iterate over the letters of v.
|
static |
Build from the description in is.
bool awali::sttc::letterset< GenSet >::open | ( | bool | o | ) | const |
Whether unknown letters should be added, or rejected.
o | whether to accept |
value_t awali::sttc::letterset< GenSet >::parse | ( | const std::string & | s, |
size_t & | p, | ||
bool | fixed_domain = true |
||
) | const |
std::ostream& awali::sttc::letterset< GenSet >::print | ( | const value_t & | l, |
std::ostream & | o, | ||
const std::string & | = "text" |
||
) | const |
std::ostream& awali::sttc::letterset< GenSet >::print_set | ( | std::ostream & | o, |
const std::string & | format = "text" |
||
) | const |
|
static |
|
static |
|
static |
json::node_t* awali::sttc::letterset< GenSet >::to_json | ( | ) | const |
value_t awali::sttc::letterset< GenSet >::transpose | ( | const value_t & | v | ) | const |
value_t awali::sttc::letterset< GenSet >::value | ( | Args &&... | args | ) | const |
Value constructor.
value_t awali::sttc::letterset< GenSet >::value_from_json | ( | json::node_t const * | p | ) | const |
json::node_t* awali::sttc::letterset< GenSet >::value_to_json | ( | value_t | v | ) | const |
std::string awali::sttc::letterset< GenSet >::vname | ( | bool | full = true | ) | const |
word_t awali::sttc::letterset< GenSet >::word | ( | value_t | v | ) | const |
Convert to a word.