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.
star_height_visitor(const expressionset_t &rs)
typename super_t::tuple_t tuple_t
#define BUILTIN_UNREACHABLE()
context_t_of< expressionset_t > context_t
unsigned height_
The current star height.
VCSN_RAT_VISIT(compose, v)
void visit_(const variadic_t< Type > &n)
Traverse variadic node.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
unsigned star_height(const expression &exp)
Bridge.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
auto conjunction(const Aut &a, const Auts &...as)
Build the (accessible part of the) conjunction.
typename super_t::node_t node_t
static constexpr const char * me()
Name of this algorithm, for error messages.
const expressionset_t & rs_
The expressionset.
auto tapes_(const tuple_t &v, detail::index_sequence< I... >)
Info all the tapes.
typename super_t::template variadic_t< Type > variadic_t
unsigned operator()(const tuple_t &)
void visit_(const unary_t< Type > &v)
Traverse unary node.
VCSN_RAT_VISIT(transposition, v)
VCSN_RAT_VISIT(complement, v)
typename expressionset_t::value_t expression_t
unsigned star_height(const ExpSet &es, const typename ExpSet::value_t &e)
Star height of an expression.
unsigned recurse_(const expression_t &v)
Easy recursion: the star height of v, saving height_.
typename expressionset_t::const_visitor super_t
auto operator()(const tuple_t &v)
Entry point.
unsigned operator()(const expression_t &v)
The star height of v.
VCSN_RAT_VISIT(ldivide, v)
VCSN_RAT_VISIT(infiltrate, v)
typename super_t::template unary_t< Type > unary_t
void visit(const tuple_t &v, std::true_type) override
value_impl< detail::expression_tag > expression
VCSN_RAT_VISIT(shuffle, v)
VCSN_RAT_VISIT(lweight, v)
VCSN_RAT_VISIT(conjunction, v)
VCSN_RAT_VISIT(rweight, v)