Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::rat::hash< RatExpSet > Class Template Reference

#include <hash.hh>

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

Public Types

using ratexpset_t = RatExpSet
 
using context_t = context_t_of< ratexpset_t >
 
using weight_t = typename context_t::weightset_t::value_t
 
using super_t = typename ratexpset_t::const_visitor
 
using node_t = typename super_t::node_t
 
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 node_t &v)
 Entry point: return the hash of v. More...
 
size_t operator() (const std::shared_ptr< const node_t > &v)
 Entry point: return the hash of v. More...
 

Private Types

using atom_t = typename super_t::atom_t
 
using complement_t = typename super_t::complement_t
 
using conjunction_t = typename super_t::conjunction_t
 
using ldiv_t = typename super_t::ldiv_t
 
using lweight_t = typename super_t::lweight_t
 
using one_t = typename super_t::one_t
 
using prod_t = typename super_t::prod_t
 
using rweight_t = typename super_t::rweight_t
 
using shuffle_t = typename super_t::shuffle_t
 
using star_t = typename super_t::star_t
 
using sum_t = typename super_t::sum_t
 
using transposition_t = typename super_t::transposition_t
 
using zero_t = typename super_t::zero_t
 

Private Member Functions

virtual void visit (const atom_t &v)
 
virtual void visit (const complement_t &v)
 
virtual void visit (const conjunction_t &v)
 
virtual void visit (const ldiv_t &v)
 
virtual void visit (const lweight_t &v)
 
virtual void visit (const one_t &v)
 
virtual void visit (const prod_t &v)
 
virtual void visit (const rweight_t &v)
 
virtual void visit (const shuffle_t &v)
 
virtual void visit (const star_t &v)
 
virtual void visit (const sum_t &v)
 
virtual void visit (const transposition_t &v)
 
virtual void visit (const zero_t &v)
 
void combine_type (const node_t &node)
 Update res_ by hashing the node type; this is needed for any node. More...
 
void visit_nullary (const node_t &v)
 Traverse a nullary node (atom, \z, \e). More...
 
template<rat::exp::type_t Type>
void visit_unary (const unary_t< Type > &v)
 Traverse a unary node (*, {c}). More...
 
template<rat::exp::type_t Type>
void visit_variadic (const variadic_t< Type > &v)
 Traverse an n-ary node (+, concatenation, &, :). More...
 
template<rat::exp::type_t Type>
void visit_weight_node (const weight_node_t< Type > &v)
 Traverse a weight node (lweight, rweight). More...
 

Private Attributes

size_t res_
 

Detailed Description

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

Definition at line 13 of file hash.hh.

Member Typedef Documentation

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::atom_t = typename super_t:: atom_t
private

Definition at line 53 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::complement_t = typename super_t:: complement_t
private

Definition at line 54 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::conjunction_t = typename super_t:: conjunction_t
private

Definition at line 55 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::context_t = context_t_of<ratexpset_t>

Definition at line 18 of file hash.hh.

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

Definition at line 22 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::ldiv_t = typename super_t:: ldiv_t
private

Definition at line 56 of file hash.hh.

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

Definition at line 29 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::lweight_t = typename super_t:: lweight_t
private

Definition at line 57 of file hash.hh.

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

Definition at line 21 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::one_t = typename super_t:: one_t
private

Definition at line 58 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::prod_t = typename super_t:: prod_t
private

Definition at line 59 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::ratexpset_t = RatExpSet

Definition at line 17 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::rweight_t = typename super_t:: rweight_t
private

Definition at line 60 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::shuffle_t = typename super_t:: shuffle_t
private

Definition at line 61 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::star_t = typename super_t:: star_t
private

Definition at line 62 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::sum_t = typename super_t:: sum_t
private

Definition at line 63 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::super_t = typename ratexpset_t::const_visitor

Definition at line 20 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::transposition_t = typename super_t:: transposition_t
private

Definition at line 64 of file hash.hh.

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

Definition at line 26 of file hash.hh.

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

Definition at line 24 of file hash.hh.

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

Definition at line 28 of file hash.hh.

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

Definition at line 19 of file hash.hh.

template<typename RatExpSet>
using vcsn::rat::hash< RatExpSet >::zero_t = typename super_t:: zero_t
private

Definition at line 65 of file hash.hh.

Member Function Documentation

template<typename RatExpSet >
void vcsn::rat::hash< RatExpSet >::combine_type ( const node_t node)
inlineprivate

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

Definition at line 41 of file hash.hxx.

template<typename RatExpSet>
size_t vcsn::rat::hash< RatExpSet >::operator() ( const node_t v)
inline

Entry point: return the hash of v.

Definition at line 33 of file hash.hh.

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

Referenced by vcsn::rat::hash< RatExpSet >::operator()().

template<typename RatExpSet>
size_t vcsn::rat::hash< RatExpSet >::operator() ( const std::shared_ptr< const node_t > &  v)
inline

