00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_HASH_VISITOR_HH
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_HASH_VISITOR_HH
00019
00020 # include <ostream>
00021 # include <string>
00022 # include <set>
00023
00024 # include <vaucanson/algebra/implementation/series/rat/exp.hh>
00025
00026 namespace vcsn
00027 {
00028
00029 namespace rat
00030 {
00031
00032 template <class Word, class Weight>
00033 class HashVisitor : public ConstNodeVisitor<Word, Weight>
00034 {
00035 public:
00036
00037 typedef Word monoid_elt_value_t;
00038 typedef Weight semiring_elt_value_t;
00039 typedef Node<Word, Weight> node_t;
00040
00041 public:
00042
00043 HashVisitor();
00044 virtual ~HashVisitor();
00045
00046 virtual void product(const node_t* lhs, const node_t* rhs);
00047 virtual void sum(const node_t* lhs, const node_t* rhs);
00048 virtual void star(const node_t* node);
00049 virtual void left_weight(const semiring_elt_value_t& w, const node_t* node);
00050 virtual void right_weight(const semiring_elt_value_t& w, const node_t* node);
00051 virtual void constant(const monoid_elt_value_t& m);
00052 virtual void zero();
00053 virtual void one();
00054
00055 std::size_t hash_value();
00056
00057 protected:
00058 std::size_t seed_;
00059 };
00060 }
00061
00062 }
00063
00064 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00065 # include <vaucanson/algebra/implementation/series/rat/hash_visitor.hxx>
00066 # endif // VCSN_USE_INTERFACE_ONLY
00067
00068 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DUMP_VISITOR_HH