#include "utils.h"
#include "mycomplex.h"
#include <iostream>
#include "def.h"
#include "linalg.h"
Functions | |
void | rungeKuttaStep (const DoubleVector &y, const DoubleVector &dydx, double x, double h, DoubleVector &yout, DoubleVector &yerr, DoubleVector(*derivs)(double, const DoubleVector &)) |
int | odeStepper (DoubleVector &y, const DoubleVector &dydx, double *x, double htry, double eps, DoubleVector &yscal, double *hdid, double *hnext, DoubleVector(*derivs)(double, const DoubleVector &)) |
organises the variable step-size for Runge-Kutta evolution | |
int | integrateOdes (DoubleVector &ystart, double x1, double x2, double eps, double h1, double hmin, DoubleVector(*derivs)(double, const DoubleVector &), int(*rkqs)(DoubleVector &y, const DoubleVector &dydx, double *x, double htry, double eps, DoubleVector &yscal, double *hdid, double *hnext, DoubleVector(*derivs)(double, const DoubleVector &))) |
Organises integration of 1st order system of ODEs. | |
double | calcDerivative (double(*func)(double), double x, double h, double *err) |
double | findMinimum (double ax, double bx, double cx, double(*f)(double), double tol, double *xmin) |
f is user-defined function, minimum value returned in xmin | |
void | shft2 (double &a, double &b, double &c) |
void | shft3 (double &a, double &b, double &c, double &d) |
a=b, b=c and c=d | |
double | integrandThreshbn (double x) |
For calculation of PV functions. | |
double | bIntegral (int n, double p, double m1, double m2, double mt) |
Returns real part of b function, less accurate than analytic expressions. | |
double | b0 (double p, double m1, double m2, double q) |
Passarino-Veltman function definition. | |
double | b1 (double p, double m1, double m2, double q) |
Passarino-Veltman function definition. | |
double | b22 (double p, double m1, double m2, double q) |
Passarino-Veltman function definition. | |
double | c0 (double m1, double m2, double m3) |
Passarino-Veltman function definition. | |
double | d27 (double m1, double m2, double m3, double m4) |
Passarino-Veltman function definition. | |
double | d0 (double m1, double m2, double m3, double m4) |
Passarino-Veltman function definition. | |
double | gasdev (long &idum) |
double | ran1 (long &idum) |
double | cauchyRan (long &idum) |
int | bin (double data, double start, double end, int numBins) |
double | logOfSum (double a, double b) |
Adds logs of two numbers in a more careful way that avoids underflow. |
Revision 1.6 2005/06/16 13:57:04 allanach Added a Cauchy-distributed random number generator
Revision 1.5 2005/05/13 16:07:27 allanach Edited precision due to double precision
Revision 1.4 2005/04/13 14:53:55 allanach Corrected binning procedure so it does what you expect
Revision 1.3 2005/04/12 10:44:20 allanach Added bin function to calculate the bin number of some data
Revision 1.2 2005/04/11 14:06:36 allanach Added random number routines
Revision 1.1.1.1 2004/11/19 16:18:31 allanach
Revision 1.7 2004/01/15 13:54:54 allanach New heaer style implemented
Revision 1.6 2003/08/14 09:25:49 allanach Used new standard convention for included files
Revision 1.5 2003/05/20 15:19:40 allanach doxygen comment style implemented
Revision 1.4 2002/10/30 16:22:48 allanach Fixed bug in f function
Revision 1.3 2002/10/01 11:52:16 allanach Bug-fixed bound-finding routines. MGUT always determined.
Revision 1.4 2001/08/08 09:52:33 allanach Added dilogarithm function - could be speeded up....
Revision 1.3 2001/07/18 14:42:51 allanach Added proper header info
|
Returns the number of a bin that the data is in: from 1 to numBins in the range (bins other than this range are also possible - you must deal with them outside the function...) |
|
func is user-supplied, h is an estimate of what step-size to start with and err returns error flags |
|
Cauchy distribution ie 1 / [ pi gamma (1 + x^2/gamma^2) ]. For a width, you must multiply the x coming out by the width. |
|
Gaussian deviated random number, mean 0 variance 1. Don't re-set idum once you've initially set it. Initialise with a NEGATIVE integer |
|
Normally distributed random number between 0 and 1. Don't re-set idum once you've initially set it. Initialise with a NEGATIVE integer |
|
A single step of Runge Kutta (5th order), input: y and dydx (derivative of y), x is independent variable. yout is value after step. derivs is a user-supplied function |
|
a=b and b=c |