Vcsn  2.2
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 base letters if meaningful, void otherwise. More...
 
using letters_t = typename labelset_types< ValueSets... >::letters_t
 A set of letters if meaningful, void otherwise. More...
 
using genset_t = typename labelset_types< ValueSets... >::genset_t
 A tuple of generators if meaningful, void otherwise. More...
 
using genset_ptr = typename labelset_types< ValueSets... >::genset_ptr
 
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_ptr genset () const
 
genset_t generators () 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
 Pointwise left GCD. 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 &v) const
 Pointwise star. More...
 
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...
 
template<typename Fun >
void convs (std::istream &i, Fun &&fun) const
 Fun: (label_t) -> void. 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...
 
template<typename Value >
static size_t size (const Value &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...
 
template<typename LhsValue , typename RhsValue >
static auto less (const LhsValue &l, const RhsValue &r) -> bool
 Whether l < r. More...
 
static value_t special ()
 
static bool is_special (const value_t &l)
 
static constexpr bool has_lightening_weights ()
 
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 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<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_ptr genset_ (seq< I... >) const
 
template<std::size_t... I>
genset_t generators_ (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<typename Fun >
value_t map_ (const value_t &v, Fun &&fun) const
 Apply a unary function pointwise, and return the tuple of results. More...
 
template<typename Fun , std::size_t... I>
value_t map_impl_ (const value_t &v, Fun &&fun, seq< I... >) const
 
template<typename Fun >
value_t map_ (const value_t &l, const value_t &r, Fun &&fun) const
 Apply a binary function pointwise, and return the tuple of results. More...
 
template<typename Fun , std::size_t... I>
value_t map_impl_ (const value_t &l, const value_t &r, Fun &&fun, seq< I... >) const
 
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>
valueset_t< 0 >::value_t lnormalize_here_ (value_t &vs, 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<typename Value , std::size_t I>
static auto size_ (const Value &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<typename Value , std::size_t I>
static constexpr auto size_ (const Value &,...) -> size_t
 The size of the Ith element, if its valueset does not feature a size() function. More...
 
template<typename Value , std::size_t... I>
static size_t size_ (const Value &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<typename LhsValue , typename RhsValue , std::size_t... I>
static auto less_ (const LhsValue &l, const RhsValue &r, seq< I... >) -> bool
 
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_lightening_weights_ (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 28 of file fwd.hh.

Member Typedef Documentation

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

Definition at line 88 of file tupleset.hh.

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

A tuple of generators if meaningful, void otherwise.

Definition at line 87 of file tupleset.hh.

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

Definition at line 67 of file tupleset.hh.

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

Definition at line 95 of file tupleset.hh.

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

A tuple of base letters if meaningful, void otherwise.

Definition at line 83 of file tupleset.hh.

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

A set of letters if meaningful, void otherwise.

Definition at line 85 of file tupleset.hh.

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

Definition at line 77 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 70 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 80 of file tupleset.hh.

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

To be iterable.

Definition at line 93 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 74 of file tupleset.hh.

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

Definition at line 66 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 90 of file tupleset.hh.

Constructor & Destructor Documentation

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

Definition at line 97 of file tupleset.hh.

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

Definition at line 101 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 320 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 436 of file tupleset.hh.

References vcsn::detail::v.

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

Definition at line 442 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 450 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 459 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 467 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 801 of file tupleset.hh.

References vcsn::conv(), and vcsn::detail::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 811 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 822 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 835 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 >
void vcsn::detail::tupleset_impl< ValueSets >::convs ( std::istream &  i,
Fun &&  fun 
) const
inline

Fun: (label_t) -> void.

Definition at line 478 of file tupleset.hh.

References vcsn::detail::conv_label_class_(), and vcsn::eat().

Here is the call graph for this function:

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 402 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 787 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 854 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 211 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 618 of file tupleset.hh.

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

The generators. Meaningful for labelsets only.

Definition at line 190 of file tupleset.hh.

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

Definition at line 597 of file tupleset.hh.

References vcsn::cross().

Here is the call graph for this function:

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

Definition at line 183 of file tupleset.hh.

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

Definition at line 590 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 = true 
) const -> decltype(this->get_letter_(i, quoted, indices))
inline

Definition at line 1012 of file tupleset.hh.

References vcsn::eat().

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,
seq< I... >   
) const -> letter_t
inlineprivate

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

Definition at line 972 of file tupleset.hh.

References vcsn::detail::make_gcc_tuple().

Here is the call graph for this function:

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

Definition at line 257 of file tupleset.hh.

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

Definition at line 689 of file tupleset.hh.

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

Definition at line 263 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 696 of file tupleset.hh.

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

Definition at line 430 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 645 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 125 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 524 of file tupleset.hh.

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

Definition at line 269 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 703 of file tupleset.hh.

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

Definition at line 195 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 604 of file tupleset.hh.

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

Definition at line 131 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 531 of file tupleset.hh.

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

Definition at line 312 of file tupleset.hh.

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

Definition at line 275 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 710 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 300 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 717 of file tupleset.hh.

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

Definition at line 239 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 662 of file tupleset.hh.

References vcsn::detail::is_special().

Here is the call graph for this function:

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

Definition at line 251 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 679 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 365 of file tupleset.hh.

template<typename... ValueSets>
template<typename LhsValue , typename RhsValue >
static auto vcsn::detail::tupleset_impl< ValueSets >::less ( const LhsValue &  l,
const RhsValue &  r 
) -> bool
inlinestatic

Whether l < r.

Definition at line 219 of file tupleset.hh.

References vcsn::rat::size().

Here is the call graph for this function:

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

Definition at line 629 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 1031 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 989 of file tupleset.hh.

References vcsn::zip().

Here is the call graph for this function:

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 1044 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 998 of file tupleset.hh.

References vcsn::zip_with_padding().

Here is the call graph for this function:

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

Pointwise left GCD.

Definition at line 343 of file tupleset.hh.

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 379 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 775 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 137 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 537 of file tupleset.hh.

References vcsn::detail::make_gcc_tuple().

Here is the call graph for this function:

template<typename... ValueSets>
template<typename Fun >
value_t vcsn::detail::tupleset_impl< ValueSets >::map_ ( const value_t v,
Fun &&  fun 
) const
inlineprivate

Apply a unary function pointwise, and return the tuple of results.

Definition at line 738 of file tupleset.hh.

template<typename... ValueSets>
template<typename Fun >
value_t vcsn::detail::tupleset_impl< ValueSets >::map_ ( const value_t l,
const value_t r,
Fun &&  fun 
) const
inlineprivate

Apply a binary function pointwise, and return the tuple of results.

Definition at line 753 of file tupleset.hh.

template<typename... ValueSets>
template<typename Fun , std::size_t... I>
value_t vcsn::detail::tupleset_impl< ValueSets >::map_impl_ ( const value_t v,
Fun &&  fun,
seq< I... >   
) const
inlineprivate

Definition at line 745 of file tupleset.hh.

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

Definition at line 760 of file tupleset.hh.

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 934 of file tupleset.hh.

References vcsn::meet().

Here is the call graph for this function:

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 335 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 767 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 294 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 282 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 163 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 550 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 493 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 865 of file tupleset.hh.

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

Here is the call graph for this function:

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

Definition at line 487 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 888 of file tupleset.hh.

References vcsn::format::kind(), vcsn::format::latex, vcsn::format::raw, vcsn::format::sname, vcsn::format::text, vcsn::format::utf8, and vcsn::detail::void.

Here is the call graph for this function:

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 354 of file tupleset.hh.

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 155 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 148 of file tupleset.hh.

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

Definition at line 306 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 727 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 112 of file tupleset.hh.

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

Get the max of the sizes of the tapes.

Definition at line 119 of file tupleset.hh.

template<typename... ValueSets>
template<typename Value , std::size_t I>
static auto vcsn::detail::tupleset_impl< ValueSets >::size_ ( const Value &  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 561 of file tupleset.hh.

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

Here is the call graph for this function:

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

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

Definition at line 570 of file tupleset.hh.

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

Definition at line 577 of file tupleset.hh.

References vcsn::detail::v.

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

Definition at line 105 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 508 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 233 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 655 of file tupleset.hh.

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

Pointwise star.

Definition at line 386 of file tupleset.hh.

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

Definition at line 416 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 424 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 926 of file tupleset.hh.

References vcsn::transpose().

Here is the call graph for this function:

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

Construct a value.

Definition at line 177 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 410 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 794 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 170 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 583 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 203 of file tupleset.hh.

References vcsn::detail::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 611 of file tupleset.hh.

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

Definition at line 245 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 672 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 942 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 950 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 958 of file tupleset.hh.

Member Data Documentation

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

Definition at line 68 of file tupleset.hh.

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

Whether this valueset is open.

Definition at line 966 of file tupleset.hh.

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

The tupled valuesets.

Definition at line 964 of file tupleset.hh.


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