WFMath  0.3.12
probability.h
1 // probability.h (probability and statistics functions)
2 //
3 // The WorldForge Project
4 // Copyright (C) 2002 The WorldForge Project
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 //
20 // For information about WorldForge and its authors, please contact
21 // the Worldforge Web Site at http://www.worldforge.org.
22 
23 // Author: Ron Steinke
24 // Created: 2002-1-23
25 
26 // These functions will use double instead of CoordType, for accuracy
27 
28 #ifndef WFMATH_PROBABILTIY_H
29 #define WFMATH_PROBABILTIY_H
30 
31 namespace WFMath {
32 
34 
40 double GaussianConditional(double mean, double stddev, double val);
42 double Gaussian(double mean, double stddev, double val);
43 
45 
49 double PoissonConditional(double mean, unsigned int step);
51 double Poisson(double mean, unsigned int step);
52 
54 double LogFactorial(unsigned int n);
56 double Factorial(unsigned int n);
57 
59 double LogGamma(double z);
61 double Gamma(double z);
62 
63 } // namespace WFMath
64 
65 #endif // WFMATH_PROBABILITY_H