normalDistribution.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_NORMALDISTRIBUTION_HPP
2 #define JULIAN_NORMALDISTRIBUTION_HPP
3 
5 namespace julian {
6 
40  public:
41  NormalDistribution(): m_(0.0), s_(1.0) {}
42  NormalDistribution(double m, double s);
46  double CDF(double);
47  double PDF(double);
48  double invCDF(double);
49 
50  double mean();
51  double variance();
52  void estimate(std::vector<double>);
54 
57  double getLocation();
58  double getScale();
59  double getShape();
60 
61 
62  void setLocation(double);
63  void setScale(double);
64  void setShape(double);
66 
67  NormalDistribution* clone() const;
68 
70  private:
71  double m_;
72  double s_;
73  };
74 }
75 #endif
double getLocation()
returns location parameter
Definition: normalDistribution.cpp:39
~NormalDistribution()
destructor
Definition: normalDistribution.cpp:113
double CDF(double)
calculates value of Probability Distribution Function
Definition: normalDistribution.cpp:82
Definition: cadHoliday.cpp:3
double PDF(double)
calculates value of Probability Distribution Function
Definition: normalDistribution.cpp:88
double getScale()
returns scale
Definition: normalDistribution.cpp:47
double variance()
returns variance of distribution
Definition: normalDistribution.cpp:32
File contains implementation of scale-location family of random distributions.
void setShape(double)
This method does nothing.
Definition: normalDistribution.cpp:77
double mean()
returns mean of distribution
Definition: normalDistribution.cpp:25
void setLocation(double)
sets mean (location parameter)
Definition: normalDistribution.cpp:62
NormalDistribution * clone() const
virtual copy constructor
Definition: normalDistribution.cpp:107
double invCDF(double)
calculates quantile
Definition: normalDistribution.cpp:94
Class implements an interface of location scale distribution.
Definition: scaleLocationDistribution.hpp:37
Class implements Normal Distribution.
Definition: normalDistribution.hpp:39
void setScale(double)
sets standard deviation
Definition: normalDistribution.cpp:69
void estimate(std::vector< double >)
estimates mean and standard deviation using Moment Matching Estimation
Definition: normalDistribution.cpp:100
double s_
Standard deviation (scale parameter)
Definition: normalDistribution.hpp:72
double m_
Mean (location parameter)
Definition: normalDistribution.hpp:71
double getShape()
returns shape
Definition: normalDistribution.cpp:55