![]() |
Vcsn
2.3a
Be Rational
|
#include <hash.hh>
Classes | |
struct | visit_tuple |
struct | visit_tuple< false, Dummy > |
Public Types | |
using | expressionset_t = ExpSet |
using | context_t = context_t_of< expressionset_t > |
using | super_t = typename expressionset_t::const_visitor |
using | node_t = typename super_t::node_t |
Actual node, without indirection. More... | |
using | expression_t = typename node_t::value_t |
A shared_ptr to node_t. More... | |
template<type_t Type> | |
using | constant_t = typename super_t::template constant_t< Type > |
template<type_t Type> | |
using | unary_t = typename super_t::template unary_t< Type > |
template<type_t Type> | |
using | variadic_t = typename super_t::template variadic_t< Type > |
template<type_t Type> | |
using | weight_node_t = typename super_t::template weight_node_t< Type > |
Public Member Functions | |
size_t | operator() (const expression_t &v) |
Entry point: return the hash of v. More... | |
Static Public Member Functions | |
static constexpr const char * | me () |
Name of this algorithm, for error messages. More... | |
Private Types | |
using | tuple_t = typename super_t::tuple_t |
Private Member Functions | |
void | combine_ (size_t h) |
Update res_ with the hash. More... | |
void | combine_type_ (const node_t &node) |
Update res_ by hashing the node type. More... | |
VCSN_RAT_VISIT (add, v) | |
VCSN_RAT_VISIT (complement, v) | |
VCSN_RAT_VISIT (compose, v) | |
VCSN_RAT_VISIT (conjunction, v) | |
VCSN_RAT_VISIT (infiltrate, v) | |
VCSN_RAT_VISIT (ldivide, v) | |
VCSN_RAT_VISIT (lweight, v) | |
VCSN_RAT_VISIT (mul, v) | |
VCSN_RAT_VISIT (one, v) | |
VCSN_RAT_VISIT (rweight, v) | |
VCSN_RAT_VISIT (shuffle, v) | |
VCSN_RAT_VISIT (star, v) | |
VCSN_RAT_VISIT (transposition, v) | |
VCSN_RAT_VISIT (zero, v) | |
VCSN_RAT_VISIT (atom, v) | |
void | visit (const tuple_t &v, std::true_type) override |
template<rat::exp::type_t Type> | |
void | visit_ (const constant_t< Type > &v) |
Traverse a nullary node. More... | |
template<rat::exp::type_t Type> | |
void | visit_ (const unary_t< Type > &v) |
Traverse a unary node. More... | |
template<rat::exp::type_t Type> | |
void | visit_ (const variadic_t< Type > &v) |
Traverse an n-ary node. More... | |
template<rat::exp::type_t Type> | |
void | visit_ (const weight_node_t< Type > &v) |
Traverse a weight node (lweight, rweight). More... | |
Private Attributes | |
size_t | res_ |
The result, which must be updated incrementally. More... | |
using vcsn::rat::hash< ExpSet >::constant_t = typename super_t::template constant_t<Type> |
using vcsn::rat::hash< ExpSet >::context_t = context_t_of<expressionset_t> |
using vcsn::rat::hash< ExpSet >::expression_t = typename node_t::value_t |
using vcsn::rat::hash< ExpSet >::expressionset_t = ExpSet |
using vcsn::rat::hash< ExpSet >::node_t = typename super_t::node_t |
using vcsn::rat::hash< ExpSet >::super_t = typename expressionset_t::const_visitor |
|
private |
using vcsn::rat::hash< ExpSet >::unary_t = typename super_t::template unary_t<Type> |
using vcsn::rat::hash< ExpSet >::variadic_t = typename super_t::template variadic_t<Type> |
using vcsn::rat::hash< ExpSet >::weight_node_t = typename super_t::template weight_node_t<Type> |
|
inlineprivate |
Update res_ with the hash.
Definition at line 46 of file hash.hh.
References vcsn::hash_combine(), and vcsn::rat::hash< ExpSet >::res_.
Referenced by vcsn::rat::hash< ExpSet >::combine_type_(), vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT(), vcsn::rat::hash< ExpSet >::visit(), and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Update res_ by hashing the node type.
Must be for every node.
Definition at line 53 of file hash.hh.
References vcsn::rat::hash< ExpSet >::combine_().
Referenced by vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT(), vcsn::rat::hash< ExpSet >::visit(), and vcsn::rat::hash< ExpSet >::visit_().
|
inlinestatic |
|
inline |
Entry point: return the hash of v.
Definition at line 36 of file hash.hh.
References vcsn::rat::hash< ExpSet >::res_.
|
inlineprivate |
Definition at line 58 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 59 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 60 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 61 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 62 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 63 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 64 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 65 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 66 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 67 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 68 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 69 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 70 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 71 of file hash.hh.
References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().
|
inlineprivate |
Definition at line 73 of file hash.hh.
References vcsn::rat::hash< ExpSet >::combine_(), vcsn::rat::hash< ExpSet >::combine_type_(), and vcsn::v.
|
inlineoverrideprivate |
Definition at line 101 of file hash.hh.
References vcsn::rat::hash< ExpSet >::combine_(), vcsn::rat::hash< ExpSet >::combine_type_(), and vcsn::v.
|
inlineprivate |
Traverse a nullary node.
Definition at line 109 of file hash.hh.
References vcsn::rat::hash< ExpSet >::combine_type_().
Referenced by vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT().
|
inlineprivate |
Traverse a unary node.
Definition at line 116 of file hash.hh.
References vcsn::rat::hash< ExpSet >::combine_type_().
|
inlineprivate |
Traverse an n-ary node.
Definition at line 124 of file hash.hh.
References vcsn::rat::hash< ExpSet >::combine_type_().
|
inlineprivate |
Traverse a weight node (lweight, rweight).
Definition at line 133 of file hash.hh.
References vcsn::rat::hash< ExpSet >::combine_(), and vcsn::rat::hash< ExpSet >::combine_type_().
|
private |
The result, which must be updated incrementally.
Do not modify directly, call combine_
instead.
Definition at line 142 of file hash.hh.
Referenced by vcsn::rat::hash< ExpSet >::combine_(), and vcsn::rat::hash< ExpSet >::operator()().