17 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_HASH_VISITOR_HXX
18 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_HASH_VISITOR_HXX
20 # include <boost/functional/hash/hash.hpp>
21 # include <vaucanson/algebra/implementation/series/rat/dump_visitor.hh>
22 # include <vaucanson/algebra/implementation/series/rat/nodes.hh>
28 template <
class Word,
class Weight>
29 HashVisitor<Word, Weight>::HashVisitor()
34 template <
class Word,
class Weight>
35 HashVisitor<Word, Weight>::~HashVisitor()
38 template <
class Word,
class Weight>
40 HashVisitor<Word, Weight>::product(
const node_t* lhs,
const node_t* rhs)
43 ::boost::hash_combine(seed_,
'.');
47 template <
class Word,
class Weight>
49 HashVisitor<Word, Weight>::sum(
const node_t* lhs,
const node_t* rhs)
52 ::boost::hash_combine(seed_,
'+');
56 template<
class Word,
class Weight>
61 ::boost::hash_combine(seed_,
'*');
64 template<
class Word,
class Weight>
66 HashVisitor<Word, Weight>::left_weight(
const semiring_elt_value_t& w,
const node_t* node)
68 ::boost::hash_combine(seed_, w);
72 template<
class Word,
class Weight>
74 HashVisitor<Word, Weight>::right_weight(
const semiring_elt_value_t& w,
const node_t* node)
76 ::boost::hash_combine(seed_,
' ');
77 ::boost::hash_combine(seed_, w);
81 template<
class Word,
class Weight>
83 HashVisitor<Word, Weight>::constant(
const monoid_elt_value_t& m)
85 ::boost::hash_combine(seed_, m);
88 template<
class Word,
class Weight>
90 HashVisitor<Word, Weight>::zero()
92 ::boost::hash_combine(seed_, rat::zero());
95 template<
class Word,
class Weight>
97 HashVisitor<Word, Weight>::one()
99 ::boost::hash_combine(seed_, rat::id());
102 template<
class Word,
class Weight>
104 HashVisitor<Word, Weight>::hash_value()
114 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_HASH_VISITOR_HXX