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;
64 template <
typename OtherExpSet>
89 constexpr
static const char*
me() {
return "info"; }
94 #define DEFINE(Type) \ 98 VCSN_RAT_VISIT(Type, v) 119 template <type_t Type>
123 template <rat::exp::type_t Type>
126 v.
sub()->accept(*
this);
130 template <type_t Type>
134 template <exp::type_t Type>
138 for (
const auto& c: v)
141 d = std::max(d, depth);
156 template <
typename Dummy =
void>
163 using expset_t =
typename expressionset_t::template project_t<I>;
164 visitor_ += make_info<expset_t>(std::get<I>(v.sub()));
168 template <
size_t... I>
171 using swallow =
int[];
191 detail::static_if<context_t::is_lat>
197 template <
typename ExpSet>
void info_(const tuple_t &v)
Info about tape I.
void operator()(const expression_t &v)
Entry point: compute info about v.
void info_(const tuple_t &v, detail::index_sequence< I... >)
Info all the tapes.
An inner node with multiple children.
typename node_t::value_t expression_t
A shared_ptr to node_t.
void visit_(const variadic_t< Type > &v)
Factor the visitation of variadic nodes.
context_t_of< expressionset_t > context_t
typename expressionset_t::const_visitor super_t
Gather information of the number of the different node types.
An inner node to name the subexpression.
typename detail::context_t_of_impl< base_t< ValueSet > >::type context_t_of
Provide a variadic mul on top of a binary mul(), and one().
typename super_t::tuple_t tuple_t
void visit_(const unary_t< Type > &v)
Factor the visitation of unary nodes.
typename detail::labelset_t_of_impl< base_t< ValueSet > >::type labelset_t_of
static constexpr const char * me()
Name of this algorithm, for error messages.
void operator()(const tuple_t &v)
Entry point.
void visit(const tuple_t &v, std::true_type) override
Implementation of nodes of tuple of rational expressions.
info & operator+=(const info< OtherExpSet > &other)
Add the result from another info operator.
typename super_t::node_t node_t
Actual node, without indirection.
size_t tuple
Number of tuple operators.
An inner node implementing a weight.
const value_t sub() const
size_t depth
Depth of the tree.
void clear()
Reset the visitor.
info< ExpSet > make_info(const typename ExpSet::value_t &r)
std::ostream & info(const Aut &aut, std::ostream &out=std::cout, unsigned details=2)
Print info about an automaton.