proj home

Files   Classes   Functions   Hierarchy  

d4minoperator Class Reference

#include <d4minoperator.h>

Inheritance diagram for d4minoperator:
Collaboration diagram for d4minoperator:

List of all members.

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

d4tesstess

Protected Member Functions

bool const approximatelyequal (double const a, double const b)

Static Protected Attributes

static double delta = 0.1


Detailed Description

Definition at line 9 of file d4minoperator.h.


Constructor & Destructor Documentation

d4minoperator::d4minoperator ( d4tess _tess  ) 

Definition at line 11 of file d4minoperator.cpp.

00012   : tess(_tess)
00013 {
00014 
00015 }


Member Function Documentation

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 }

virtual bool const d4minoperator::eval ( uintc  a,
uintc  b 
) [inline, virtual]

Reimplemented in d4minboundary, d4mingreedy, and d4mingreedy2.

Definition at line 20 of file d4minoperator.h.

Referenced by d4fan::eval().

00021     { return false; }

bool const d4minoperator::evalInvert ( uintc  a,
uintc  index 
)

bool const d4minoperator::twotetrahedronMInvert ( uintc  a,
uintc  ai,
uintc  b,
uintc  bi 
)

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]

Definition at line 16 of file d4minoperator.h.

00016 {}


Member Data Documentation

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().


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:49:54 2011 for Chelton Evans Source by  doxygen 1.5.8