Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
List of all members
npstat::InterpolatedDistribution1D Class Reference
Inheritance diagram for npstat::InterpolatedDistribution1D:
Detailed Description1-d continuous statistical distribution which interpolates between other distributions by performing linear interpolation of the quantile function. Note that the interpolated distributions must still exist while this object is in use (this class neither owns nor copies them). Constructor & Destructor Documentation◆ InterpolatedDistribution1D()
It is expected that the object will be constructed incrementally: first, the constructor will be called using the expected number of distributions to use and then function "add" will be used to put the distributions and weights in. Use the default constructor if the number of distributions is not known in advance (the class will still operate as expected but the performance will take a hit). Member Function Documentation◆ add()
Add a new distribution. Note that the distribution will not be copied internally. Make sure that all added distributions still exist when you call methods "density", etc. Implements npstat::AbsInterpolatedDistribution1D. ◆ cdf()
Cumulative distribution function Implements npstat::AbsDistribution1D. ◆ classId()
Prototype needed for I/O Implements npstat::AbsDistribution1D. ◆ clear()
Clear all distributions Implements npstat::AbsInterpolatedDistribution1D. ◆ clone()
"Virtual copy constructor" Implements npstat::AbsInterpolatedDistribution1D. ◆ density()
Probability density Implements npstat::AbsDistribution1D. ◆ densityAndCdf()
Return both density and cumulative distribution function. More efficient than obtaining these two results separately. ◆ exceedance()
1 - cdf, known as "survival function" or "exceedance". Implementations should avoid subtractive cancellation. Implements npstat::AbsDistribution1D. ◆ expectedSize()
The number of distributions expected to participate in the interpolation Implements npstat::AbsInterpolatedDistribution1D. ◆ isEqual()
Comparison for equality. To be implemented by derived classes. Implements npstat::AbsDistribution1D. ◆ normalizeAutomatically()
The following function should be called to disable (and later enable) automatic weight normalization if you want to use the "setWeight" or "replace" methods many times and, especially, if at some point in this process the sum of the weights becomes zero. The "density" method can not be called if normalization is not enabled. Implements npstat::AbsInterpolatedDistribution1D. ◆ quantile()
The quantile function (inverse cdf) Implements npstat::AbsDistribution1D. ◆ replace()
Replace an existing distribution Implements npstat::AbsInterpolatedDistribution1D. ◆ setWeight()
Modify the weight for an existing dostribution Implements npstat::AbsInterpolatedDistribution1D. ◆ size()
The number of distributions participating in the interpolation Implements npstat::AbsInterpolatedDistribution1D. The documentation for this class was generated from the following file: Generated by 1.9.1 |