9 template <
typename ExpSet>
11 :
public ExpSet::const_visitor
16 using weight_t =
typename context_t::weightset_t::value_t;
17 using super_t =
typename expressionset_t::const_visitor;
20 using node_t =
typename super_t::node_t;
24 using inner_t =
typename super_t::inner_t;
25 template <type_t Type>
27 template <type_t Type>
29 template <type_t Type>
31 using leaf_t =
typename super_t::leaf_t;
34 constexpr
static const char*
me() {
return "hash"; }
62 using tuple_t =
typename super_t::tuple_t;
64 template <
bool = context_t::is_lat,
65 typename Dummy =
void>
68 using tupleset_t =
typename expressionset_t::template as_tupleset_t<>;
71 return tupleset_t::hash(v.sub());
75 template <
typename Dummy>
96 template <rat::exp::type_t Type>
97 void visit_(
const unary_t<Type>&
v);
100 template <rat::exp::type_t Type>
101 void visit_(
const variadic_t<Type>&
v);
104 template <rat::exp::type_t Type>
105 void visit_(
const weight_node_t<Type>&
v);
typename expressionset_t::template as_tupleset_t<> tupleset_t
size_t operator()(const tuple_t &)
typename super_t::template unary_t< Type > unary_t
The abstract parameterized, root for all rational expression types.
typename super_t::template weight_node_t< Type > weight_node_t
#define BUILTIN_UNREACHABLE()
VCSN_RAT_VISIT(transposition, v)
typename expressionset_t::const_visitor super_t
VCSN_RAT_VISIT(infiltrate, v)
typename super_t::template variadic_t< Type > variadic_t
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
void combine_type(const node_t &node)
Update res_ by hashing the node type; this is needed for any node.
VCSN_RAT_VISIT(compose, v)
VCSN_RAT_VISIT(complement, v)
An inner node implementing a weight.
VCSN_RAT_VISIT(conjunction, v)
typename node_t::value_t expression_t
A shared_ptr to node_t.
VCSN_RAT_VISIT(shuffle, v)
typename super_t::node_t node_t
Actual node, without indirection.
typename super_t::inner_t inner_t
context_t_of< expressionset_t > context_t
VCSN_RAT_VISIT(ldivide, v)
size_t operator()(const tuple_t &v)
size_t operator()(const expression_t &v)
Entry point: return the hash of v.
typename super_t::tuple_t tuple_t
void visit(const tuple_t &v, std::true_type) override
typename context_t::weightset_t::value_t weight_t
void visit_(const node_t &v)
Traverse a nullary node (atom, \z, \e).
typename super_t::leaf_t leaf_t
An inner node with multiple children.
static constexpr const char * me()
Name of this algorithm, for error messages.