Vcsn  2.1
Be Rational
vcsn::detail::tupleset_impl< ValueSets > Class Template Reference

A ValueSet which is a Cartesian product of ValueSets. More...

#include <fwd.hh>

Collaboration diagram for vcsn::detail::tupleset_impl< ValueSets >:

Public Types

using valuesets_t = std::tuple< ValueSets...>
 
using indices_t = make_index_sequence< sizeof...(ValueSets)>
 
template<std::size_t... I>
using seq = index_sequence< I...>
 
template<std::size_t I>
using valueset_t = tuple_element_t< I, valuesets_t >
 The Ith valueset type. More...
 
using self_t = tupleset< ValueSets...>
 
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_impl (valuesets_t vs)
 
 tupleset_impl (ValueSets...ls)
 
const valuesets_tsets () 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...
 
template<typename... Args>
value_t 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
 Pointwise addition. More...
 
template<typename LhsValue , typename RhsValue >
auto mul (const LhsValue &l, const RhsValue &r) const -> word_t
 The product (possibly concatenation) of l and r. More...
 
value_t lgcd (const value_t &l, const value_t &r) const
 The pointwise LGCD. More...
 
value_t rdiv (const value_t &l, const value_t &r) const
 Pointwise right division (l / r). More...
 
value_t ldiv (const value_t &l, const value_t &r) const
 Pointwise left division (l \ r). More...
 
valueset_t< 0 >::value_t lnormalize_here (value_t &v) const
 Eliminate the LGCD between all the tapes. 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 Value >
Value transpose (const Value &l) const
 Transpose a word_t or a value_t. More...
 
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, bool quoted=true) const
 Read one label from i, return the corresponding value. More...
 
std::ostream & print_set (std::ostream &o, format fmt={}) const
 
std::ostream & print (const value_t &l, std::ostream &o, format fmt={}) const
 
template<std::size_t... I>
auto get_letter (std::istream &i, bool quoted=true) const -> decltype(this->get_letter_(i, quoted, indices))
 
template<typename Value , typename... Defaults>
auto letters_of_padded (const Value &v, const std::tuple< Defaults...> &def) const -> decltype(this->letters_of_padded_(v, def, indices))
 Iterate over the letters of v. More...
 

Static Public Member Functions

static symbol sname ()
 
static constexpr std::size_t size ()
 Number of tapes. More...
 
static size_t size (const value_t &v)
 Get the max of the sizes of the tapes. More...
 
static constexpr bool is_commutative ()
 
static constexpr bool is_idempotent ()
 
static self_t make (std::istream &is)
 Build from the description in is. More...
 
static constexpr bool is_free ()
 
static bool equal (const value_t &l, const value_t &r)
 Whether l equals r. More...
 
