#include <Chi2Distribution.hpp>
Inheritance diagram for Chi2Distribution:


A typical way to use this class follows:
// Declare a 'Chi2Distribution' object with 2 degrees of freedom Chi2Distribution chiObj; double x(5.7); cout << chiObj.pdf(x) << " | " << chiObj.cdf(x) << " | " << chiObj.Q(x) << endl; // Now, the same but with four degrees of freedom cout << chiObj.pdf(x, 4) << " | " << chiObj.cdf(x, 4) << " | " << chiObj.Q(x, 4) << endl;
Definition at line 69 of file Chi2Distribution.hpp.
Public Member Functions | |
| Chi2Distribution () | |
| Default constructor. Sets the number of degrees of freedom to 2. | |
| Chi2Distribution (int n) | |
| Explicit constructor. | |
| virtual double | pdf (double x) |
| Computes the probability density function. | |
| virtual double | pdf (double x, int n) |
| Computes the probability density function. | |
| virtual double | cdf (double x) |
| Computes the cumulative distribution function. | |
| virtual double | cdf (double x, int n) |
| Computes the cumulative distribution function. | |
| virtual double | Q (double x) |
| Computes the upper tail of the Chi-square probability function Q(x, ndf). | |
| virtual double | Q (double x, int n) |
| Computes the upper tail of the Chi-square probability function Q(x, n). | |
| virtual double | getNDF (void) const |
| Get number of degrees of freedom. | |
| virtual Chi2Distribution & | setNDF (int n) throw (InvalidParameter) |
| Set the number of degrees of freedom. | |
|
|
Default constructor. Sets the number of degrees of freedom to 2.
Definition at line 75 of file Chi2Distribution.hpp. |
|
|
Explicit constructor.
Definition at line 84 of file Chi2Distribution.hpp. |
|
||||||||||||
|
Computes the cumulative distribution function.
Definition at line 120 of file Chi2Distribution.hpp. |
|
|
Computes the cumulative distribution function.
Implements BaseDistribution. Definition at line 72 of file Chi2Distribution.cpp. References gpstk::gammaP(). |
|
|
Get number of degrees of freedom.
Definition at line 146 of file Chi2Distribution.hpp. |
|
||||||||||||
|
Computes the probability density function.
Definition at line 102 of file Chi2Distribution.hpp. |
|
|
Computes the probability density function.
Implements BaseDistribution. Definition at line 45 of file Chi2Distribution.cpp. References gpstk::exp(), gpstk::lngamma(), and gpstk::log(). |
|
||||||||||||
|
Computes the upper tail of the Chi-square probability function Q(x, n).
Definition at line 141 of file Chi2Distribution.hpp. |
|
|
Computes the upper tail of the Chi-square probability function Q(x, ndf).
Definition at line 129 of file Chi2Distribution.hpp. |
|
|
Set the number of degrees of freedom.
Definition at line 96 of file Chi2Distribution.cpp. References GPSTK_THROW. |
1.3.9.1