17 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DEPTH_VISITOR_HXX
18 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DEPTH_VISITOR_HXX
22 # include <vaucanson/algebra/implementation/series/rat/depth_visitor.hh>
28 template<
typename M_,
typename W_>
30 DepthVisitor<M_,W_>::sum_or_product(
const Node<M_, W_>* left_,
31 const Node<M_, W_>* right_)
34 size_t left_depth = d;
35 right_->accept(*
this);
36 d = 1 + std::max(left_depth, d);
39 template<
typename M_,
typename W_>
41 DepthVisitor<M_, W_>::weight_or_star(
const Node<M_, W_>* node)
47 template<
typename M_,
typename W_>
49 DepthVisitor<M_, W_>::product(
const Node<M_, W_>* left_,
50 const Node<M_, W_>* right_)
52 sum_or_product(left_, right_);
55 template<
typename M_,
typename W_>
57 DepthVisitor<M_, W_>::sum(
const Node<M_, W_>* left_,
58 const Node<M_, W_>* right_)
60 sum_or_product(left_, right_);
63 template<
typename M_,
typename W_>
70 template<
typename M_,
typename W_>
72 DepthVisitor<M_, W_>::left_weight(
const W_&,
const Node<M_, W_>* node)
77 template<
typename M_,
typename W_>
79 DepthVisitor<M_, W_>::right_weight(
const W_&,
const Node<M_, W_>* node)
84 template<
typename M_,
typename W_>
86 DepthVisitor<M_, W_>::constant(
const M_&)
91 template<
typename M_,
typename W_>
92 void DepthVisitor<M_, W_>::zero()
97 template<
typename M_,
typename W_>
98 void DepthVisitor<M_, W_>::one()
103 template<
typename M_,
typename W_>
113 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DEPTH_VISITOR_HXX