Vcsn  2.2
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
lift.hh File Reference
#include <map>
#include <boost/optional.hpp>
#include <vcsn/core/mutable-automaton.hh>
#include <vcsn/core/rat/expression.hh>
#include <vcsn/core/rat/expressionset.hh>
#include <vcsn/ctx/context.hh>
#include <vcsn/dyn/automaton.hh>
#include <vcsn/labelset/oneset.hh>
#include <vcsn/misc/name.hh>
Include dependency graph for lift.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vcsn::detail::lifter_impl< Context, Tapes, Enable >
 Helper structure for a lift of several tapes. More...
 
struct  vcsn::detail::lifter_impl< Context, vcsn::detail::index_sequence<> >
 Lift all the label tapes to the weights. More...
 

Namespaces

 vcsn
 
 vcsn::detail
 
 vcsn::dyn
 
 vcsn::dyn::detail
 

Typedefs

template<typename Ctx , size_t... Tapes>
using vcsn::detail::lifter_t = lifter_impl< Ctx, detail::index_sequence< Tapes...>>
 A traits to lift the Tapes of the labels to the weights. More...
 
template<Automaton Aut, size_t... Tapes>
using vcsn::detail::lifted_automaton_t = mutable_automaton< typename lifter_t< context_t_of< Aut >, Tapes...>::context_t >
 
template<typename ExpSet >
using vcsn::detail::lifted_expressionset_t = expressionset< typename lifter_t< context_t_of< ExpSet >>::context_t >
 

Functions

static labelset_t::value_t vcsn::detail::kept_label (const in_label_t &l)
 Label in the output. More...
 
template<size_t... I>
static labelset_t::value_t vcsn::detail::kept_label_ (const in_label_t &l, seq< I...>)
 
static weight_tapes_t::value_t vcsn::detail::weight_label (const in_label_t &l)
 Weight in the output. More...
 
template<size_t... I>
static weight_tapes_t::value_t vcsn::detail::weight_label_ (const in_label_t &l, seq< I...>)
 
template<typename LabelSet , typename WeightSet , size_t... Tapes>
lifter_t< context< LabelSet,
WeightSet >, Tapes...>
::context_t 
vcsn::detail::lift_context (const context< LabelSet, WeightSet > &ctx)
 lift(ctx) -> ctx More...
 
template<Automaton Aut, size_t... Tapes>
detail::lifted_automaton_t
< Aut, Tapes...> 
vcsn::lift (const Aut &a, vcsn::rat::identities ids={})
 Lift some tapes of the transducer. More...
 
template<Automaton Aut, typename Ids , typename... Tapes>
automaton vcsn::dyn::detail::lift_automaton (const automaton &aut, vcsn::rat::identities ids, integral_constant)
 Bridge. More...
 
template<typename Context >
lifted_expressionset_t
< expressionset< Context > > 
vcsn::detail::lift_expressionset (const expressionset< Context > &rs, boost::optional< vcsn::rat::identities > ids={})
 lift(expressionset) -> expressionset More...
 
template<typename ExpSet >
detail::lifted_expressionset_t
< ExpSet >::value_t 
vcsn::lift (const ExpSet &rs, const typename ExpSet::value_t &e)
 Move all the labels to the weights. More...
 
template<typename ExpSet >
expression vcsn::dyn::detail::lift_expression (const expression &exp)
 Bridge (lift). More...
 

Variables

template<typename... LabelSets, typename WeightSet , size_t... Tapes>
struct lifter_impl< context
< tupleset< LabelSets...>
, WeightSet >
, vcsn::detail::index_sequence
< Tapes...>, std::enable_if_t
<(0< sizeof...(Tapes))>
>{using in_labelset_t=tupleset
< LabelSets...>;using
in_context_t=context
< in_labelset_t, WeightSet >
;using in_label_t=typename
in_labelset_t::value_t;template
< std::size_t...I >using seq=detail::index_sequence
< I...>;template< typename S,
typename L >struct tape_set;template
< typename LabelSet >struct
tape_set< seq<>, LabelSet >
{using type=oneset;};template
< size_t...I, typename
LabelSet >struct tape_set< seq
< I...>, LabelSet >{using type=tupleset
< typename LabelSet::template
valueset_t< I >...>;};using
index_t=typename
detail::make_index_sequence
< in_labelset_t::size()>::type;static
constexpr size_t
number_of_tapes=in_labelset_t::size();template
< size_t I >using
tape_labelset_t=typename
in_labelset_t::template
valueset_t< I >;using
kept_index_t=sequence_difference
< index_t, seq< Tapes...>
>;using labelset_t=typename
tape_set< kept_index_t,
in_labelset_t >::type;using
weight_index_t=seq< Tapes...>
;using weight_tapes_t=typename
tape_set< weight_index_t,
in_labelset_t >::type;using
inner_context_t=context
< weight_tapes_t, WeightSet >
;using weightset_t=expressionset
< inner_context_t >;using
context_t=context< labelset_t,
weightset_t >;static context_t
value(const in_context_t &ctx,
vcsn::rat::identities ids){return
value_(ctx, ids,
weight_index_t{}, kept_index_t{});}template
< size_t...WeightTapes,
size_t...KeptTapes >static
context_t value_(const
in_context_t &ctx,
vcsn::rat::identities ids, seq
< WeightTapes...>, seq
< KeptTapes...>){auto ls=labelset_t{ctx.labelset() ->
template 
vcsn::detail::set< KeptTapes > ()...}
 Specialization: lift only some tapes. More...
 
auto vcsn::detail::weight_tapes = weight_tapes_t{ctx.labelset()->template set<WeightTapes>()...}
 
auto vcsn::detail::ictx = inner_context_t{weight_tapes, *ctx.weightset()}
 
auto vcsn::detail::rs = weightset_t{ictx, ids}
 
 vcsn::detail::return {ls, rs}