17 template <
typename ExpSet>
19 :
public ExpSet::const_visitor
23 using super_t =
typename expressionset_t::const_visitor;
29 using node_t =
typename super_t::node_t;
63 template <
typename OtherExpSet>
87 constexpr
static const char*
me() {
return "info"; }
92 #define DEFINE(Type) \
96 VCSN_RAT_VISIT(Type, v)
116 template <type_t Type>
120 template <rat::exp::type_t Type>
123 v.
sub()->accept(*
this);
127 template <type_t Type>
131 template <exp::type_t Type>
135 for (
const auto& c: v)
138 d = std::max(d, depth);
153 template <
typename Dummy =
void>
160 using expset_t =
typename expressionset_t::template project_t<I>;
161 visitor_ += make_info<expset_t>(std::get<I>(v.sub()));
165 template <
size_t... I>
168 using swallow =
int[];
188 detail::static_if<context_t::is_lat>
194 template <
typename ExpSet>
Implementation of nodes of tuple of rational expressions.
static constexpr const char * me()
Name of this algorithm, for error messages.
An inner node implementing a weight.
info< ExpSet > make_info(const typename ExpSet::value_t &r)
void visit_(const variadic_t< Type > &v)
Factor the visitation of variadic nodes.
Gather information of the number of the different node types.
context_t_of< expressionset_t > context_t
Provide a variadic mul on top of a binary mul(), and one().
typename node_t::value_t expression_t
A shared_ptr to node_t.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
info & operator+=(const info< OtherExpSet > &other)
Add the result from another info operator.
void visit(const tuple_t &v, std::true_type) override
void operator()(const tuple_t &v)
Entry point.
void operator()(const expression_t &v)
Entry point: compute info about v.
typename super_t::tuple_t tuple_t
size_t depth
Depth of the tree.
void visit_(const unary_t< Type > &v)
Factor the visitation of unary nodes.
const value_t sub() const
void clear()
Reset the visitor.
void info_(const tuple_t &v)
Info about tape I.
An inner node with multiple children.
std::ostream & info(const Aut &aut, std::ostream &out=std::cout, unsigned details=2)
Print info about an automaton.
typename super_t::node_t node_t
Actual node, without indirection.
void info_(const tuple_t &v, detail::index_sequence< I... >)
Info all the tapes.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
size_t tuple
Number of tuple operators.
typename expressionset_t::const_visitor super_t