9 template <
typename ExpSet>
11 star_height(
const ExpSet& es,
const typename ExpSet::value_t& e);
15 template <
typename ExpSet>
17 :
public ExpSet::const_visitor
21 using super_t =
typename expressionset_t::const_visitor;
25 using node_t =
typename super_t::node_t;
28 constexpr
static const char*
me() {
return "star_height"; }
68 template <rat::type_t Type>
72 template <rat::exp::type_t Type>
78 template <rat::type_t Type>
82 template <rat::type_t Type>
83 void visit_(
const variadic_t<Type>& n)
87 for (
const auto& c : n)
91 using tuple_t =
typename super_t::tuple_t;
94 template <
bool = context_t::is_lat,
95 typename Dummy =
void>
106 template <
size_t... I>
109 return std::max({tape_<I>(
v)...});
120 template <
typename Dummy>
143 template <
typename ExpSet>
156 template <
typename ExpSet>
160 const auto& e = exp->as<ExpSet>();
auto tape_(const tuple_t &v)
The case of tape I.
typename expressionset_t::value_t expression_t
unsigned height_
The current star height.
static constexpr const char * me()
Name of this algorithm, for error messages.
VCSN_RAT_VISIT(shuffle, v)
void visit_(const variadic_t< Type > &n)
Traverse variadic node.
unsigned star_height(const ExpSet &es, const typename ExpSet::value_t &e)
Star height of an expression.
typename super_t::template unary_t< Type > unary_t
unsigned operator()(const expression_t &v)
The star height of v.
auto operator()(const tuple_t &v)
Entry point.
void visit_(const unary_t< Type > &v)
Traverse unary node.
unsigned recurse_(const expression_t &v)
Easy recursion: the star height of v, saving height_.
VCSN_RAT_VISIT(conjunction, v)
VCSN_RAT_VISIT(compose, v)
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
auto tapes_(const tuple_t &v, detail::index_sequence< I... >)
Info all the tapes.
unsigned star_height(const expression &exp)
Bridge.
star_height_visitor(const expressionset_t &rs)
#define BUILTIN_UNREACHABLE()
VCSN_RAT_VISIT(rweight, v)
typename expressionset_t::const_visitor super_t
VCSN_RAT_VISIT(lweight, v)
context_t_of< expressionset_t > context_t
void visit(const tuple_t &v, std::true_type) override
VCSN_RAT_VISIT(complement, v)
value_impl< detail::expression_tag > expression
VCSN_RAT_VISIT(infiltrate, v)
typename super_t::template variadic_t< Type > variadic_t
VCSN_RAT_VISIT(transposition, v)
unsigned operator()(const tuple_t &)
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
typename super_t::tuple_t tuple_t
typename super_t::node_t node_t
VCSN_RAT_VISIT(ldivide, v)
auto conjunction(const Aut &a, const Auts &...as)
Build the (accessible part of the) conjunction.
const expressionset_t & rs_
The expressionset.