Changes in lemon/tolerance.h [49:9a556af88710:16:22696f89d183] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/tolerance.h
r49 r16 3 3 * This file is a part of LEMON, a generic C++ optimization library 4 4 * 5 * Copyright (C) 2003-200 85 * Copyright (C) 2003-2007 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 37 37 ///as a result of a probably inexact computation. 38 38 /// 39 /// \refTolerance is a class to provide a basic way to39 ///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 \ref 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__ 51 52 ///\sa Tolerance<long long int> 53 #endif 52 54 ///\sa Tolerance<unsigned int> 55 #if defined __GNUC__ && !defined __STRICT_ANSI__ 53 56 ///\sa Tolerance<unsigned long long int> 57 #endif 54 58 55 59 template<class T> … … 60 64 61 65 ///\name Comparisons 62 ///The concept is that these bool functions return \c true only if66 ///The concept is that these bool functions return with \c true only if 63 67 ///the related comparisons hold even if some numerical error appeared 64 68 ///during the computations. … … 88 92 89 93 90 ///Float specialization of Tolerance.91 92 ///Float specialization of Tolerance.94 ///Float specialization of \ref Tolerance. 95 96 ///Float specialization of \ref Tolerance. 93 97 ///\sa Tolerance 94 98 ///\relates Tolerance … … 104 108 ///Constructor setting the epsilon tolerance to the default value. 105 109 Tolerance() : _epsilon(def_epsilon) {} 106 ///Constructor setting the epsilon tolerance to the given value.110 ///Constructor setting the epsilon tolerance. 107 111 Tolerance(float e) : _epsilon(e) {} 108 112 109 ///Return sthe epsilon value.113 ///Return the epsilon value. 110 114 Value epsilon() const {return _epsilon;} 111 ///Set sthe epsilon value.115 ///Set the epsilon value. 112 116 void epsilon(Value e) {_epsilon=e;} 113 117 114 ///Return sthe default epsilon value.118 ///Return the default epsilon value. 115 119 static Value defaultEpsilon() {return def_epsilon;} 116 ///Set sthe default epsilon value.120 ///Set the default epsilon value. 117 121 static void defaultEpsilon(Value e) {def_epsilon=e;} 118 122 119 123 ///\name Comparisons 120 ///See \refTolerance for more details.124 ///See class Tolerance for more details. 121 125 122 126 ///@{ … … 139 143 }; 140 144 141 ///Double specialization of Tolerance.142 143 ///Double specialization of Tolerance.145 ///Double specialization of \ref Tolerance. 146 147 ///Double specialization of \ref Tolerance. 144 148 ///\sa Tolerance 145 149 ///\relates Tolerance … … 155 159 ///Constructor setting the epsilon tolerance to the default value. 156 160 Tolerance() : _epsilon(def_epsilon) {} 157 ///Constructor setting the epsilon tolerance to the given value.161 ///Constructor setting the epsilon tolerance. 158 162 Tolerance(double e) : _epsilon(e) {} 159 163 160 ///Return sthe epsilon value.164 ///Return the epsilon value. 161 165 Value epsilon() const {return _epsilon;} 162 ///Set sthe epsilon value.166 ///Set the epsilon value. 163 167 void epsilon(Value e) {_epsilon=e;} 164 168 165 ///Return sthe default epsilon value.169 ///Return the default epsilon value. 166 170 static Value defaultEpsilon() {return def_epsilon;} 167 ///Set sthe default epsilon value.171 ///Set the default epsilon value. 168 172 static void defaultEpsilon(Value e) {def_epsilon=e;} 169 173 170 174 ///\name Comparisons 171 ///See \refTolerance for more details.175 ///See class Tolerance for more details. 172 176 173 177 ///@{ … … 190 194 }; 191 195 192 ///Long double specialization of Tolerance.193 194 ///Long double specialization of Tolerance.196 ///Long double specialization of \ref Tolerance. 197 198 ///Long double specialization of \ref Tolerance. 195 199 ///\sa Tolerance 196 200 ///\relates Tolerance … … 206 210 ///Constructor setting the epsilon tolerance to the default value. 207 211 Tolerance() : _epsilon(def_epsilon) {} 208 ///Constructor setting the epsilon tolerance to the given value.212 ///Constructor setting the epsilon tolerance. 209 213 Tolerance(long double e) : _epsilon(e) {} 210 214 211 ///Return sthe epsilon value.215 ///Return the epsilon value. 212 216 Value epsilon() const {return _epsilon;} 213 ///Set sthe epsilon value.217 ///Set the epsilon value. 214 218 void epsilon(Value e) {_epsilon=e;} 215 219 216 ///Return sthe default epsilon value.220 ///Return the default epsilon value. 217 221 static Value defaultEpsilon() {return def_epsilon;} 218 ///Set sthe default epsilon value.222 ///Set the default epsilon value. 219 223 static void defaultEpsilon(Value e) {def_epsilon=e;} 220 224 221 225 ///\name Comparisons 222 ///See \refTolerance for more details.226 ///See class Tolerance for more details. 223 227 224 228 ///@{ … … 241 245 }; 242 246 243 ///Integer specialization of Tolerance.244 245 ///Integer specialization of Tolerance.247 ///Integer specialization of \ref Tolerance. 248 249 ///Integer specialization of \ref Tolerance. 246 250 ///\sa Tolerance 247 251 template<> … … 274 278 }; 275 279 276 ///Unsigned integer specialization of Tolerance.277 278 280 ///Unsigned integer specialization of \ref Tolerance. 281 282 ///Unsigned integer specialization of \ref Tolerance. 279 283 ///\sa Tolerance 280 284 template<> … … 308 312 309 313 310 ///Long integer specialization of Tolerance.311 312 ///Long integer specialization of Tolerance.314 ///Long integer specialization of \ref Tolerance. 315 316 ///Long integer specialization of \ref Tolerance. 313 317 ///\sa Tolerance 314 318 template<> … … 341 345 }; 342 346 343 ///Unsigned long integer specialization of Tolerance.344 345 347 ///Unsigned long integer specialization of \ref Tolerance. 348 349 ///Unsigned long integer specialization of \ref Tolerance. 346 350 ///\sa Tolerance 347 351 template<> … … 376 380 #if defined __GNUC__ && !defined __STRICT_ANSI__ 377 381 378 ///Long long integer specialization of Tolerance.382 ///Long long integer specialization of \ref Tolerance. 379 383 380 384 ///Long long integer specialization of \ref Tolerance. … … 411 415 }; 412 416 413 ///Unsigned long long integer specialization of Tolerance.417 ///Unsigned long long integer specialization of \ref Tolerance. 414 418 415 419 ///Unsigned long long integer specialization of \ref Tolerance.
Note: See TracChangeset
for help on using the changeset viewer.