14 template <
typename ExpSet>
16 :
public ExpSet::const_visitor
20 using super_t =
typename expressionset_t::const_visitor;
23 using weight_t =
typename context_t::weightset_t::value_t;
24 using node_t =
typename super_t::node_t;
25 using inner_t =
typename super_t::inner_t;
26 template <type_t Type>
28 template <type_t Type>
30 using leaf_t =
typename super_t::leaf_t;
33 constexpr
static const char*
me() {
return "size"; }
68 using tuple_t =
typename super_t::tuple_t;
69 template <
bool = context_t::is_lat,
70 typename Dummy =
void>
77 using rs_t =
typename expressionset_t::template project_t<I>;
78 return size<rs_t>(std::get<I>(v.sub()));
82 template <
size_t... I>
86 using swallow =
int[];
102 template <
typename Dummy>
117 template <rat::exp::type_t Type>
121 v.sub()->accept(*
this);
125 template <rat::exp::type_t Type>
129 size_ += v.size() - 1;
130 for (
const auto& child : v)
131 child->accept(*
this);
137 template <
typename ExpSet>
138 size_t size(
const typename ExpSet::value_t&
r)
context_t_of< expressionset_t > context_t
typename super_t::template variadic_t< Type > variadic_t
typename super_t::inner_t inner_t
VCSN_RAT_VISIT(lweight, v)
typename super_t::node_t node_t
void visit_variadic(const variadic_t< Type > &v)
Traverse variadic node.
void visit_unary(const unary_t< Type > &v)
Traverse unary node.
void visit(const tuple_t &v, std::true_type) override
VCSN_RAT_VISIT(transposition, v)
size_t operator()(const tuple_t &v)
Entry point.
VCSN_RAT_VISIT(complement, v)
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
Provide a variadic mul on top of a binary mul(), and one().
An inner node with multiple children.
typename expressionset_t::const_visitor super_t
#define BUILTIN_UNREACHABLE()
typename super_t::leaf_t leaf_t
size_t operator()(const node_t &v)
Entry point: return the size of v.
typename context_t::weightset_t::value_t weight_t
Functor to compute the size of a rational expression.
VCSN_RAT_VISIT(shuffle, v)
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
size_t operator()(const std::shared_ptr< const node_t > &v)
Entry point: return the size of v.
An inner node implementing a weight.
size_t size_(const tuple_t &v)
Size for one tape.
VCSN_RAT_VISIT(infiltration, v)
VCSN_RAT_VISIT(conjunction, v)
VCSN_RAT_VISIT(rweight, v)
size_t size(const ExpSet &rs, const typename ExpSet::value_t &r)
size_t operator()(const tuple_t &)
typename super_t::tuple_t tuple_t
size_t size_(const tuple_t &v, detail::index_sequence< I... >)
Sum of sizes for all tapes.
static constexpr const char * me()
Name of this algorithm, for error messages.
typename super_t::template unary_t< Type > unary_t