00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef MathFunctions_H
00014 #define MathFunctions_H
00015
00016 #include <stdio.h>
00017 #include <stdlib.h>
00018 #include "IeeeMath.h"
00019 #include <math.h>
00020 #include "Array2D.h"
00021
00026 class MathFunctions
00027 {
00028 public:
00029
00033 static double legendre(int l, double x);
00034
00040 static double erf(double x);
00041
00047 static double erfc(double x);
00048
00049 static double F_gamma(double v, double t);
00050
00051 static double gamma_inc(double a, double x);
00052
00053 static double gamma_log(double x2);
00054
00055 static double gamma_series(double a, double x);
00056
00057 static double gamma_cf(double a, double x);
00058
00068 static double accel_G(double n, double x, double y,
00069 double a, double zeta);
00070 static void fitU(double Z, double Frk, double r, double delta,
00071 double & zeta, double & a, double & I);
00072
00077 static double rij(Array2D<double> &R, int i, int j);
00078
00084 static double rij(Array2D<double> &positioni,
00085 Array2D<double> &positionj,
00086 int i, int j);
00087
00101 static double fast_exp(double x);
00102
00103 static const double pi = 3.141592653589793;
00104 private:
00108 static double csevl(double x, double * coef, int lengthCoef);
00109
00110
00111
00112
00113 static double sign(double x, double y);
00114 };
00115
00116 #endif