Vcsn  2.4
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_ptr = typename labelset_types< ValueSets... >::genset_ptr
 A tuple of generators 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
 
template<size_t I>
using project_t = valueset_t< I >
 The type of the I-th tape valueset. More...
 

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...
 
template<size_t I>
const valueset_t< I > & project () const
 The Ith component valueset. More...
 
template<size_t I>
auto project (const value_t &v) const
 The I-th component of the value. 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
 
auto 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 rdivide (const value_t &l, const value_t &r) const
 Pointwise right division (l / r). More...
 
boost::optional< value_tmaybe_rdivide (const value_t &l, const value_t &r) const
 
value_t ldivide (const value_t &l, const value_t &r) const
 Pointwise left division (l \ r). More...
 
boost::optional< value_tmaybe_ldivide (const value_t &l, const value_t &r) const
 
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=std::cout, 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 {}
 
static constexpr bool is_labelset = labelset_types<ValueSets...>::is_labelset
 Whether this models a labelset. More...
 

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>
decltype(auto) generators_ () const
 
template<std::size_t... I>
decltype(auto) 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 23 of file fwd.hh.

Member Typedef Documentation

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

A tuple of generators if meaningful, void otherwise.

Definition at line 96 of file tupleset.hh.

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

Definition at line 75 of file tupleset.hh.

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

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

template<typename... ValueSets>
template<size_t I>
using vcsn::detail::tupleset_impl< ValueSets >::project_t = valueset_t<I>

The type of the I-th tape valueset.

Definition at line 174 of file tupleset.hh.

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

Definition at line 85 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 78 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 88 of file tupleset.hh.

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

To be iterable.

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

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

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

Constructor & Destructor Documentation

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

Definition at line 109 of file tupleset.hh.

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

Definition at line 113 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 352 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 512 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 518 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 526 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 535 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 543 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 900 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 910 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 921 of file tupleset.hh.

References vcsn::eat(), and vcsn::res.

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 934 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 552 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 478 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 886 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 953 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 243 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 717 of file tupleset.hh.

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

The generators. Meaningful for labelsets only.

Definition at line 222 of file tupleset.hh.

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

Definition at line 671 of file tupleset.hh.

References vcsn::detail::is_letterized(), and vcsn::dyn::detail::join().

Here is the call graph for this function:

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

Definition at line 689 of file tupleset.hh.

References vcsn::cross(), and vcsn::filter().

Here is the call graph for this function:

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

Definition at line 215 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 665 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 1111 of file tupleset.hh.

References vcsn::eat(), and vcsn::res.

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 1071 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 289 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 788 of file tupleset.hh.

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

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

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

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

References vcsn::hash_combine(), and vcsn::res.

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

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

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

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

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

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

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

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

Definition at line 344 of file tupleset.hh.

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

Definition at line 307 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 809 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 332 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 816 of file tupleset.hh.

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

Definition at line 271 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 761 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 283 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 778 of file tupleset.hh.

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

Pointwise left division (l \ r).

Definition at line 419 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 251 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 728 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 1130 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 1088 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 1143 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 1097 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 375 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 455 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 874 of file tupleset.hh.

References vcsn::lgcd(), vcsn::res, 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 149 of file tupleset.hh.

References vcsn::eat(), and vcsn::res.

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

References vcsn::detail::map_impl_().

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 l,
const value_t r,
Fun &&  fun 
) const
inlineprivate

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

Definition at line 852 of file tupleset.hh.

References vcsn::detail::map_impl_().

Here is the call graph for this function:

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

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

Definition at line 429 of file tupleset.hh.

References vcsn::res.

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

Definition at line 396 of file tupleset.hh.

References vcsn::res.

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 1033 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 367 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 866 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 326 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 314 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 195 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 625 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 = std::cout,
format  fmt = {} 
) const
inline

Definition at line 568 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 964 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 562 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 987 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>
template<size_t I>
const valueset_t<I>& vcsn::detail::tupleset_impl< ValueSets >::project ( ) const
inline

The Ith component valueset.

Alias for set<I>.

Definition at line 180 of file tupleset.hh.

template<typename... ValueSets>
template<size_t I>
auto vcsn::detail::tupleset_impl< ValueSets >::project ( const value_t v) const
inline

The I-th component of the value.

Definition at line 187 of file tupleset.hh.

References vcsn::v.

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

Pointwise right division (l / r).

Definition at line 386 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 167 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 160 of file tupleset.hh.

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

Definition at line 338 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 826 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 124 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 131 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 636 of file tupleset.hh.

References vcsn::rat::size(), and vcsn::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 645 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 652 of file tupleset.hh.

References vcsn::v.

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

Definition at line 117 of file tupleset.hh.

References vcsn::res.

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

Definition at line 583 of file tupleset.hh.

References vcsn::res, and 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 265 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 754 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 462 of file tupleset.hh.

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

Definition at line 492 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 500 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 1025 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 209 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 486 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 893 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 202 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 658 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 235 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 710 of file tupleset.hh.

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

Definition at line 277 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 771 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 1041 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 1049 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 1057 of file tupleset.hh.

Member Data Documentation

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

Definition at line 76 of file tupleset.hh.

template<typename... ValueSets>
constexpr bool vcsn::detail::tupleset_impl< ValueSets >::is_labelset = labelset_types<ValueSets...>::is_labelset
static

Whether this models a labelset.

Definition at line 102 of file tupleset.hh.

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

Whether this valueset is open.

Definition at line 1065 of file tupleset.hh.

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

The tupled valuesets.

Definition at line 1063 of file tupleset.hh.


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