43 virtual bool isValid()
const {
return m_isValid; }
58 virtual double computeP(ScalarType x)
const = 0;
72 virtual double computeP(ScalarType x1, ScalarType x2)
const = 0;
88 unsigned numberOfClasses,
89 int* histo =
nullptr) = 0;
93 void setValid(
bool state) { m_isValid = state; }
A generic class to handle a probability distribution.
virtual double computeP(ScalarType x) const =0
Computes the probability of x.
virtual bool computeParameters(const ScalarContainer &values)=0
Computes the distribution parameters from a set of values.
virtual double computeP(ScalarType x1, ScalarType x2) const =0
Computes the cumulative probability between x1 and x2.
virtual double computeChi2Dist(const GenericCloud *Yk, unsigned numberOfClasses, int *histo=nullptr)=0
Computes the Chi2 distance (related to the Chi2 Test)
virtual ~GenericDistribution()=default
Default destructor.
virtual const char * getName() const =0
Returns distribution name.
virtual bool isValid() const
Indicates if the distribution parameters are valid.
void setValid(bool state)
Sets distribution current validity.
GenericDistribution()
Default constructor.
bool m_isValid
Whether the distribution is in a valid state or not.
std::vector< ScalarType > ScalarContainer
Scalar values container.
virtual double computePfromZero(ScalarType x) const =0
Computes the cumulative probability between 0 and x.
Generic file read and write utility for python interface.