13 template <
typename ExpSet>
14 typename ExpSet::value_t
15 transpose(
const ExpSet&
rs,
const typename ExpSet::value_t&
v);
26 template <
typename ExpSet>
28 :
public ExpSet::const_visitor
33 using super_t =
typename expressionset_t::const_visitor;
38 constexpr
static const char*
me() {
return "transpose"; }
50 return std::move(
res_);
77 res_ =
rs_.atom(
rs_.labelset()->transpose(e.value()));
85 template <rat::type_t Type>
89 template <rat::type_t Type>
93 for (
const auto& c: v.
tail())
98 #define DEFINE(Node) \
99 VCSN_RAT_VISIT(Node, e) \
101 visit_(e, &expressionset_t::Node); \
114 for (
const auto& c: e.tail())
149 res_ =
rs_.transposition(e.shared_from_this());
156 res_ =
rs_.transposition(e.shared_from_this());
162 rs_.weightset()->transpose(e.weight()));
167 res_ =
rs_.lweight(
rs_.weightset()->transpose(e.weight()),
177 template <
typename Dummy =
void>
185 std::get<I>(v.sub()));
189 template <
size_t... I>
192 return self_.
rs_.tuple(work_<I>(v)...);
205 detail::static_if<context_t::is_lat>
216 template <
typename ExpSet>
217 typename ExpSet::value_t
static constexpr const char * me()
Name of this algorithm, for error messages.
transpose_impl(const expressionset_t &rs)
VCSN_RAT_VISIT(rweight, e)
VCSN_RAT_VISIT(transposition, e)
expression_t(expressionset_t::*)(const expression_t &, const expression_t &) const binary_t
Binary member functions of the expressionset.
VCSN_RAT_VISIT(lweight, e)
typename super_t::tuple_t tuple_t
#define DEFINE(Node)
Handle variadic operations.
VCSN_RAT_VISIT(complement, e)
auto work_(const tuple_t &v, detail::index_sequence< I... >)
Copy all the tapes.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
context_t_of< expressionset_t > context_t
A visitor to create a transposed expression,.
auto work_(const tuple_t &v)
Copy one tape.
void visit_(const variadic_t< Type > &v, binary_t f)
Factor the visitation of "commutative" variadic nodes.
typename expressionset_t::value_t expression_t
void visit(const tuple_t &v, std::true_type) override
const value_t head() const
The first item of this variadic.
expression_t operator()(const expression_t &e)
An expression denoting the transposition of e.
An inner node with multiple children.
typename expressionset_t::const_visitor super_t
expression_t transpose(const expression_t &e)
Easy recursion.
auto tail() const -> decltype(boost::make_iterator_range(*this, 1, 0))
The non-first items.
VCSN_RAT_VISIT(ldivide, e)
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
auto operator()(const tuple_t &v)
Entry point.
auto conjunction(const Aut &a, const Auts &...as)
Build the (accessible part of the) conjunction.
Aut transpose(const transpose_automaton< Aut > &aut)
The transpose of a transpose automaton is the original automaton.