13 template <
typename ExpSet>
14 typename ExpSet::value_t
15 transpose(
const ExpSet&
rs,
const typename ExpSet::value_t&
v);
27 template <
typename ExpSet>
29 :
public ExpSet::const_visitor
34 using super_t =
typename expressionset_t::const_visitor;
39 constexpr
static const char*
me() {
return "transpose"; }
51 return std::move(
res_);
78 res_ =
rs_.atom(
rs_.labelset()->transpose(e.value()));
86 template <rat::type_t Type>
90 template <rat::type_t Type>
94 for (
const auto& c: v.
tail())
99 #define DEFINE(Node) \
100 VCSN_RAT_VISIT(Node, e) \
102 visit_(e, &expressionset_t::Node); \
115 for (
const auto& c: e.tail())
150 res_ =
rs_.transposition(e.shared_from_this());
157 res_ =
rs_.transposition(e.shared_from_this());
163 rs_.weightset()->transpose(e.weight()));
168 res_ =
rs_.lweight(
rs_.weightset()->transpose(e.weight()),
178 template <
bool = context_t::is_lat,
179 typename Dummy =
void>
187 std::get<I>(v.sub()));
191 template <
size_t... I>
205 template <
typename Dummy>
226 template <
typename ExpSet>
227 typename ExpSet::value_t
VCSN_RAT_VISIT(ldivide, e)
expression_t operator()(const expression_t &e)
An expression denoting the transposition of e.
Aut transpose(const transpose_automaton< Aut > &aut)
expression_t transpose(const expression_t &e)
Easy recursion.
#define BUILTIN_UNREACHABLE()
VCSN_RAT_VISIT(transposition, e)
context_t_of< expressionset_t > context_t
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
typename super_t::tuple_t tuple_t
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
auto conjunction(const Aut &a, const Auts &...as)
Build the (accessible part of the) conjunction.
auto work_(const tuple_t &v)
Copy one tape.
VCSN_RAT_VISIT(rweight, e)
static constexpr const char * me()
Name of this algorithm, for error messages.
auto work_(const tuple_t &v, detail::index_sequence< I... >)
Copy all the tapes.
auto operator()(const tuple_t &v)
Entry point.
typename expressionset_t::const_visitor super_t
expression_t operator()(const tuple_t &)
VCSN_RAT_VISIT(lweight, e)
void visit_(const variadic_t< Type > &v, binary_t f)
Factor the visitation of "commutative" variadic nodes.
A visitor to create a transposed expression,.
VCSN_RAT_VISIT(complement, e)
auto tail() const -> decltype(boost::make_iterator_range(*this, 1, 0))
The non-first items.
typename expressionset_t::value_t expression_t
An inner node with multiple children.
void visit(const tuple_t &v, std::true_type) override
const value_t head() const
The first item of this variadic.
#define DEFINE(Node)
Handle variadic operations.
expression_t(expressionset_t::*)(const expression_t &, const expression_t &) const binary_t
Binary member functions of the expressionset.
transpose_impl(const expressionset_t &rs)