Vcsn
2.0
Be Rational
|
A ValueSet which is a Cartesian product of ValueSets. More...
#include <fwd.hh>
Public Types | |
using | valuesets_t = std::tuple< ValueSets...> |
using | indices_t = vcsn::detail::make_index_sequence< sizeof...(ValueSets)> |
template<std::size_t... I> | |
using | seq = vcsn::detail::index_sequence< I...> |
template<std::size_t I> | |
using | valueset_t = typename std::tuple_element< I, valuesets_t >::type |
The Ith valueset type. More... | |
using | self_type = tupleset |
using | value_t = std::tuple< typename ValueSets::value_t...> |
A tuple of values. More... | |
using | letter_t = typename labelset_types< ValueSets...>::letter_t |
A tuple of letters if meaningful, void otherwise. More... | |
using | genset_t = typename labelset_types< ValueSets...>::genset_t |
A tuple of gensets if meaningful, void otherwise. More... | |
using | word_t = typename labelset_types< ValueSets...>::word_t |
A tuple of words if meaningful, void otherwise. More... | |
using | value_type = letter_t |
To be iterable. More... | |
using | kind_t = labels_are_tuples |
Public Member Functions | |
tupleset (valuesets_t vs) | |
tupleset (ValueSets...ls) | |
std::string | vname (bool full=true) const |
tupleset | join (const tupleset &rhs) const |
The join with another tupleset. More... | |
const valuesets_t & | sets () const |
The componants valuesets, as a tuple. More... | |
template<size_t I> | |
const valueset_t< I > & | set () const |
The Ith component valueset. More... | |
bool | open (bool o) const |
Whether unknown letters should be added, or rejected. More... | |
template<typename... Args> | |
value_t | value (const std::tuple< Args...> &args) const |
Construct a value. More... | |
genset_t | genset () const |
The generators. Meaningful for labelsets only. More... | |
template<typename... Args> | |
auto | word (const std::tuple< Args...> &v) const -> word_t |
Convert to a word. More... | |
value_t | zero () const |
bool | is_zero (const value_t &l) const |
bool | is_letter (const value_t &) const |
value_t | add (const value_t &l, const value_t &r) const |
value_t | mul (const value_t &l, const value_t &r) const |
value_t | rdiv (const value_t &l, const value_t &r) const |
value_t | ldiv (const value_t &l, const value_t &r) const |
valueset_t< 0 >::value_t | lnormalize_here (value_t &v) const |
This tupleset must be homegeneous. More... | |
value_t | star (const value_t &l) const |
template<typename Value > | |
Value | delimit (const Value &l) const |
Add the special character first and last. More... | |
template<typename Value > | |
Value | undelimit (const Value &l) const |
Remove first and last characters, that must be "special". More... | |
template<typename LhsValue , typename RhsValue > | |
word_t | concat (const LhsValue &l, const RhsValue &r) const |
value_t | transpose (const value_t &l) const |
value_t | conv (b, b::value_t v) const |
template<typename... VS> | |
value_t | conv (const tupleset< VS...> &vs, const typename tupleset< VS...>::value_t &v) const |
Convert a value from tupleset<...> to value_t. More... | |
template<typename... VS> | |
value_t | conv (const nullableset< tupleset< VS...>> &vs, const typename nullableset< tupleset< VS...>>::value_t &v) const |
Convert a value from nullableset<tupleset<...>> to value_t. More... | |
value_t | conv (std::istream &i) const |
Read one label from i, return the corresponding value. More... | |
std::set< value_t > | convs (std::istream &) const |
std::ostream & | print_set (std::ostream &o, symbol format=symbol{"text"}) const |
std::ostream & | print (const value_t &l, std::ostream &o, symbol format=symbol{"text"}) const |
Static Public Member Functions | |
static std::string | sname () |
static constexpr std::size_t | size () |
static constexpr bool | is_commutative () |
static constexpr bool | is_idempotent () |
static tupleset | make (std::istream &is) |
Build from the description in is. More... | |
static constexpr bool | is_free () |
template<typename Value > | |
static auto | letters_of (const Value &v) -> decltype(letters_of_(v, indices)) |
Iterate over the letters of v. More... | |
static bool | equals (const value_t &l, const value_t &r) |
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 &l) |
static constexpr bool | has_one () |
static constexpr bool | is_ratexpset () |
static constexpr bool | is_letterized () |
static value_t | one () |
static bool | is_one (const value_t &l) |
static bool | show_one () |
static constexpr star_status_t | star_status () |
static size_t | hash (const value_t &v) |
static value_t | conv (self_type, value_t v) |
Static Public Attributes | |
static constexpr indices_t | indices {} |
Private Member Functions | |
template<std::size_t... I> | |
std::string | vname_ (bool full, seq< I...>) const |
template<std::size_t... I> | |
bool | open_ (bool o, seq< I...>) const |
template<typename... Args, std::size_t... I> | |
value_t | value_ (const std::tuple< Args...> &args, seq< I...>) const |
template<std::size_t... I> | |
genset_t | genset_ (seq< I...>) const |
template<typename... Args, std::size_t... I> | |
word_t | word_ (const std::tuple< Args...> &l, seq< I...>) const |
template<std::size_t... I> | |
value_t | zero_ (seq< I...>) const |
template<std::size_t... I> | |
bool | is_zero_ (const value_t &l, seq< I...>) const |
template<std::size_t... I> | |
value_t | add_ (const value_t &l, const value_t &r, seq< I...>) const |
template<std::size_t... I> | |
value_t | mul_ (const value_t &l, const value_t &r, seq< I...>) const |
template<std::size_t... I> | |
value_t | rdiv_ (const value_t &l, const value_t &r, seq< I...>) const |
template<std::size_t... I> | |
value_t | ldiv_ (const value_t &l, const value_t &r, seq< I...>) const |
template<std::size_t... I> | |
valueset_t< 0 >::value_t | lnormalize_here_ (value_t &vs, seq< I...>) const |
template<std::size_t... I> | |
value_t | star_ (value_t const &l, seq< I...>) const |
template<typename Value , std::size_t... I> | |
Value | delimit_ (Value const &l, seq< I...>) const |
template<typename Value , std::size_t... I> | |
Value | undelimit_ (Value const &l, seq< I...>) const |
template<typename LhsValue , typename RhsValue , std::size_t... I> | |
word_t | concat_ (const LhsValue &l, const RhsValue &r, seq< I...>) const |
template<typename... VS, std::size_t... I> | |
value_t | conv_ (const tupleset< VS...> &vs, const typename tupleset< VS...>::value_t &v, seq< I...>) const |
template<std::size_t... I> | |
value_t | conv_ (std::istream &i, seq< I...>) const |
template<std::size_t... I> | |
std::ostream & | print_ (value_t const &l, std::ostream &o, symbol format, seq< I...>) const |
template<std::size_t... I> | |
std::ostream & | print_set_ (std::ostream &o, symbol format, seq< I...>) const |
template<std::size_t... I> | |
value_t | transpose_ (value_t const &l, seq< I...>) const |
template<std::size_t... I> | |
tupleset | meet_ (const tupleset &rhs, seq< I...>) const |
The intersection with another tupleset. More... | |
template<std::size_t... I> | |
tupleset | join_ (const tupleset &rhs, seq< I...>) const |
The join with another tupleset. More... | |
Static Private Member Functions | |
template<typename Value , std::size_t... I> | |
static auto | letters_of_ (const Value &v, seq< I...>) -> decltype(zip(valueset_t< I >::letters_of(std::get< I >(v))...)) |
Must be declared before, as we use its result in decltype. More... | |
template<std::size_t... I> | |
static std::string | sname_ (seq< I...>) |
template<std::size_t... I> | |
static constexpr bool | is_commutative_ (seq< I...>) |
template<std::size_t... I> | |
static constexpr bool | is_idempotent_ (seq< I...>) |
template<std::size_t... I> | |
static tupleset | make_ (std::istream &i, seq< I...>) |
template<std::size_t... I> | |
static constexpr bool | is_free_ (seq< I...>) |
template<std::size_t... I> | |
static bool | equals_ (const value_t &l, const value_t &r, seq< I...>) |
template<std::size_t... I> | |
static bool | less_than_ (const value_t &l, const value_t &r, seq< I...>) |
template<std::size_t... I> | |
static std::size_t | hash_ (const value_t &v, seq< I...>) |
template<std::size_t... I> | |
static value_t | special_ (seq< I...>) |
template<std::size_t... I> | |
static bool | is_special_ (const value_t &l, seq< I...>) |
template<std::size_t... I> | |
static constexpr bool | has_one_ (seq< I...>) |
template<std::size_t... I> | |
static constexpr bool | is_ratexpset_ (seq< I...>) |
template<std::size_t... I> | |
static constexpr bool | is_letterized_ (seq< I...>) |
template<std::size_t... I> | |
static value_t | one_ (seq< I...>) |
template<std::size_t... I> | |
static bool | is_one_ (const value_t &l, seq< I...>) |
template<std::size_t... I> | |
static bool | show_one_ (seq< I...>) |
template<std::size_t I> | |
static void | eat_separator_ (std::istream &i, char first, char tail) |
Read the separator from the input stream i. More... | |
Private Attributes | |
valuesets_t | sets_ |
bool | open__ = false |
Friends | |
tupleset | meet (const tupleset &lhs, const tupleset &rhs) |
The meet with another tupleset. More... | |
tupleset | meet (const tupleset &lhs, const b &) |
The meet with the B weightset. More... | |
tupleset | meet (const b &, const tupleset &rhs) |
The meet with the B weightset. More... | |
A ValueSet which is a Cartesian product of ValueSets.
Exposes a LabelSet interface for products of LabelSets, and similarly for WeightSets.
using vcsn::tupleset< LabelSets >::genset_t = typename labelset_types<ValueSets...>::genset_t |
A tuple of gensets if meaningful, void otherwise.
Definition at line 79 of file tupleset.hh.
using vcsn::tupleset< LabelSets >::indices_t = vcsn::detail::make_index_sequence<sizeof...(ValueSets)> |
Definition at line 61 of file tupleset.hh.
using vcsn::tupleset< LabelSets >::kind_t = labels_are_tuples |
Definition at line 86 of file tupleset.hh.
using vcsn::tupleset< LabelSets >::letter_t = typename labelset_types<ValueSets...>::letter_t |
A tuple of letters if meaningful, void otherwise.
Definition at line 77 of file tupleset.hh.
using vcsn::tupleset< LabelSets >::self_type = tupleset |
Definition at line 71 of file tupleset.hh.
using vcsn::tupleset< LabelSets >::seq = vcsn::detail::index_sequence<I...> |
Definition at line 64 of file tupleset.hh.
using vcsn::tupleset< LabelSets >::value_t = std::tuple<typename ValueSets::value_t...> |
A tuple of values.
Definition at line 74 of file tupleset.hh.
using vcsn::tupleset< LabelSets >::value_type = letter_t |
To be iterable.
Definition at line 84 of file tupleset.hh.
using vcsn::tupleset< LabelSets >::valueset_t = typename std::tuple_element<I, valuesets_t>::type |
The Ith valueset type.
Definition at line 68 of file tupleset.hh.
using vcsn::tupleset< LabelSets >::valuesets_t = std::tuple<ValueSets...> |
Definition at line 60 of file tupleset.hh.
using vcsn::tupleset< LabelSets >::word_t = typename labelset_types<ValueSets...>::word_t |
A tuple of words if meaningful, void otherwise.
Definition at line 81 of file tupleset.hh.
|
inline |
Definition at line 88 of file tupleset.hh.
|
inline |
Definition at line 92 of file tupleset.hh.
|
inline |
Definition at line 293 of file tupleset.hh.
|
inlineprivate |
Definition at line 645 of file tupleset.hh.
|
inline |
Definition at line 357 of file tupleset.hh.
|
inlineprivate |
Definition at line 706 of file tupleset.hh.
|
inlinestatic |
Definition at line 375 of file tupleset.hh.
|
inline |
Definition at line 381 of file tupleset.hh.
|
inline |
Convert a value from tupleset<...> to value_t.
Definition at line 389 of file tupleset.hh.
|
inline |
Convert a value from nullableset<tupleset<...>> to value_t.
Definition at line 398 of file tupleset.hh.
References vcsn::conv().
|
inline |
Read one label from i, return the corresponding value.
Definition at line 406 of file tupleset.hh.
References vcsn::eat().
|
inlineprivate |
Definition at line 713 of file tupleset.hh.
References vcsn::conv().
|
inlineprivate |
Definition at line 722 of file tupleset.hh.
References vcsn::conv(), and vcsn::detail::make_gcc_tuple().
|
inline |
Definition at line 413 of file tupleset.hh.
|
inline |
Add the special character first and last.
Templated by Value so that we work for both word_t and label_t. Besides, avoids the problem of instantiation with weighset that do not provide a word_t type.
Definition at line 336 of file tupleset.hh.
|
inlineprivate |
Definition at line 692 of file tupleset.hh.
|
inlinestaticprivate |
Read the separator from the input stream i.
If I is 0, then the separator is '(', otherwise it is ',' (possibly followed by spaces).
Definition at line 740 of file tupleset.hh.
References vcsn::eat().
|
inlinestatic |
Definition at line 214 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 527 of file tupleset.hh.
|
inline |
The generators. Meaningful for labelsets only.
Definition at line 170 of file tupleset.hh.
|
inlineprivate |
Definition at line 506 of file tupleset.hh.
References vcsn::cross().
|
inlinestatic |
Definition at line 251 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 597 of file tupleset.hh.
|
inlinestatic |
Definition at line 369 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 553 of file tupleset.hh.
|
inlinestatic |
Definition at line 112 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 464 of file tupleset.hh.
|
inlinestatic |
Definition at line 175 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 513 of file tupleset.hh.
|
inlinestatic |
Definition at line 118 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 471 of file tupleset.hh.
|
inline |
Definition at line 287 of file tupleset.hh.
|
inlinestatic |
Definition at line 263 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 611 of file tupleset.hh.
|
inlinestatic |
Definition at line 275 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 625 of file tupleset.hh.
|
inlinestatic |
Definition at line 257 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 604 of file tupleset.hh.
|
inlinestatic |
Definition at line 233 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 570 of file tupleset.hh.
|
inline |
Definition at line 245 of file tupleset.hh.
|
inlineprivate |
Definition at line 587 of file tupleset.hh.
|
inline |
The join with another tupleset.
Definition at line 135 of file tupleset.hh.
References vcsn::detail::join_().
|
inlineprivate |
The join with another tupleset.
Definition at line 812 of file tupleset.hh.
|
inline |
Definition at line 311 of file tupleset.hh.
|
inlineprivate |
Definition at line 666 of file tupleset.hh.
|
inlinestatic |
Whether l < r.
Definition at line 221 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 538 of file tupleset.hh.
|
inlinestatic |
Iterate over the letters of v.
Templated by Value so that we work for both word_t and label_t. Besides, avoids the problem of instantiation with weighset that do not provide a word_t type.
Definition at line 198 of file tupleset.hh.
|
inlinestaticprivate |
Must be declared before, as we use its result in decltype.
Definition at line 184 of file tupleset.hh.
References vcsn::zip().
|
inline |
This tupleset must be homegeneous.
Definition at line 318 of file tupleset.hh.
|
inlineprivate |
Definition at line 673 of file tupleset.hh.
|
inlinestatic |
Build from the description in is.
Definition at line 124 of file tupleset.hh.
References vcsn::eat().
|
inlinestaticprivate |
Definition at line 477 of file tupleset.hh.
References vcsn::detail::make_gcc_tuple().
|
inlineprivate |
The intersection with another tupleset.
Definition at line 804 of file tupleset.hh.
|
inline |
Definition at line 299 of file tupleset.hh.
|
inlineprivate |
Definition at line 652 of file tupleset.hh.
|
inlinestatic |
Definition at line 269 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 618 of file tupleset.hh.
|
inline |
Whether unknown letters should be added, or rejected.
o | whether to accept |
Definition at line 156 of file tupleset.hh.
|
inlineprivate |
Definition at line 490 of file tupleset.hh.
|
inline |
Definition at line 425 of file tupleset.hh.
|
inlineprivate |
Definition at line 750 of file tupleset.hh.
|
inline |
Definition at line 419 of file tupleset.hh.
|
inlineprivate |
Definition at line 769 of file tupleset.hh.
|
inline |
Definition at line 305 of file tupleset.hh.
|
inlineprivate |
Definition at line 659 of file tupleset.hh.
|
inline |
The Ith component valueset.
Definition at line 148 of file tupleset.hh.
|
inline |
The componants valuesets, as a tuple.
Definition at line 141 of file tupleset.hh.
|
inlinestatic |
Definition at line 281 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 635 of file tupleset.hh.
|
inlinestatic |
Definition at line 106 of file tupleset.hh.
|
inlinestatic |
Definition at line 96 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 433 of file tupleset.hh.
References vcsn::sname().
|
inlinestatic |
Definition at line 227 of file tupleset.hh.
|
inlinestaticprivate |
Definition at line 563 of file tupleset.hh.
|
inline |
Definition at line 324 of file tupleset.hh.
|
inlineprivate |
Definition at line 685 of file tupleset.hh.
|
inlinestatic |
Definition at line 350 of file tupleset.hh.
References vcsn::STARRABLE.
|
inline |
Definition at line 363 of file tupleset.hh.
|
inlineprivate |
Definition at line 796 of file tupleset.hh.
|
inline |
Remove first and last characters, that must be "special".
Definition at line 344 of file tupleset.hh.
|
inlineprivate |
Definition at line 699 of file tupleset.hh.
|
inline |
|
inlineprivate |
Definition at line 499 of file tupleset.hh.
|
inline |
Definition at line 101 of file tupleset.hh.
|
inlineprivate |
Definition at line 448 of file tupleset.hh.
References vcsn::vname().
|
inline |
Convert to a word.
Definition at line 207 of file tupleset.hh.
|
inlineprivate |
Definition at line 520 of file tupleset.hh.
|
inline |
Definition at line 239 of file tupleset.hh.
|
inlineprivate |
Definition at line 580 of file tupleset.hh.
|
friend |
The meet with another tupleset.
Definition at line 820 of file tupleset.hh.
|
friend |
The meet with the B weightset.
Definition at line 828 of file tupleset.hh.
|
friend |
The meet with the B weightset.
Definition at line 836 of file tupleset.hh.
|
static |
Definition at line 62 of file tupleset.hh.
Referenced by vcsn::random_label().
|
mutableprivate |
Definition at line 842 of file tupleset.hh.
|
private |
Definition at line 841 of file tupleset.hh.