lemon/tolerance.h
changeset 49 9a556af88710
parent 42 3a98515e9bc3
child 72 7050661bdea4
     1.1 --- a/lemon/tolerance.h	Mon Jan 07 19:44:18 2008 +0100
     1.2 +++ b/lemon/tolerance.h	Tue Jan 08 02:53:42 2008 +0100
     1.3 @@ -36,25 +36,21 @@
     1.4    ///handle the comparison of numbers that are obtained
     1.5    ///as a result of a probably inexact computation.
     1.6    ///
     1.7 -  ///Tolerance is a class to provide a basic way to
     1.8 +  ///\ref Tolerance is a class to provide a basic way to
     1.9    ///handle the comparison of numbers that are obtained
    1.10    ///as a result of a probably inexact computation.
    1.11    ///
    1.12    ///This is an abstract class, it should be specialized for all numerical
    1.13 -  ///data types. These specialized classes like Tolerance<double>
    1.14 +  ///data types. These specialized classes like \ref Tolerance<double>
    1.15    ///may offer additional tuning parameters.
    1.16    ///
    1.17    ///\sa Tolerance<float>
    1.18    ///\sa Tolerance<double>
    1.19    ///\sa Tolerance<long double>
    1.20    ///\sa Tolerance<int>
    1.21 -#if defined __GNUC__ && !defined __STRICT_ANSI__  
    1.22    ///\sa Tolerance<long long int>
    1.23 -#endif
    1.24    ///\sa Tolerance<unsigned int>
    1.25 -#if defined __GNUC__ && !defined __STRICT_ANSI__  
    1.26    ///\sa Tolerance<unsigned long long int>
    1.27 -#endif
    1.28  
    1.29    template<class T>
    1.30    class Tolerance
    1.31 @@ -63,7 +59,7 @@
    1.32      typedef T Value;
    1.33  
    1.34      ///\name Comparisons
    1.35 -    ///The concept is that these bool functions return with \c true only if
    1.36 +    ///The concept is that these bool functions return \c true only if
    1.37      ///the related comparisons hold even if some numerical error appeared
    1.38      ///during the computations.
    1.39  
    1.40 @@ -107,21 +103,21 @@
    1.41  
    1.42      ///Constructor setting the epsilon tolerance to the default value.
    1.43      Tolerance() : _epsilon(def_epsilon) {}
    1.44 -    ///Constructor setting the epsilon tolerance.
    1.45 +    ///Constructor setting the epsilon tolerance to the given value.
    1.46      Tolerance(float e) : _epsilon(e) {}
    1.47  
    1.48 -    ///Return the epsilon value.
    1.49 +    ///Returns the epsilon value.
    1.50      Value epsilon() const {return _epsilon;}
    1.51 -    ///Set the epsilon value.
    1.52 +    ///Sets the epsilon value.
    1.53      void epsilon(Value e) {_epsilon=e;}
    1.54  
    1.55 -    ///Return the default epsilon value.
    1.56 +    ///Returns the default epsilon value.
    1.57      static Value defaultEpsilon() {return def_epsilon;}
    1.58 -    ///Set the default epsilon value.
    1.59 +    ///Sets the default epsilon value.
    1.60      static void defaultEpsilon(Value e) {def_epsilon=e;}
    1.61  
    1.62      ///\name Comparisons
    1.63 -    ///See class Tolerance for more details.
    1.64 +    ///See \ref Tolerance for more details.
    1.65  
    1.66      ///@{
    1.67  
    1.68 @@ -158,21 +154,21 @@
    1.69  
    1.70      ///Constructor setting the epsilon tolerance to the default value.
    1.71      Tolerance() : _epsilon(def_epsilon) {}
    1.72 -    ///Constructor setting the epsilon tolerance.
    1.73 +    ///Constructor setting the epsilon tolerance to the given value.
    1.74      Tolerance(double e) : _epsilon(e) {}
    1.75  
    1.76 -    ///Return the epsilon value.
    1.77 +    ///Returns the epsilon value.
    1.78      Value epsilon() const {return _epsilon;}
    1.79 -    ///Set the epsilon value.
    1.80 +    ///Sets the epsilon value.
    1.81      void epsilon(Value e) {_epsilon=e;}
    1.82  
    1.83 -    ///Return the default epsilon value.
    1.84 +    ///Returns the default epsilon value.
    1.85      static Value defaultEpsilon() {return def_epsilon;}
    1.86 -    ///Set the default epsilon value.
    1.87 +    ///Sets the default epsilon value.
    1.88      static void defaultEpsilon(Value e) {def_epsilon=e;}
    1.89  
    1.90      ///\name Comparisons
    1.91 -    ///See class Tolerance for more details.
    1.92 +    ///See \ref Tolerance for more details.
    1.93  
    1.94      ///@{
    1.95  
    1.96 @@ -209,21 +205,21 @@
    1.97  
    1.98      ///Constructor setting the epsilon tolerance to the default value.
    1.99      Tolerance() : _epsilon(def_epsilon) {}
   1.100 -    ///Constructor setting the epsilon tolerance.
   1.101 +    ///Constructor setting the epsilon tolerance to the given value.
   1.102      Tolerance(long double e) : _epsilon(e) {}
   1.103  
   1.104 -    ///Return the epsilon value.
   1.105 +    ///Returns the epsilon value.
   1.106      Value epsilon() const {return _epsilon;}
   1.107 -    ///Set the epsilon value.
   1.108 +    ///Sets the epsilon value.
   1.109      void epsilon(Value e) {_epsilon=e;}
   1.110  
   1.111 -    ///Return the default epsilon value.
   1.112 +    ///Returns the default epsilon value.
   1.113      static Value defaultEpsilon() {return def_epsilon;}
   1.114 -    ///Set the default epsilon value.
   1.115 +    ///Sets the default epsilon value.
   1.116      static void defaultEpsilon(Value e) {def_epsilon=e;}
   1.117  
   1.118      ///\name Comparisons
   1.119 -    ///See class Tolerance for more details.
   1.120 +    ///See \ref Tolerance for more details.
   1.121  
   1.122      ///@{
   1.123  
   1.124 @@ -256,7 +252,7 @@
   1.125      typedef int Value;
   1.126  
   1.127      ///\name Comparisons
   1.128 -    ///See Tolerance for more details.
   1.129 +    ///See \ref Tolerance for more details.
   1.130  
   1.131      ///@{
   1.132  
   1.133 @@ -289,7 +285,7 @@
   1.134      typedef unsigned int Value;
   1.135  
   1.136      ///\name Comparisons
   1.137 -    ///See Tolerance for more details.
   1.138 +    ///See \ref Tolerance for more details.
   1.139  
   1.140      ///@{
   1.141  
   1.142 @@ -323,7 +319,7 @@
   1.143      typedef long int Value;
   1.144  
   1.145      ///\name Comparisons
   1.146 -    ///See Tolerance for more details.
   1.147 +    ///See \ref Tolerance for more details.
   1.148  
   1.149      ///@{
   1.150  
   1.151 @@ -356,7 +352,7 @@
   1.152      typedef unsigned long int Value;
   1.153  
   1.154      ///\name Comparisons
   1.155 -    ///See Tolerance for more details.
   1.156 +    ///See \ref Tolerance for more details.
   1.157  
   1.158      ///@{
   1.159