static bool less (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_expressionset ()
 
static constexpr bool is_letterized ()
 
template<typename Indices = indices_t>
static auto one () -> decltype(one_(Indices
 A tuple of ones. More...
 
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_t, value_t v)
 
template<typename Fun >
static void convs (std::istream &, Fun)
 
template<typename Value >
static auto letters_of (const Value &v) -> decltype(letters_of_(v, indices))
 Iterate over the letters of v. More...
 

Static Public Attributes

static constexpr indices_t indices {}
 

Private Member Functions

template<typename LhsValue , typename RhsValue , std::size_t... I>
auto mul_ (const LhsValue &l, const RhsValue &r, seq< I...>) const -> word_t
 
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 lgcd_ (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_ (const value_t &l, seq< I...>) const
 
template<typename Value , std::size_t... I>
Value delimit_ (const Value &l, seq< I...>) const
 
template<typename Value , std::size_t... I>
Value undelimit_ (const Value &l, 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
 
value_t conv_ (std::istream &i, bool quoted, std::true_type) const
 When the valuesets are labelsets and support one, accept the empty string to denote one. More...
 
value_t conv_ (std::istream &i, bool quoted, std::false_type) const
 Read a tuple in the stream, possibly parenthesized. More...
 
template<std::size_t... I>
value_t conv_ (std::istream &i, bool quoted, seq< I...>) const
 
template<std::size_t... I>
std::ostream & print_ (const value_t &l, std::ostream &o, format fmt, const char *pre, const char *sep, const char *post, seq< I...>) const
 
template<std::size_t... I>
std::ostream & print_set_ (std::ostream &o, format fmt, seq< I...>) const
 
template<typename Value , std::size_t... I>
Value transpose_ (const Value &l, seq< I...>) const
 
template<std::size_t... I>
self_t meet_ (const self_t &rhs, seq< I...>) const
 The intersection with another tupleset. More...
 
template<std::size_t... I>
auto get_letter_ (std::istream &i, bool quoted, seq< I...>) const -> letter_t
 Must be declared before, as we use its result in decltype. More...
 
template<typename Value , typename... Defaults, std::size_t... I>
auto letters_of_padded_ (const Value &v, const std::tuple< Defaults...> &def, seq< I...>) const -> decltype(zip_with_padding(def, this->set< I >().letters_of_padded(std::get< I >(v), std::get< I >(def))...))
 Must be declared before, as we use its result in decltype. More...
 

Static Private Member Functions

template<std::size_t... I>
static auto one_ (seq< I...>) -> decltype(value_t
 
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 self_t make_ (std::istream &i, seq< I...>)
 
template<std::size_t I>
static auto size_ (const value_t &v, int) -> decltype(valueset_t< I >::size(std::get< I >(v)))
 The size of the Ith element, if its valueset features a size() function. More...
 
template<std::size_t I>
static constexpr auto size_ (const value_t &,...) -> size_t
 The size of the Ith element, if its valueset does not feature a size() function. More...
 
template<std::size_t... I>
static size_t size_ (const value_t &v, seq< I...>)
 
template<std::size_t... I>
static constexpr bool is_free_ (seq< I...>)
 
template<std::size_t... I>
static bool equal_ (const value_t &l, const value_t &r, seq< I...>)
 
template<std::size_t... I>
static bool less_ (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_expressionset_ (seq< I...>)
 
template<std::size_t... I>
static constexpr bool is_letterized_ (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)
 Read the separator from the input stream i if I is not 0. More...
 
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...
 

Private Attributes

valuesets_t sets_
 The tupled valuesets. More...
 
bool open__ = false
 Whether this valueset is open. More...
 

Friends

self_t meet (const self_t &lhs, const self_t &rhs)
 The meet with another tupleset. More...
 
self_t meet (const self_t &lhs, const b &)
 The meet with the B weightset. More...
 
self_t meet (const b &, const self_t &rhs)
 The meet with the B weightset. More...
 

Detailed Description

template<typename... ValueSets>
class vcsn::detail::tupleset_impl< ValueSets >

A ValueSet which is a Cartesian product of ValueSets.

Exposes a LabelSet interface for products of LabelSets, and similarly for WeightSets.

Definition at line 23 of file fwd.hh.

Member Typedef Documentation

template<typename... ValueSets>
using vcsn::detail::tupleset_impl< ValueSets >::genset_t = typename labelset_types<ValueSets...>::genset_t

A tuple of gensets if meaningful, void otherwise.

Definition at line 79 of file tupleset.hh.

template<typename... ValueSets>
using vcsn::detail::tupleset_impl< ValueSets >::indices_t = make_index_sequence<sizeof...(ValueSets)>

Definition at line 61 of file tupleset.hh.

template<typename... ValueSets>
using vcsn::detail::tupleset_impl< ValueSets >::kind_t = labels_are_tuples

Definition at line 86 of file tupleset.hh.

template<typename... ValueSets>
using vcsn::detail::tupleset_impl< ValueSets >::letter_t = typename labelset_types<ValueSets...>::letter_t

A tuple of letters if meaningful, void otherwise.

Definition at line 77 of file tupleset.hh.

template<typename... ValueSets>
using vcsn::detail::tupleset_impl< ValueSets >::self_t = tupleset<ValueSets...>

Definition at line 71 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
using vcsn::detail::tupleset_impl< ValueSets >::seq = index_sequence<I...>

Definition at line 64 of file tupleset.hh.

template<typename... ValueSets>
using vcsn::detail::tupleset_impl< ValueSets >::value_t = std::tuple<typename ValueSets::value_t...>

A tuple of values.

Definition at line 74 of file tupleset.hh.

template<typename... ValueSets>
using vcsn::detail::tupleset_impl< ValueSets >::value_type = letter_t

To be iterable.

Definition at line 84 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t I>
using vcsn::detail::tupleset_impl< ValueSets >::valueset_t = tuple_element_t<I, valuesets_t>

The Ith valueset type.

Definition at line 68 of file tupleset.hh.

template<typename... ValueSets>
using vcsn::detail::tupleset_impl< ValueSets >::valuesets_t = std::tuple<ValueSets...>

Definition at line 60 of file tupleset.hh.

template<typename... ValueSets>
using vcsn::detail::tupleset_impl< ValueSets >::word_t = typename labelset_types<ValueSets...>::word_t

A tuple of words if meaningful, void otherwise.

Definition at line 81 of file tupleset.hh.

Constructor & Destructor Documentation

template<typename... ValueSets>
vcsn::detail::tupleset_impl< ValueSets >::tupleset_impl ( valuesets_t  vs)
inline

Definition at line 88 of file tupleset.hh.

template<typename... ValueSets>
vcsn::detail::tupleset_impl< ValueSets >::tupleset_impl ( ValueSets...  ls)
inline

Definition at line 92 of file tupleset.hh.

Member Function Documentation

template<typename... ValueSets>
value_t vcsn::detail::tupleset_impl< ValueSets >::add ( const value_t l,
const value_t r 
) const
inline

Pointwise addition.

Definition at line 306 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
value_t vcsn::detail::tupleset_impl< ValueSets >::add_ ( const value_t l,
const value_t r,
seq< I...>   
) const
inlineprivate

Definition at line 680 of file tupleset.hh.

template<typename... ValueSets>
static value_t vcsn::detail::tupleset_impl< ValueSets >::conv ( self_t  ,
value_t  v 
)
inlinestatic

Definition at line 401 of file tupleset.hh.

References vcsn::v.

template<typename... ValueSets>
value_t vcsn::detail::tupleset_impl< ValueSets >::conv ( b  ,
b::value_t  v 
) const
inline

Definition at line 407 of file tupleset.hh.

template<typename... ValueSets>
template<typename... VS>
value_t vcsn::detail::tupleset_impl< ValueSets >::conv ( const tupleset< VS...> &  vs,
const typename tupleset< VS...>::value_t v 
) const
inline

Convert a value from tupleset<...> to value_t.

Definition at line 415 of file tupleset.hh.

template<typename... ValueSets>
template<typename... VS>
value_t vcsn::detail::tupleset_impl< ValueSets >::conv ( const nullableset< tupleset< VS...>> &  vs,
const typename nullableset< tupleset< VS...>>::value_t v 
) const
inline

Convert a value from nullableset<tupleset<...>> to value_t.

Definition at line 424 of file tupleset.hh.

References vcsn::conv().

Here is the call graph for this function:

template<typename... ValueSets>
value_t vcsn::detail::tupleset_impl< ValueSets >::conv ( std::istream &  i,
bool  quoted = true 
) const
inline

Read one label from i, return the corresponding value.

Definition at line 432 of file tupleset.hh.

template<typename... ValueSets>
template<typename... VS, std::size_t... I>
value_t vcsn::detail::tupleset_impl< ValueSets >::conv_ ( const tupleset< VS...> &  vs,
const typename tupleset< VS...>::value_t v,
seq< I...>   
) const
inlineprivate

Definition at line 741 of file tupleset.hh.

References vcsn::conv(), and vcsn::v.

Here is the call graph for this function:

template<typename... ValueSets>
value_t vcsn::detail::tupleset_impl< ValueSets >::conv_ ( std::istream &  i,
bool  quoted,
std::true_type   
) const
inlineprivate

When the valuesets are labelsets and support one, accept the empty string to denote one.

Definition at line 751 of file tupleset.hh.

template<typename... ValueSets>
value_t vcsn::detail::tupleset_impl< ValueSets >::conv_ ( std::istream &  i,
bool  quoted,
std::false_type   
) const
inlineprivate

Read a tuple in the stream, possibly parenthesized.

Definition at line 762 of file tupleset.hh.

References vcsn::eat().

Here is the call graph for this function:

template<typename... ValueSets>
template<std::size_t... I>
value_t vcsn::detail::tupleset_impl< ValueSets >::conv_ ( std::istream &  i,
bool  quoted,
seq< I...>   
) const
inlineprivate

Definition at line 775 of file tupleset.hh.

References vcsn::conv(), and vcsn::detail::make_gcc_tuple().

Here is the call graph for this function:

template<typename... ValueSets>
template<typename Fun >
static void vcsn::detail::tupleset_impl< ValueSets >::convs ( std::istream &  ,
Fun   
)
inlinestatic

Definition at line 442 of file tupleset.hh.

template<typename... ValueSets>
template<typename Value >
Value vcsn::detail::tupleset_impl< ValueSets >::delimit ( const Value &  l) const
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 weightsets that do not provide a word_t type.

Definition at line 367 of file tupleset.hh.

template<typename... ValueSets>
template<typename Value , std::size_t... I>
Value vcsn::detail::tupleset_impl< ValueSets >::delimit_ ( const Value &  l,
seq< I...>   
) const
inlineprivate

Definition at line 727 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t I>
static void vcsn::detail::tupleset_impl< ValueSets >::eat_separator_ ( std::istream &  i)
inlinestaticprivate

Read the separator from the input stream i if I is not 0.

The separator is '|' (for labels), but ',' is accepted too (for weights).

Definition at line 794 of file tupleset.hh.

References vcsn::eat().

Here is the call graph for this function:

template<typename... ValueSets>
static bool vcsn::detail::tupleset_impl< ValueSets >::equal ( const value_t l,
const value_t r 
)
inlinestatic

Whether l equals r.

Definition at line 205 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static bool vcsn::detail::tupleset_impl< ValueSets >::equal_ ( const value_t l,
const value_t r,
seq< I...>   
)
inlinestaticprivate

Definition at line 569 of file tupleset.hh.

template<typename... ValueSets>
genset_t vcsn::detail::tupleset_impl< ValueSets >::genset ( ) const
inline

The generators. Meaningful for labelsets only.

Definition at line 174 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
genset_t vcsn::detail::tupleset_impl< ValueSets >::genset_ ( seq< I...>  ) const
inlineprivate

Definition at line 548 of file tupleset.hh.

References vcsn::cross().

Here is the call graph for this function:

template<typename... ValueSets>
template<std::size_t... I>
auto vcsn::detail::tupleset_impl< ValueSets >::get_letter ( std::istream &  i,
bool  quoted = true 
) const -> decltype(this->get_letter_(i, quoted, indices))
inline

Definition at line 941 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
auto vcsn::detail::tupleset_impl< ValueSets >::get_letter_ ( std::istream &  i,
bool  quoted,
seq< I...>   
) const -> letter_t
inlineprivate

Must be declared before, as we use its result in decltype.

Definition at line 901 of file tupleset.hh.

template<typename... ValueSets>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::has_one ( )
inlinestatic

Definition at line 249 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::has_one_ ( seq< I...>  )
inlinestaticprivate

Definition at line 639 of file tupleset.hh.

template<typename... ValueSets>
static size_t vcsn::detail::tupleset_impl< ValueSets >::hash ( const value_t v)
inlinestatic

Definition at line 395 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static std::size_t vcsn::detail::tupleset_impl< ValueSets >::hash_ ( const value_t v,
seq< I...>   
)
inlinestaticprivate

Definition at line 595 of file tupleset.hh.

References vcsn::hash_combine().

Here is the call graph for this function:

template<typename... ValueSets>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_commutative ( )
inlinestatic

Definition at line 115 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_commutative_ ( seq< I...>  )
inlinestaticprivate

Definition at line 482 of file tupleset.hh.

template<typename... ValueSets>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_expressionset ( )
inlinestatic

Definition at line 255 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_expressionset_ ( seq< I...>  )
inlinestaticprivate

Definition at line 646 of file tupleset.hh.

template<typename... ValueSets>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_free ( )
inlinestatic

Definition at line 179 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_free_ ( seq< I...>  )
inlinestaticprivate

Definition at line 555 of file tupleset.hh.

template<typename... ValueSets>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_idempotent ( )
inlinestatic

Definition at line 121 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_idempotent_ ( seq< I...>  )
inlinestaticprivate

Definition at line 489 of file tupleset.hh.

template<typename... ValueSets>
bool vcsn::detail::tupleset_impl< ValueSets >::is_letter ( const value_t ) const
inline

Definition at line 298 of file tupleset.hh.

template<typename... ValueSets>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_letterized ( )
inlinestatic

Definition at line 261 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_letterized_ ( seq< I...>  )
inlinestaticprivate

Definition at line 653 of file tupleset.hh.

References vcsn::detail::is_letterized().

Here is the call graph for this function:

template<typename... ValueSets>
static bool vcsn::detail::tupleset_impl< ValueSets >::is_one ( const value_t l)
inlinestatic

Definition at line 286 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static bool vcsn::detail::tupleset_impl< ValueSets >::is_one_ ( const value_t l,
seq< I...>   
)
inlinestaticprivate

Definition at line 660 of file tupleset.hh.

template<typename... ValueSets>
static bool vcsn::detail::tupleset_impl< ValueSets >::is_special ( const value_t l)
inlinestatic

Definition at line 231 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static bool vcsn::detail::tupleset_impl< ValueSets >::is_special_ ( const value_t l,
seq< I...>   
)
inlinestaticprivate

Definition at line 612 of file tupleset.hh.

template<typename... ValueSets>
bool vcsn::detail::tupleset_impl< ValueSets >::is_zero ( const value_t l) const
inline

Definition at line 243 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
bool vcsn::detail::tupleset_impl< ValueSets >::is_zero_ ( const value_t l,
seq< I...>   
) const
inlineprivate

Definition at line 629 of file tupleset.hh.

template<typename... ValueSets>
value_t vcsn::detail::tupleset_impl< ValueSets >::ldiv ( const value_t l,
const value_t r 
) const
inline

Pointwise left division (l \ r).

Definition at line 339 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
value_t vcsn::detail::tupleset_impl< ValueSets >::ldiv_ ( const value_t l,
const value_t r,
seq< I...>   
) const
inlineprivate

Definition at line 701 of file tupleset.hh.

References vcsn::ldiv().

Here is the call graph for this function:

template<typename... ValueSets>
static bool vcsn::detail::tupleset_impl< ValueSets >::less ( const value_t l,
const value_t r 
)
inlinestatic

Whether l < r.

Definition at line 212 of file tupleset.hh.

References vcsn::rat::size().

Here is the call graph for this function:

template<typename... ValueSets>
template<std::size_t... I>
static bool vcsn::detail::tupleset_impl< ValueSets >::less_ ( const value_t l,
const value_t r,
seq< I...>   
)
inlinestaticprivate

Definition at line 580 of file tupleset.hh.

template<typename... ValueSets>
template<typename Value >
static auto vcsn::detail::tupleset_impl< ValueSets >::letters_of ( const Value &  v) -> decltype(letters_of_(v, indices))
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 weightsets that do not provide a word_t type.

Definition at line 960 of file tupleset.hh.

template<typename... ValueSets>
template<typename Value , std::size_t... I>
static auto vcsn::detail::tupleset_impl< ValueSets >::letters_of_ ( const Value &  v,
seq< I...>   
) -> decltype(zip(valueset_t<I>::letters_of(std::get<I>(v))...))
inlinestaticprivate

Must be declared before, as we use its result in decltype.

Definition at line 918 of file tupleset.hh.

template<typename... ValueSets>
template<typename Value , typename... Defaults>
auto vcsn::detail::tupleset_impl< ValueSets >::letters_of_padded ( const Value &  v,
const std::tuple< Defaults...> &  def 
) const -> decltype(this->letters_of_padded_(v, def, indices))
inline

Iterate over the letters of v.

When the tapes are not the same length, instead of stopping when the shortest tape is consumed, continue until the end of every tape, padding with the default values provided.

Definition at line 973 of file tupleset.hh.

template<typename... ValueSets>
template<typename Value , typename... Defaults, std::size_t... I>
auto vcsn::detail::tupleset_impl< ValueSets >::letters_of_padded_ ( const Value &  v,
const std::tuple< Defaults...> &  def,
seq< I...>   
) const -> decltype(zip_with_padding(def, this->set<I>().letters_of_padded(std::get<I>(v), std::get<I>(def))...))
inlineprivate

Must be declared before, as we use its result in decltype.

Definition at line 927 of file tupleset.hh.

template<typename... ValueSets>
value_t vcsn::detail::tupleset_impl< ValueSets >::lgcd ( const value_t l,
const value_t r 
) const
inline

The pointwise LGCD.

Definition at line 325 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
value_t vcsn::detail::tupleset_impl< ValueSets >::lgcd_ ( const value_t l,
const value_t r,
seq< I...>   
) const
inlineprivate

Definition at line 687 of file tupleset.hh.

References vcsn::lgcd().

Here is the call graph for this function:

template<typename... ValueSets>
valueset_t<0>::value_t vcsn::detail::tupleset_impl< ValueSets >::lnormalize_here ( value_t v) const
inline

Eliminate the LGCD between all the tapes.

E.g., (abc, abd) =>(c, d)`.

This tupleset must be homegeneous.

Definition at line 349 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
valueset_t<0>::value_t vcsn::detail::tupleset_impl< ValueSets >::lnormalize_here_ ( value_t vs,
seq< I...>   
) const
inlineprivate

Definition at line 708 of file tupleset.hh.

References vcsn::lgcd(), and vcsn::detail::void.

Here is the call graph for this function:

template<typename... ValueSets>
static self_t vcsn::detail::tupleset_impl< ValueSets >::make ( std::istream &  is)
inlinestatic

Build from the description in is.

Definition at line 127 of file tupleset.hh.

References vcsn::eat().

Here is the call graph for this function:

template<typename... ValueSets>
template<std::size_t... I>
static self_t vcsn::detail::tupleset_impl< ValueSets >::make_ ( std::istream &  i,
seq< I...>   
)
inlinestaticprivate

Definition at line 495 of file tupleset.hh.

References vcsn::detail::make_gcc_tuple().

Here is the call graph for this function:

template<typename... ValueSets>
template<std::size_t... I>
self_t vcsn::detail::tupleset_impl< ValueSets >::meet_ ( const self_t rhs,
seq< I...>   
) const
inlineprivate

The intersection with another tupleset.

Definition at line 863 of file tupleset.hh.

template<typename... ValueSets>
template<typename LhsValue , typename RhsValue >
auto vcsn::detail::tupleset_impl< ValueSets >::mul ( const LhsValue &  l,
const RhsValue &  r 
) const -> word_t
inline

The product (possibly concatenation) of l and r.

Templated in order to work with tuples of letters and/or words in the case of labelsets.

Definition at line 317 of file tupleset.hh.

template<typename... ValueSets>
template<typename LhsValue , typename RhsValue , std::size_t... I>
auto vcsn::detail::tupleset_impl< ValueSets >::mul_ ( const LhsValue &  l,
const RhsValue &  r,
seq< I...>   
) const -> word_t
inlineprivate

Definition at line 187 of file tupleset.hh.

template<typename... ValueSets>
template<typename Indices = indices_t>
static auto vcsn::detail::tupleset_impl< ValueSets >::one ( ) -> decltype(one_(Indices
inlinestatic

A tuple of ones.

Template + decltype so that this is not defined when not all the valuesets support one().

Definition at line 280 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static auto vcsn::detail::tupleset_impl< ValueSets >::one_ ( seq< I...>  ) -> decltype(value_t
inlinestaticprivate

Definition at line 268 of file tupleset.hh.

template<typename... ValueSets>
bool vcsn::detail::tupleset_impl< ValueSets >::open ( bool  o) const
inline

Whether unknown letters should be added, or rejected.

Parameters
owhether to accept
Returns
the previous status.

Definition at line 153 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
bool vcsn::detail::tupleset_impl< ValueSets >::open_ ( bool  o,
seq< I...>   
) const
inlineprivate

Definition at line 508 of file tupleset.hh.

References vcsn::detail::void.

template<typename... ValueSets>
std::ostream& vcsn::detail::tupleset_impl< ValueSets >::print ( const value_t l,
std::ostream &  o,
format  fmt = {} 
) const
inline

Definition at line 454 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
std::ostream& vcsn::detail::tupleset_impl< ValueSets >::print_ ( const value_t l,
std::ostream &  o,
format  fmt,
const char pre,
const char sep,
const char post,
seq< I...>   
) const
inlineprivate

Definition at line 805 of file tupleset.hh.

References vcsn::detail::void.

template<typename... ValueSets>
std::ostream& vcsn::detail::tupleset_impl< ValueSets >::print_set ( std::ostream &  o,
format  fmt = {} 
) const
inline

Definition at line 448 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
std::ostream& vcsn::detail::tupleset_impl< ValueSets >::print_set_ ( std::ostream &  o,
format  fmt,
seq< I...>   
) const
inlineprivate

Definition at line 828 of file tupleset.hh.

References vcsn::format::latex, vcsn::format::text, and vcsn::detail::void.

template<typename... ValueSets>
value_t vcsn::detail::tupleset_impl< ValueSets >::rdiv ( const value_t l,
const value_t r 
) const
inline

Pointwise right division (l / r).

Definition at line 332 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
value_t vcsn::detail::tupleset_impl< ValueSets >::rdiv_ ( const value_t l,
const value_t r,
seq< I...>   
) const
inlineprivate

Definition at line 694 of file tupleset.hh.

References vcsn::rdiv().

Here is the call graph for this function:

template<typename... ValueSets>
template<size_t I>
const valueset_t<I>& vcsn::detail::tupleset_impl< ValueSets >::set ( ) const
inline

The Ith component valueset.

Definition at line 145 of file tupleset.hh.

template<typename... ValueSets>
const valuesets_t& vcsn::detail::tupleset_impl< ValueSets >::sets ( ) const
inline

The componants valuesets, as a tuple.

Definition at line 138 of file tupleset.hh.

template<typename... ValueSets>
static bool vcsn::detail::tupleset_impl< ValueSets >::show_one ( )
inlinestatic

Definition at line 292 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static bool vcsn::detail::tupleset_impl< ValueSets >::show_one_ ( seq< I...>  )
inlinestaticprivate

Definition at line 670 of file tupleset.hh.

template<typename... ValueSets>
static constexpr std::size_t vcsn::detail::tupleset_impl< ValueSets >::size ( )
inlinestatic

Number of tapes.

Definition at line 103 of file tupleset.hh.

template<typename... ValueSets>
static size_t vcsn::detail::tupleset_impl< ValueSets >::size ( const value_t v)
inlinestatic

Get the max of the sizes of the tapes.

Definition at line 109 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t I>
static auto vcsn::detail::tupleset_impl< ValueSets >::size_ ( const value_t v,
int   
) -> decltype(valueset_t<I>::size(std::get<I>(v)))
inlinestaticprivate

The size of the Ith element, if its valueset features a size() function.

Definition at line 519 of file tupleset.hh.

References vcsn::rat::size(), and vcsn::v.

Here is the call graph for this function:

template<typename... ValueSets>
template<std::size_t I>
static constexpr auto vcsn::detail::tupleset_impl< ValueSets >::size_ ( const value_t ,
  ... 
) -> size_t
inlinestaticprivate

The size of the Ith element, if its valueset does not feature a size() function.

Definition at line 528 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static size_t vcsn::detail::tupleset_impl< ValueSets >::size_ ( const value_t v,
seq< I...>   
)
inlinestaticprivate

Definition at line 535 of file tupleset.hh.

References vcsn::v.

template<typename... ValueSets>
static symbol vcsn::detail::tupleset_impl< ValueSets >::sname ( )
inlinestatic

Definition at line 96 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static std::string vcsn::detail::tupleset_impl< ValueSets >::sname_ ( seq< I...>  )
inlinestaticprivate

Definition at line 466 of file tupleset.hh.

References vcsn::sname().

Here is the call graph for this function:

template<typename... ValueSets>
static value_t vcsn::detail::tupleset_impl< ValueSets >::special ( )
inlinestatic

Definition at line 225 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
static value_t vcsn::detail::tupleset_impl< ValueSets >::special_ ( seq< I...>  )
inlinestaticprivate

Definition at line 605 of file tupleset.hh.

template<typename... ValueSets>
value_t vcsn::detail::tupleset_impl< ValueSets >::star ( const value_t l) const
inline

Definition at line 355 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
value_t vcsn::detail::tupleset_impl< ValueSets >::star_ ( const value_t l,
seq< I...>   
) const
inlineprivate

Definition at line 720 of file tupleset.hh.

References vcsn::star().

Here is the call graph for this function:

template<typename... ValueSets>
static constexpr star_status_t vcsn::detail::tupleset_impl< ValueSets >::star_status ( )
inlinestatic

Definition at line 381 of file tupleset.hh.

References vcsn::STARRABLE.

template<typename... ValueSets>
template<typename Value >
Value vcsn::detail::tupleset_impl< ValueSets >::transpose ( const Value &  l) const
inline

Transpose a word_t or a value_t.

Definition at line 389 of file tupleset.hh.

template<typename... ValueSets>
template<typename Value , std::size_t... I>
Value vcsn::detail::tupleset_impl< ValueSets >::transpose_ ( const Value &  l,
seq< I...>   
) const
inlineprivate

Definition at line 855 of file tupleset.hh.

template<typename... ValueSets>
template<typename... Args>
value_t vcsn::detail::tupleset_impl< ValueSets >::tuple ( Args &&...  args) const
inline

Construct a value.

Definition at line 167 of file tupleset.hh.

template<typename... ValueSets>
template<typename Value >
Value vcsn::detail::tupleset_impl< ValueSets >::undelimit ( const Value &  l) const
inline

Remove first and last characters, that must be "special".

Definition at line 375 of file tupleset.hh.

template<typename... ValueSets>
template<typename Value , std::size_t... I>
Value vcsn::detail::tupleset_impl< ValueSets >::undelimit_ ( const Value &  l,
seq< I...>   
) const
inlineprivate

Definition at line 734 of file tupleset.hh.

template<typename... ValueSets>
template<typename... Args>
value_t vcsn::detail::tupleset_impl< ValueSets >::value ( const std::tuple< Args...> &  args) const
inline

Construct a value.

Definition at line 160 of file tupleset.hh.

template<typename... ValueSets>
template<typename... Args, std::size_t... I>
value_t vcsn::detail::tupleset_impl< ValueSets >::value_ ( const std::tuple< Args...> &  args,
seq< I...>   
) const
inlineprivate

Definition at line 541 of file tupleset.hh.

template<typename... ValueSets>
template<typename... Args>
auto vcsn::detail::tupleset_impl< ValueSets >::word ( const std::tuple< Args...> &  v) const -> word_t
inline

Convert to a word.

Definition at line 197 of file tupleset.hh.

References vcsn::v.

template<typename... ValueSets>
template<typename... Args, std::size_t... I>
word_t vcsn::detail::tupleset_impl< ValueSets >::word_ ( const std::tuple< Args...> &  l,
seq< I...>   
) const
inlineprivate

Definition at line 562 of file tupleset.hh.

template<typename... ValueSets>
value_t vcsn::detail::tupleset_impl< ValueSets >::zero ( ) const
inline

Definition at line 237 of file tupleset.hh.

template<typename... ValueSets>
template<std::size_t... I>
value_t vcsn::detail::tupleset_impl< ValueSets >::zero_ ( seq< I...>  ) const
inlineprivate

Definition at line 622 of file tupleset.hh.

Friends And Related Function Documentation

template<typename... ValueSets>
self_t meet ( const self_t lhs,
const self_t rhs 
)
friend

The meet with another tupleset.

Definition at line 871 of file tupleset.hh.

template<typename... ValueSets>
self_t meet ( const self_t lhs,
const b  
)
friend

The meet with the B weightset.

Definition at line 879 of file tupleset.hh.

template<typename... ValueSets>
self_t meet ( const b ,
const self_t rhs 
)
friend

The meet with the B weightset.

Definition at line 887 of file tupleset.hh.

Member Data Documentation

template<typename... ValueSets>
constexpr indices_t vcsn::detail::tupleset_impl< ValueSets >::indices {}
static

Definition at line 62 of file tupleset.hh.

template<typename... ValueSets>
bool vcsn::detail::tupleset_impl< ValueSets >::open__ = false
mutableprivate

Whether this valueset is open.

Definition at line 895 of file tupleset.hh.

template<typename... ValueSets>
valuesets_t vcsn::detail::tupleset_impl< ValueSets >::sets_
private

The tupled valuesets.

Definition at line 893 of file tupleset.hh.


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