GaussianDistribution.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: GaussianDistribution.hpp 1389 2008-09-04 17:06:43Z ckiesch $"
00002 
00008 #ifndef GAUSSIANDISTRIBUTION_HPP
00009 #define GAUSSIANDISTRIBUTION_HPP
00010 
00011 //============================================================================
00012 //
00013 //  This file is part of GPSTk, the GPS Toolkit.
00014 //
00015 //  The GPSTk is free software; you can redistribute it and/or modify
00016 //  it under the terms of the GNU Lesser General Public License as published
00017 //  by the Free Software Foundation; either version 2.1 of the License, or
00018 //  any later version.
00019 //
00020 //  The GPSTk is distributed in the hope that it will be useful,
00021 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 //  GNU Lesser General Public License for more details.
00024 //
00025 //  You should have received a copy of the GNU Lesser General Public
00026 //  License along with GPSTk; if not, write to the Free Software Foundation,
00027 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 //
00029 //  Dagoberto Salazar - gAGE ( http://www.gage.es ). 2008
00030 //
00031 //============================================================================
00032 
00033 
00034 #include "BaseDistribution.hpp"
00035 
00036 
00037 namespace gpstk
00038 {
00039 
00042 
00075    class GaussianDistribution : public BaseDistribution
00076    {
00077    public:
00078 
00079 
00083       GaussianDistribution();
00084 
00085 
00093       GaussianDistribution( double mu,
00094                             double sig );
00095 
00096 
00101       virtual double pdf(double x);
00102 
00103 
00108       virtual double cdf(double x);
00109 
00110 
00116       virtual double Q(double x)
00117       { return ( 1.0 - cdf(x) ); };
00118 
00119 
00126       virtual double invcdf(double p)
00127          throw(InvalidParameter);
00128 
00129 
00131       virtual double getMean(void) const
00132       { return mean; };
00133 
00134 
00139       virtual GaussianDistribution& setMean(double mu)
00140       { mean = mu; recompute(); return (*this); };
00141 
00142 
00144       virtual double getSigma(void) const
00145       { return sigma; };
00146 
00147 
00154       virtual GaussianDistribution& setSigma(double sig);
00155 
00156 
00164       virtual GaussianDistribution& setParameters( double mu,
00165                                                    double sig );
00166 
00167 
00168    private:
00169 
00170 
00172       double mean;
00173 
00174 
00176       double sigma;
00177 
00178 
00180       void recompute(void);
00181 
00182 
00183          // Internal parameters
00184       double a, b;
00185 
00186    };  // End of class "GaussianDistribution"
00187 
00189 
00190 }  // End of namespace gpstk
00191 #endif   // GAUSSIANDISTRIBUTION_HPP

Generated on Thu Feb 9 03:30:57 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1