1 #ifndef __OPENTREP_DISTANCEERRORRULE_HPP
2 #define __OPENTREP_DISTANCEERRORRULE_HPP
14 #include <boost/array.hpp>
36 { {3, 6, 9, 14, 19} };
66 DistanceErrorScale_T::const_iterator itError =
67 _scale.lower_bound (iNbOfLetters);
69 if (itError != _scale.end()) {
70 oNbOfErrors_T = itError->second;
73 oNbOfErrors_T = iNbOfLetters / 4;
103 std::ostringstream oStr;
105 for (DistanceErrorScale_T::const_iterator itError = _scale.begin();
106 itError != _scale.end(); ++itError, ++idx) {
110 oStr << itError->second <<
": " << itError->first;
119 std::ostringstream oStr;
139 _scale.insert (DistanceErrorScale_T::value_type (iScaleArray[idx],
148 for (
NbOfErrors_T idx = 0; idx != iScaleArray.size(); ++idx) {
149 _scale.insert (DistanceErrorScale_T::value_type (iScaleArray[idx],
180 #endif // __OPENTREP_DISTANCEERRORRULE_HPP