Vcsn  2.3
Be Rational
vcsn::rat::hash< ExpSet > Class Template Reference

#include <hash.hh>

Inheritance diagram for vcsn::rat::hash< ExpSet >:
Collaboration diagram for vcsn::rat::hash< ExpSet >:

Classes

struct  visit_tuple
 
struct  visit_tuple< false, Dummy >
 

Public Types

using expressionset_t = ExpSet
 
using context_t = context_t_of< expressionset_t >
 
using weight_t = typename context_t::weightset_t::value_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...
 
using inner_t = typename super_t::inner_t
 
template<type_t Type>
using variadic_t = typename super_t::template variadic_t< Type >
 
template<type_t Type>
using unary_t = typename super_t::template unary_t< Type >
 
template<type_t Type>
using weight_node_t = typename super_t::template weight_node_t< Type >
 
using leaf_t = typename super_t::leaf_t
 

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 charme ()
 Name of this algorithm, for error messages. More...
 

Private Types

using tuple_t = typename super_t::tuple_t
 

Private Member Functions

 VCSN_RAT_VISIT (add, v)
 
 VCSN_RAT_VISIT (atom, 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)
 
void visit (const tuple_t &v, std::true_type) override
 
void combine_type (const node_t &node)
 Update res_ by hashing the node type; this is needed for any node. More...
 
void visit_ (const node_t &v)
 Traverse a nullary node (atom, \z, \e). More...
 
template<rat::exp::type_t Type>
void visit_ (const unary_t< Type > &v)
 Traverse a unary node (*, {c}). More...
 
template<rat::exp::type_t Type>
void visit_ (const variadic_t< Type > &v)
 Traverse an n-ary node (+, concatenation, &, :). 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_
 

Detailed Description

template<typename ExpSet>
class vcsn::rat::hash< ExpSet >

Definition at line 10 of file hash.hh.

Member Typedef Documentation

template<typename ExpSet >
using vcsn::rat::hash< ExpSet >::context_t = context_t_of<expressionset_t>

Definition at line 15 of file hash.hh.

template<typename ExpSet >
using vcsn::rat::hash< ExpSet >::expression_t = typename node_t::value_t

A shared_ptr to node_t.

Definition at line 22 of file hash.hh.

template<typename ExpSet >
using vcsn::rat::hash< ExpSet >::expressionset_t = ExpSet

Definition at line 14 of file hash.hh.

template<typename ExpSet >
using vcsn::rat::hash< ExpSet >::inner_t = typename super_t::inner_t

Definition at line 24 of file hash.hh.

template<typename ExpSet >
using vcsn::rat::hash< ExpSet >::leaf_t = typename super_t::leaf_t

Definition at line 31 of file hash.hh.

template<typename ExpSet >
using vcsn::rat::hash< ExpSet >::node_t = typename super_t::node_t

Actual node, without indirection.

Definition at line 20 of file hash.hh.

template<typename ExpSet >
using vcsn::rat::hash< ExpSet >::super_t = typename expressionset_t::const_visitor

Definition at line 17 of file hash.hh.

template<typename ExpSet >
using vcsn::rat::hash< ExpSet >::tuple_t = typename super_t::tuple_t
private

Definition at line 62 of file hash.hh.

template<typename ExpSet >
template<type_t Type>
using vcsn::rat::hash< ExpSet >::unary_t = typename super_t::template unary_t<Type>

Definition at line 28 of file hash.hh.

template<typename ExpSet >
template<type_t Type>
using vcsn::rat::hash< ExpSet >::variadic_t = typename super_t::template variadic_t<Type>

Definition at line 26 of file hash.hh.

template<typename ExpSet >
template<type_t Type>
using vcsn::rat::hash< ExpSet >::weight_node_t = typename super_t::template weight_node_t<Type>

Definition at line 30 of file hash.hh.

template<typename ExpSet >
using vcsn::rat::hash< ExpSet >::weight_t = typename context_t::weightset_t::value_t

Definition at line 16 of file hash.hh.

Member Function Documentation

template<typename ExpSet >
void vcsn::rat::hash< ExpSet >::combine_type ( const node_t node)
private

Update res_ by hashing the node type; this is needed for any node.

Definition at line 36 of file hash.hxx.

References vcsn::hash_combine().

Here is the call graph for this function:

template<typename ExpSet >
static constexpr const char* vcsn::rat::hash< ExpSet >::me ( )
inlinestatic

Name of this algorithm, for error messages.

Definition at line 34 of file hash.hh.

template<typename ExpSet >
size_t vcsn::rat::hash< ExpSet >::operator() ( const expression_t v)
inline

Entry point: return the hash of v.

Definition at line 37 of file hash.hh.

References vcsn::rat::hash< ExpSet >::res_.

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( add  ,
v   
)
inlineprivate

Definition at line 46 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( atom  ,
v   
)
private
template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( complement  ,
v   
)
inlineprivate

Definition at line 48 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( compose  ,
v   
)
inlineprivate

Definition at line 49 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( conjunction  ,
v   
)
inlineprivate

Definition at line 50 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( infiltrate  ,
v   
)
inlineprivate

Definition at line 51 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( ldivide  ,
v   
)
inlineprivate

Definition at line 52 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( lweight  ,
v   
)
private
template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( mul  ,
v   
)
inlineprivate

Definition at line 54 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( one  ,
v   
)
inlineprivate

Definition at line 55 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( rweight  ,
v   
)
private
template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( shuffle  ,
v   
)
inlineprivate

Definition at line 57 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( star  ,
v   
)
inlineprivate

Definition at line 58 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( transposition  ,
v   
)
inlineprivate

Definition at line 59 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT ( zero  ,
v   
)
inlineprivate

Definition at line 60 of file hash.hh.

References vcsn::v, and vcsn::rat::hash< ExpSet >::visit_().

Here is the call graph for this function:

template<typename ExpSet >
auto vcsn::rat::hash< ExpSet >::visit ( const tuple_t v,
std::true_type   
)
inlineoverrideprivate

Definition at line 84 of file hash.hh.

References vcsn::rat::hash< ExpSet >::res_, and vcsn::v.

template<typename ExpSet >
void vcsn::rat::hash< ExpSet >::visit_ ( const node_t v)
private

Traverse a nullary node (atom, \z, \e).

Definition at line 43 of file hash.hxx.

Referenced by vcsn::rat::hash< ExpSet >::VCSN_RAT_VISIT().

template<typename ExpSet >
template<type_t Type>
void vcsn::rat::hash< ExpSet >::visit_ ( const unary_t< Type > &  v)
private

Traverse a unary node (*, {c}).

Definition at line 51 of file hash.hxx.

template<typename ExpSet >
template<type_t Type>
void vcsn::rat::hash< ExpSet >::visit_ ( const variadic_t< Type > &  v)
private

Traverse an n-ary node (+, concatenation, &, :).

Definition at line 70 of file hash.hxx.

template<typename ExpSet >
template<type_t Type>
void vcsn::rat::hash< ExpSet >::visit_ ( const weight_node_t< Type > &  v)
private

Traverse a weight node (lweight, rweight).

Definition at line 60 of file hash.hxx.

References vcsn::hash_combine().

Here is the call graph for this function:

Member Data Documentation

template<typename ExpSet >
size_t vcsn::rat::hash< ExpSet >::res_
private

The documentation for this class was generated from the following files: