Files Classes Functions Hierarchy
#include <d4minoperator.h>
Public Member Functions | |
| d4minoperator (d4tess &_tess) | |
| virtual | ~d4minoperator () |
| virtual bool const | eval (uintc a, uintc b) |
| bool const | evalInvert (uintc a, uintc index) |
| bool const | twotetrahedronMInvert (uintc a, uintc ai, uintc b, uintc bi) |
Public Attributes | |
| d4tess & | tess |
Protected Member Functions | |
| bool const | approximatelyequal (double const a, double const b) |
Static Protected Attributes | |
| static double | delta = 0.1 |
Definition at line 9 of file d4minoperator.h.
| d4minoperator::d4minoperator | ( | d4tess & | _tess | ) |
| bool const d4minoperator::approximatelyequal | ( | double const | a, | |
| double const | b | |||
| ) | [protected] |
Definition at line 60 of file d4minoperator.cpp.
References delta.
Referenced by d4mingreedy2::eval().
00064 { 00065 double a2(a); 00066 if (a2<0.0) 00067 a2*=-1.0; 00068 double b2(b); 00069 if (b2<0.0) 00070 b2*=-1.0; 00071 00072 double m(a); 00073 if (a<b) 00074 m=b; 00075 00076 // res will look at the relative magnitude of the numbers. 00077 // If a == b in approximate sense res will be small. 00078 double res = (a-b); 00079 if (res<0.0) 00080 res *= -1.0; 00081 00082 res /= m; 00083 00084 return res<delta; 00085 }
Reimplemented in d4minboundary, d4mingreedy, and d4mingreedy2.
Definition at line 20 of file d4minoperator.h.
Referenced by d4fan::eval().
Definition at line 41 of file d4minoperator.cpp.
Referenced by d4mingreedy2::eval().
00047 { 00048 bool res(false); 00049 if ( evalInvert(a,ai) ) 00050 res=true; 00051 if ( evalInvert(b,bi) ) 00052 res=true; 00053 00054 return res; 00055 }
| virtual d4minoperator::~d4minoperator | ( | ) | [inline, virtual] |
double d4minoperator::delta = 0.1 [static, protected] |
Definition at line 60 of file d4minoperator.h.
Definition at line 13 of file d4minoperator.h.
Referenced by d4mingreedy::eval(), d4mingreedy2::eval(), and d4minboundary::eval().
1.5.8