vtf-logo

SimplexModDet.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00008 #if !defined(__geom_SimplexModDet_h__)
00009 #define __geom_SimplexModDet_h__
00010 
00011 #if defined(DEBUG_geom) && !defined(DEBUG_SimplexModDet)
00012 #define DEBUG_SimplexModDet
00013 #endif
00014 
00015 #include "../../defs.h"
00016 
00017 #include <limits>
00018 
00019 #include <cmath>
00020 #include <cassert>
00021 
00022 BEGIN_NAMESPACE_GEOM
00023 
00025 
00069 template<typename T = double>
00070 class SimplexModDet {
00071 public:
00072 
00073   //
00074   // Public types.
00075   //
00076 
00078   typedef T Number;
00079 
00080 private:
00081 
00082   //
00083   // Static member data.
00084   //
00085 
00086   // A little bigger than the machine epsilon.
00087   static Number _epsilon;
00088 
00089   //
00090   // Not implemented.
00091   //
00092 
00093   // Default constructor.
00094   SimplexModDet();
00095 
00096   // Copy constructor.
00097   SimplexModDet(const SimplexModDet&);
00098 
00099   // Assignment operator.
00100   SimplexModDet& 
00101   operator=(const SimplexModDet&);
00102   
00103   // Destructor.
00104   ~SimplexModDet();
00105 
00106 public:
00107 
00108   //--------------------------------------------------------------------------
00111 
00113   static
00114   Number
00115   getEpsilon() {
00116     return _epsilon;
00117   }
00118 
00120   static
00121   Number
00122   getDelta(const Number minDeterminant) {
00123     if (minDeterminant < _epsilon) {
00124       const Number argument = _epsilon * (_epsilon - minDeterminant);
00125 #ifdef DEBUG_geom
00126       assert(argument >= 0);
00127 #endif
00128       return std::sqrt(argument);
00129     }
00130     return 0.0;
00131   }
00132 
00134 
00143   static
00144   Number
00145   getH(Number determinant, Number minDeterminant);
00146 
00148 };
00149 
00150 END_NAMESPACE_GEOM
00151 
00152 #define __geom_SimplexModDet_ipp__
00153 #include "SimplexModDet.ipp"
00154 #undef __geom_SimplexModDet_ipp__
00155 
00156 #endif

Generated on Fri Aug 24 12:55:58 2007 for Computational Geometry Package by  doxygen 1.4.7