1 #ifndef VCSN_ALGOS_STAR_HEIGHT_HH
2 # define VCSN_ALGOS_STAR_HEIGHT_HH
10 template <
typename RatExpSet>
12 :
public RatExpSet::const_visitor
16 using super_t =
typename ratexpset_t::const_visitor;
17 using node_t =
typename super_t::node_t;
18 template <rat::type_t Type>
39 # define DEFINE(Type) \
40 using Type ## _t = typename super_t::Type ## _t; \
41 virtual void visit(const Type ## _t& v)
44 DEFINE(complement) { v.sub()->accept(*
this); }
47 DEFINE(lweight) { v.sub()->accept(*
this); }
50 DEFINE(rweight) { v.sub()->accept(*
this); }
54 DEFINE(transposition){ v.sub()->accept(*
this); }
60 template <rat::type_t Type>
83 template <
typename RatExpSet>
97 template <
typename RatExpSet>
101 const auto& e = exp->as<RatExpSet>();
102 return ::vcsn::star_height<RatExpSet>(e.ratexp());
106 (
const ratexp& e) ->
unsigned);
112 #endif // !VCSN_ALGOS_STAR_HEIGHT_HH
REGISTER_DECLARE(accessible,(const automaton &) -> automaton)
std::shared_ptr< detail::ratexp_base > ratexp
typename super_t::node_t node_t
unsigned operator()(const node_t &v)
Entry point: return the size of v.
unsigned star_height(const typename RatExpSet::value_t &e)
Star height of a ratexp.
typename super_t::template variadic_t< Type > variadic_t
unsigned star_height(const ratexp &exp)
Bridge.
unsigned operator()(const std::shared_ptr< const node_t > &v)
Entry point: return the size of v.
typename ratexpset_t::const_visitor super_t
void visit_variadic(const variadic_t< Type > &n)
Traverse variadic node.