Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Safety.hh

Go to the documentation of this file.
00001 #ifndef SAFETY_CLASS
00002 #define SAFETY_CLASS
00003 
00004 // ==== Safety.hh ====
00005 
00018 // 14-Nov-2001. Andras Aszodi
00019 
00020 // ==== MODULE HEADERS ====
00021 
00022 #include "Fparch.hh"
00023 
00024 // ==== CLASSES ====
00025 
00026 namespace RazorBack {
00027 
00028 class Safety_
00029 {
00030     // data
00031     private:
00032             
00033     static Fparch_<double> Fp;  
00034     static const double SMALL;  
00035     bool Usesafediv;            
00036     
00037     // methods
00038     public:
00039     
00044     explicit Safety_(bool Safediv=true): Usesafediv(Safediv) {}
00045             
00047     static double small() { return SMALL; }
00048     
00053     bool safe_div() const { return Usesafediv; }
00054     bool safe_div(bool S) { bool Olds=Usesafediv; Usesafediv=S; return Olds; }
00055     
00062     double safe_div(double Num, double Denom, int Lineno=0) const;
00063 
00070     double pythag(double a, double b) const;
00071 };
00072 // END OF CLASS Safety_
00073 
00074 } // RazorBack
00075 
00076 // ==== END OF HEADER Safety.hh ====
00077 
00078 #endif  // SAFETY_CLASS

Generated at Wed Aug 21 09:33:22 2002 for The Razorback C++ Library: Linear Algebra by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001