WFMath  1.0.1
probability.h
00001 // probability.h (probability and statistics functions)
00002 //
00003 //  The WorldForge Project
00004 //  Copyright (C) 2002  The WorldForge Project
00005 //
00006 //  This program is free software; you can redistribute it and/or modify
00007 //  it under the terms of the GNU General Public License as published by
00008 //  the Free Software Foundation; either version 2 of the License, or
00009 //  (at your option) any later version.
00010 //
00011 //  This program is distributed in the hope that it will be useful,
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //  GNU General Public License for more details.
00015 //
00016 //  You should have received a copy of the GNU General Public License
00017 //  along with this program; if not, write to the Free Software
00018 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 //
00020 //  For information about WorldForge and its authors, please contact
00021 //  the Worldforge Web Site at http://www.worldforge.org.
00022 
00023 // Author: Ron Steinke
00024 // Created: 2002-1-23
00025 
00026 // These functions will use double instead of CoordType, for accuracy
00027 
00028 #ifndef WFMATH_PROBABILTIY_H
00029 #define WFMATH_PROBABILTIY_H
00030 
00031 namespace WFMath {
00032 
00034 
00040 template<typename FloatT>
00041 FloatT GaussianConditional(FloatT mean, FloatT stddev, FloatT val);
00043 template<typename FloatT>
00044 FloatT Gaussian(FloatT mean, FloatT stddev, FloatT val);
00045 
00047 
00051 template<typename FloatT>
00052 FloatT PoissonConditional(FloatT mean, unsigned int step);
00054 template<typename FloatT>
00055 FloatT Poisson(FloatT mean, unsigned int step);
00056 
00058 template<typename FloatT>
00059 FloatT LogFactorial(unsigned int n);
00061 template<typename FloatT>
00062 FloatT Factorial(unsigned int n);
00063 
00065 template<typename FloatT>
00066 FloatT LogGamma(FloatT z);
00068 template<typename FloatT>
00069 FloatT Gamma(FloatT z);
00070 
00071 } // namespace WFMath
00072 
00073 #endif  // WFMATH_PROBABILITY_H