16 template <
typename ExpSet>
18 :
public ExpSet::const_visitor
22 using super_t =
typename expressionset_t::const_visitor;
28 using node_t =
typename super_t::node_t;
62 template <
typename OtherExpSet>
86 constexpr
static const char*
me() {
return "info"; }
91 #define DEFINE(Type) \
95 VCSN_RAT_VISIT(Type, v)
115 template <type_t Type>
119 template <rat::exp::type_t Type>
122 v.
sub()->accept(*
this);
126 template <type_t Type>
130 template <exp::type_t Type>
134 for (
const auto& c: v)
137 d = std::max(d, depth);
152 template <
bool = context_t::is_lat,
153 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[];
186 template <
typename Dummy>
202 template <
typename ExpSet>
#define BUILTIN_UNREACHABLE()
context_t_of< expressionset_t > context_t
size_t depth
Depth of the tree.
static constexpr const char * me()
Name of this algorithm, for error messages.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
An inner node implementing a weight.
info< ExpSet > make_info(const typename ExpSet::value_t &r)
Gather information of the number of the different node types.
void clear()
Reset the visitor.
info & operator+=(const info< OtherExpSet > &other)
Add the result from another info operator.
typename super_t::tuple_t tuple_t
const value_t sub() const
void operator()(const tuple_t &)
void operator()(const tuple_t &v)
Entry point.
void info_(const tuple_t &v)
Info about tape I.
void visit(const tuple_t &v, std::true_type) override
void operator()(const expression_t &v)
Entry point: compute info about v.
size_t tuple
Number of tuple operators.
Implementation of nodes of tuple of rational expressions.
void visit_(const unary_t< Type > &v)
Factor the visitation of unary nodes.
typename super_t::node_t node_t
Actual node, without indirection.
An inner node with multiple children.
std::ostream & info(const Aut &aut, std::ostream &out=std::cout, bool detailed=false)
Print info about an automaton.
Provide a variadic mul on top of a binary mul(), and one().
void info_(const tuple_t &v, detail::index_sequence< I... >)
Info all the tapes.
typename expressionset_t::const_visitor super_t
void visit_(const variadic_t< Type > &v)
Factor the visitation of variadic nodes.
typename node_t::value_t expression_t
A shared_ptr to node_t.