9 template <
typename ExpSet>
11 :
public ExpSet::const_visitor
15 using super_t =
typename expressionset_t::const_visitor;
16 using node_t =
typename super_t::node_t;
19 constexpr
static const char*
me() {
return "star_height"; }
54 template <rat::type_t Type>
58 template <rat::exp::type_t Type>
61 v.sub()->accept(*
this);
64 template <rat::type_t Type>
68 template <rat::type_t Type>
69 void visit_(
const variadic_t<Type>& n)
84 using tuple_t =
typename super_t::tuple_t;
87 raise(
me(),
": tuple is not supported");
97 template <
typename ExpSet>
111 template <
typename ExpSet>
115 const auto& e = exp->as<ExpSet>();
116 return ::vcsn::star_height<ExpSet>(e.expression());
unsigned operator()(const node_t &v)
Entry point: return the size of v.
void visit_(const variadic_t< Type > &n)
Traverse variadic node.
VCSN_RAT_VISIT(lweight, v)
typename super_t::tuple_t tuple_t
unsigned height_
The current star height.
void visit_(const unary_t< Type > &v)
Traverse unary node.
static constexpr const char * me()
Name of this algorithm, for error messages.
unsigned operator()(const std::shared_ptr< const node_t > &v)
Entry point: return the size of v.
virtual void visit(const tuple_t &, std::true_type) override
VCSN_RAT_VISIT(conjunction, v)
VCSN_RAT_VISIT(infiltration, v)
VCSN_RAT_VISIT(complement, v)
VCSN_RAT_VISIT(rweight, v)
typename super_t::template variadic_t< Type > variadic_t
unsigned star_height(const expression &exp)
Bridge.
typename expressionset_t::const_visitor super_t
VCSN_RAT_VISIT(shuffle, v)
std::shared_ptr< detail::expression_base > expression
VCSN_RAT_VISIT(transposition, v)
unsigned star_height(const typename ExpSet::value_t &e)
Star height of an expression.
typename super_t::node_t node_t
typename super_t::template unary_t< Type > unary_t