17 #ifndef VCSN_ALGEBRA_CONCEPT_SEMIRING_BASE_HXX
18 # define VCSN_ALGEBRA_CONCEPT_SEMIRING_BASE_HXX
20 # include <vaucanson/algebra/concept/semiring_base.hh>
75 template <
class Self,
class T>
79 op_in_star(this->structure(), this->value());
83 template <
class Self,
class T>
87 return op_starable(this->structure(), this->value());
90 template <
class Self,
class T>
94 template <
class Self,
class T>
104 template <
typename S,
typename T>
105 typename op_star_traits<S, T>::ret_t
108 typename op_star_traits<S, T>::ret_t res(e);
112 template <
typename S,
typename T>
118 template <
typename S,
typename T>
121 typename std::string::const_iterator& i)
131 template <
typename S,
typename T>
140 template <
typename S,
typename T>
144 std::cerr <<
"WARNING: default implementation of op_choose_starable "
145 "called." << std::endl;
146 std::cerr <<
"RESULT IS NOT RANDOM." << std::endl;
151 template <
typename S,
typename T>
155 pure_service_call (
"default implementation of op_choose_non_starable()");
159 template <
typename S,
typename T>
163 const std::string& s,
164 typename std::string::const_iterator& i)
166 if (*i !=
'-' && (*i < '0' || *i >
'9'))
169 std::stringstream ret;
170 ret << std::string(i, s.end());
171 int init = ret.tellg();
172 ret >> std::dec >> res;
179 int cur = ret.tellg();
188 template <
typename Self,
typename T>
189 bool op_starable(
const algebra::SemiringBase<Self>& s,
const T& v)
194 template <
typename Self,
typename T>
195 void op_in_star(
const algebra::SemiringBase<Self>&, T& v)
201 template <
typename Self,
typename T>
211 #endif // ! VCSN_ALGEBRA_CONCEPT_SEMIRING_BASE_HXX