Entry point: return the hash of v.

Definition at line 42 of file hash.hh.

References vcsn::rat::hash< RatExpSet >::operator()().

Here is the call graph for this function:

template<typename RatExpSet >
auto vcsn::rat::hash< RatExpSet >::visit ( const atom_t v)
inlineprivatevirtual

Definition at line 22 of file hash.hxx.

template<typename RatExpSet>
virtual void vcsn::rat::hash< RatExpSet >::visit ( const complement_t v)
inlineprivatevirtual

Definition at line 54 of file hash.hh.

References vcsn::rat::hash< RatExpSet >::visit_unary().

Here is the call graph for this function:

template<typename RatExpSet>
virtual void vcsn::rat::hash< RatExpSet >::visit ( const conjunction_t v)
inlineprivatevirtual

Definition at line 55 of file hash.hh.

References vcsn::rat::hash< RatExpSet >::visit_variadic().

Here is the call graph for this function:

template<typename RatExpSet>
virtual void vcsn::rat::hash< RatExpSet >::visit ( const ldiv_t v)
inlineprivatevirtual

Definition at line 56 of file hash.hh.

References vcsn::rat::hash< RatExpSet >::visit_variadic().

Here is the call graph for this function:

template<typename RatExpSet >
auto vcsn::rat::hash< RatExpSet >::visit ( const lweight_t v)
inlineprivatevirtual

Definition at line 28 of file hash.hxx.

template<typename RatExpSet>
virtual void vcsn::rat::hash< RatExpSet >::visit ( const one_t v)
inlineprivatevirtual

Definition at line 58 of file hash.hh.

References vcsn::rat::hash< RatExpSet >::visit_nullary().

Here is the call graph for this function:

template<typename RatExpSet>
virtual void vcsn::rat::hash< RatExpSet >::visit ( const prod_t v)
inlineprivatevirtual

Definition at line 59 of file hash.hh.

References vcsn::rat::hash< RatExpSet >::visit_variadic().

Here is the call graph for this function:

template<typename RatExpSet >
auto vcsn::rat::hash< RatExpSet >::visit ( const rweight_t v)
inlineprivatevirtual

Definition at line 33 of file hash.hxx.

template<typename RatExpSet>
virtual void vcsn::rat::hash< RatExpSet >::visit ( const shuffle_t v)
inlineprivatevirtual

Definition at line 61 of file hash.hh.

References vcsn::rat::hash< RatExpSet >::visit_variadic().

Here is the call graph for this function:

template<typename RatExpSet>
virtual void vcsn::rat::hash< RatExpSet >::visit ( const star_t v)
inlineprivatevirtual

Definition at line 62 of file hash.hh.

References vcsn::rat::hash< RatExpSet >::visit_unary().

Here is the call graph for this function:

template<typename RatExpSet>
virtual void vcsn::rat::hash< RatExpSet >::visit ( const sum_t v)
inlineprivatevirtual

Definition at line 63 of file hash.hh.

References vcsn::rat::hash< RatExpSet >::visit_variadic().

Here is the call graph for this function:

template<typename RatExpSet>
virtual void vcsn::rat::hash< RatExpSet >::visit ( const transposition_t v)
inlineprivatevirtual

Definition at line 64 of file hash.hh.

References vcsn::rat::hash< RatExpSet >::visit_unary().

Here is the call graph for this function:

template<typename RatExpSet>
virtual void vcsn::rat::hash< RatExpSet >::visit ( const zero_t v)
inlineprivatevirtual

Definition at line 65 of file hash.hh.

template<typename RatExpSet >
void vcsn::rat::hash< RatExpSet >::visit_nullary ( const node_t v)
inlineprivate

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

Definition at line 49 of file hash.hxx.

Referenced by vcsn::rat::hash< RatExpSet >::visit().

template<typename RatExpSet >
template<type_t Type>
void vcsn::rat::hash< RatExpSet >::visit_unary ( const unary_t< Type > &  v)
inlineprivate

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

Definition at line 58 of file hash.hxx.

Referenced by vcsn::rat::hash< RatExpSet >::visit().

template<typename RatExpSet >
template<type_t Type>
void vcsn::rat::hash< RatExpSet >::visit_variadic ( const variadic_t< Type > &  v)
inlineprivate

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

Definition at line 79 of file hash.hxx.

Referenced by vcsn::rat::hash< RatExpSet >::visit().

template<typename RatExpSet >
template<type_t Type>
void vcsn::rat::hash< RatExpSet >::visit_weight_node ( const weight_node_t< Type > &  v)
inlineprivate

Traverse a weight node (lweight, rweight).

Definition at line 68 of file hash.hxx.

Member Data Documentation

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

Definition at line 87 of file hash.hh.

Referenced by vcsn::rat::hash< RatExpSet >::operator()().


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