Changeset 49:9a556af88710 in lemon for lemon/tolerance.h
 Timestamp:
 01/08/08 02:53:42 (17 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/tolerance.h
r42 r49 37 37 ///as a result of a probably inexact computation. 38 38 /// 39 /// Tolerance is a class to provide a basic way to39 ///\ref Tolerance is a class to provide a basic way to 40 40 ///handle the comparison of numbers that are obtained 41 41 ///as a result of a probably inexact computation. 42 42 /// 43 43 ///This is an abstract class, it should be specialized for all numerical 44 ///data types. These specialized classes like Tolerance<double>44 ///data types. These specialized classes like \ref Tolerance<double> 45 45 ///may offer additional tuning parameters. 46 46 /// … … 49 49 ///\sa Tolerance<long double> 50 50 ///\sa Tolerance<int> 51 #if defined __GNUC__ && !defined __STRICT_ANSI__52 51 ///\sa Tolerance<long long int> 53 #endif54 52 ///\sa Tolerance<unsigned int> 55 #if defined __GNUC__ && !defined __STRICT_ANSI__56 53 ///\sa Tolerance<unsigned long long int> 57 #endif58 54 59 55 template<class T> … … 64 60 65 61 ///\name Comparisons 66 ///The concept is that these bool functions return with\c true only if62 ///The concept is that these bool functions return \c true only if 67 63 ///the related comparisons hold even if some numerical error appeared 68 64 ///during the computations. … … 108 104 ///Constructor setting the epsilon tolerance to the default value. 109 105 Tolerance() : _epsilon(def_epsilon) {} 110 ///Constructor setting the epsilon tolerance .106 ///Constructor setting the epsilon tolerance to the given value. 111 107 Tolerance(float e) : _epsilon(e) {} 112 108 113 ///Return the epsilon value.109 ///Returns the epsilon value. 114 110 Value epsilon() const {return _epsilon;} 115 ///Set the epsilon value.111 ///Sets the epsilon value. 116 112 void epsilon(Value e) {_epsilon=e;} 117 113 118 ///Return the default epsilon value.114 ///Returns the default epsilon value. 119 115 static Value defaultEpsilon() {return def_epsilon;} 120 ///Set the default epsilon value.116 ///Sets the default epsilon value. 121 117 static void defaultEpsilon(Value e) {def_epsilon=e;} 122 118 123 119 ///\name Comparisons 124 ///See classTolerance for more details.120 ///See \ref Tolerance for more details. 125 121 126 122 ///@{ … … 159 155 ///Constructor setting the epsilon tolerance to the default value. 160 156 Tolerance() : _epsilon(def_epsilon) {} 161 ///Constructor setting the epsilon tolerance .157 ///Constructor setting the epsilon tolerance to the given value. 162 158 Tolerance(double e) : _epsilon(e) {} 163 159 164 ///Return the epsilon value.160 ///Returns the epsilon value. 165 161 Value epsilon() const {return _epsilon;} 166 ///Set the epsilon value.162 ///Sets the epsilon value. 167 163 void epsilon(Value e) {_epsilon=e;} 168 164 169 ///Return the default epsilon value.165 ///Returns the default epsilon value. 170 166 static Value defaultEpsilon() {return def_epsilon;} 171 ///Set the default epsilon value.167 ///Sets the default epsilon value. 172 168 static void defaultEpsilon(Value e) {def_epsilon=e;} 173 169 174 170 ///\name Comparisons 175 ///See classTolerance for more details.171 ///See \ref Tolerance for more details. 176 172 177 173 ///@{ … … 210 206 ///Constructor setting the epsilon tolerance to the default value. 211 207 Tolerance() : _epsilon(def_epsilon) {} 212 ///Constructor setting the epsilon tolerance .208 ///Constructor setting the epsilon tolerance to the given value. 213 209 Tolerance(long double e) : _epsilon(e) {} 214 210 215 ///Return the epsilon value.211 ///Returns the epsilon value. 216 212 Value epsilon() const {return _epsilon;} 217 ///Set the epsilon value.213 ///Sets the epsilon value. 218 214 void epsilon(Value e) {_epsilon=e;} 219 215 220 ///Return the default epsilon value.216 ///Returns the default epsilon value. 221 217 static Value defaultEpsilon() {return def_epsilon;} 222 ///Set the default epsilon value.218 ///Sets the default epsilon value. 223 219 static void defaultEpsilon(Value e) {def_epsilon=e;} 224 220 225 221 ///\name Comparisons 226 ///See classTolerance for more details.222 ///See \ref Tolerance for more details. 227 223 228 224 ///@{ … … 257 253 258 254 ///\name Comparisons 259 ///See Tolerance for more details.255 ///See \ref Tolerance for more details. 260 256 261 257 ///@{ … … 290 286 291 287 ///\name Comparisons 292 ///See Tolerance for more details.288 ///See \ref Tolerance for more details. 293 289 294 290 ///@{ … … 324 320 325 321 ///\name Comparisons 326 ///See Tolerance for more details.322 ///See \ref Tolerance for more details. 327 323 328 324 ///@{ … … 357 353 358 354 ///\name Comparisons 359 ///See Tolerance for more details.355 ///See \ref Tolerance for more details. 360 356 361 357 ///@{
Note: See TracChangeset
for help on using the changeset viewer.