1 #ifndef VCSN_CORE_RAT_HASH_HXX
2 # define VCSN_CORE_RAT_HASH_HXX
12 template <typename RatExpSet> \
17 # define VISIT(Type) \
18 DEFINE::visit(const Type ## _t& v) \
25 std::hash_combine(res_, RatExpSet::labelset_t::hash(v.value()));
38 template <
typename RatExpSet>
43 std::hash_combine(res_,
int(node.type()));
46 template <
typename RatExpSet>
54 template <
typename RatExpSet>
55 template <type_t Type>
61 n.sub()->accept(*
this);
64 template <
typename RatExpSet>
65 template <type_t Type>
71 std::hash_combine(res_, RatExpSet::weightset_t::hash(n.weight()));
72 n.sub()->accept(*
this);
75 template <
typename RatExpSet>
76 template <type_t Type>
91 #endif // !VCSN_CORE_RAT_HASH_HXX
void visit_variadic(const variadic_t< Type > &v)
Traverse an n-ary node (+, concatenation, &, :).
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 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).
void visit_weight_node(const weight_node_t< Type > &v)
Traverse a weight node (lweight, rweight).
An inner node implementing a weight.
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