blob: f8dde9718c3274b31fe259ced6a67b3250b8cc97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// author : Sven Gothel - Stapenhorststrasse 35a - 33615 Bielefeld
//
/*
*
* $Log: dblmenge.cc $
* Revision 1.4 1995/04/07 16:54:45 Sven_Gothel
* *** empty log message ***
* Revision 1.3 1995/04/04 10:37:20 Sven_Gothel
* *** empty log message ***
* Revision 1.2 1994/12/15 15:27:46 Sven_Gothel
* the very first check in !!!
* all files contains the log message now !!!
* Sven Gothel, Bielefeld 14.12.1994 !!!
*
* Revision 1.1 1994/12/15 15:18:34 Sven_Gothel
* Initial revision
*
*/
#include "menge.h"
#include <cmath>
#include <limits>
template<> Menge<double>::size_type Menge<double>::indexOf(const double& x) const noexcept
{
for (size_type i = 0; i < card(); i++) {
if( ::fabs( (*this)[i] - x ) < std::numeric_limits<double>::epsilon() * ::fabs(x) ) {
return i;
}
}
return npos;
}
|