erf.h

Go to the documentation of this file.
00001 //
00002 // some arbitrary maths bits
00003 // stu meikle Wed Mar  8 10:02:15 2000
00004 //
00005 
00006 #ifndef ERF_H
00007 #define ERF_H
00008 
00009 #include <cmath>
00010 
00011 namespace mimas {
00012   
00013   class mm_erf
00014     {
00015     private:
00016       double  *vals;
00017     public:
00018       mm_erf(void)
00019   {
00020     vals = NULL;
00021   }
00022   
00023       ~mm_erf(void)
00024   {
00025     if (vals)
00026       delete[] vals;
00027   }
00028   
00029       void  init(int l, double range, double acc)
00030   {
00031     vals = new double[l];
00032       
00033     double y;
00034 
00035     for (y=-range+acc/2.0;y<=range+acc;y+=acc)
00036       {
00037         vals[ (int)floor( y/acc ) + ( l / 2 ) ] = erf( y );
00038       }
00039 
00040   }
00041     
00042     };
00043 
00044 };
00045 
00046 #endif
00047 
00048 
00049 

[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:17 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...