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"; }
69 template <rat::type_t Type>
73 template <rat::exp::type_t Type>
79 template <rat::type_t Type>
83 template <rat::type_t Type>
84 void visit_(
const variadic_t<Type>& n)
88 for (
const auto& c : n)
92 using tuple_t =
typename super_t::tuple_t;
95 template <
bool = context_t::is_lat,
96 typename Dummy =
void>
107 template <
size_t... I>
110 return std::max({tape_<I>(
v)...});
121 template <
typename Dummy>
144 template <
typename ExpSet>
157 template <
typename ExpSet>
161 const auto& e = exp->as<ExpSet>();
typename detail::context_t_of_impl< base_t< ValueSet > >::type context_t_of
unsigned star_height(const expression &exp)
Bridge.
VCSN_RAT_VISIT(infiltrate, v)
VCSN_RAT_VISIT(shuffle, v)
value_impl< detail::expression_tag > expression
VCSN_RAT_VISIT(transposition, v)
void swap(config::config_value &first, config::config_value &second)
unsigned height_
The current star height.
typename super_t::node_t node_t
auto conjunction(const Aut &a, const Auts &... as)
Build the (accessible part of the) conjunction.
unsigned recurse_(const expression_t &v)
Easy recursion: the star height of v, saving height_.
star_height_visitor(const expressionset_t &rs)
typename detail::labelset_t_of_impl< base_t< ValueSet > >::type labelset_t_of
typename expressionset_t::const_visitor super_t
const expressionset_t & rs_
The expressionset.
VCSN_RAT_VISIT(complement, v)
VCSN_RAT_VISIT(rweight, v)
VCSN_RAT_VISIT(lweight, v)
unsigned operator()(const tuple_t &)
VCSN_RAT_VISIT(compose, v)
void visit_(const unary_t< Type > &v)
Traverse unary node.
auto tape_(const tuple_t &v)
The case of tape I.
typename super_t::tuple_t tuple_t
typename super_t::template unary_t< Type > unary_t
typename super_t::template variadic_t< Type > variadic_t
void visit_(const variadic_t< Type > &n)
Traverse variadic node.
typename expressionset_t::value_t expression_t
auto operator()(const tuple_t &v)
Entry point.
VCSN_RAT_VISIT(ldivide, v)
void visit(const tuple_t &v, std::true_type) override
auto tapes_(const tuple_t &v, detail::index_sequence< I... >)
Info all the tapes.
context_t_of< expressionset_t > context_t
VCSN_RAT_VISIT(conjunction, v)
unsigned operator()(const expression_t &v)
The star height of v.
#define BUILTIN_UNREACHABLE()
unsigned star_height(const ExpSet &es, const typename ExpSet::value_t &e)
Star height of an expression.
static constexpr const char * me()
Name of this algorithm, for error messages.