1 #ifndef VCSN_CORE_RAT_HASH_HH
2 # define VCSN_CORE_RAT_HASH_HH
12 template <
typename RatExpSet>
14 :
public RatExpSet::const_visitor
19 using weight_t =
typename context_t::weightset_t::value_t;
20 using super_t =
typename ratexpset_t::const_visitor;
21 using node_t =
typename super_t::node_t;
22 using inner_t =
typename super_t::inner_t;
23 template <type_t Type>
25 template <type_t Type>
27 template <type_t Type>
29 using leaf_t =
typename super_t::leaf_t;
49 # define DEFINE(Type) \
50 using Type ## _t = typename super_t::Type ## _t; \
51 virtual void visit(const Type ## _t& v)
76 template <rat::exp::type_t Type>
80 template <rat::exp::type_t Type>
84 template <rat::exp::type_t Type>
94 #endif // !VCSN_CORE_RAT_HASH_HH
void visit_variadic(const variadic_t< Type > &v)
Traverse an n-ary node (+, concatenation, &, :).
An inner node with multiple children.
void combine_type(const node_t &node)
Update res_ by hashing the node type; this is needed for any node.
The abstract parameterized, root for all rational expression types.
typename ratexpset_t::const_visitor super_t
typename super_t::template variadic_t< Type > variadic_t
typename super_t::template unary_t< Type > unary_t
void visit_nullary(const node_t &v)
Traverse a nullary node (atom, \z, \e).
typename super_t::leaf_t leaf_t
void visit_weight_node(const weight_node_t< Type > &v)
Traverse a weight node (lweight, rweight).
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 hash of v.
context_t_of< ratexpset_t > context_t
typename context_t::weightset_t::value_t weight_t
typename super_t::inner_t inner_t
An inner node implementing a weight.
size_t operator()(const node_t &v)
Entry point: return the hash of v.
void visit_unary(const unary_t< Type > &v)
Traverse a unary node (*, {c}).
typename super_t::node_t node_t
typename super_t::template weight_node_t< Type > weight_node_t