LibCapy - distribution

Statistic distribution classes.

Macros:

Definition of an event for a distribution (to abstract from continuous and discrete) Vector to identify a continuous event CapyVec vals;

Pointer toward a user data structure to identify a discrete event void* ptr;

Id to identify a discrete event size_t id;

Definition of a CapyDist class (virtual parent class for all the distribution)

Type of the distribution CapyDistType type;

Get the probability of a given event.

Input argument(s):

evt: the event

Output and side effect(s):

Return the probability of the event double (*getProbability)(CapyDistEvt const* const evt);

Check if an event is within the most probable up to a given threshold

Input argument(s):

evt: the event to check
threshold: the threshold

Output and side effect(s):

Return true if the event is in the most probable events up to the threshold. bool (*isEvtInMostProbable)( CapyDistEvt const* const evt, double const threshold);

Definition of a CapyDistContinuous class (probability distribution for continuous random variables)

dimEvt: the number of dimension of an event range: the range of possible values for each dimension of an event

Enumerations:

Type of distributions

Typedefs:

Event for a distribution

CapyDist class

CapyDistContinuous class

Struct CapyDistNormal :

Struct CapyDistNormal's properties:

Mean and standard deviation (aka sigma) for each dimension The event variable is considered isotropic (dimensions are uncorrelated)

Struct CapyDistNormal's methods:

Destructor

Get the derivative of the probability of a given event along a given axis.

Input argument(s):

evt: the event
iAxis: the derivative axis

Output and side effect(s):

Return the derivative of the probability of the event

Struct CapyDistDiscreteOccurence :

Struct CapyDistDiscreteOccurence's properties:

Probability of the event

Event definition

Struct CapyDistDiscreteOccurence's methods:

None.

Struct CapyDistDiscrete :

Struct CapyDistDiscrete's properties:

Parent class

Occurences defining the distribution

Struct CapyDistDiscrete's methods:

Destructor

Functions:

Create a CapyDistEvt

Output and side effect(s):

Return a CapyDistEvt.

Create a CapyDist

Input argument(s):

type: type of ditribution

Output and side effect(s):

Return a CapyDist

Create a CapyDistContinuous

Input argument(s):

dimEvt: the dimension of the random variable describing an event

Output and side effect(s):

Return a CapyDistContinuous

Create a CapyDistNormal

Input argument(s):

dimEvent: the dimension of the random variable describing an event
mean: the means in each dimension of the random variable
stdDev: the standard deviations in each dimension of the random variable

Output and side effect(s):

Return a CapyDistNormal

Allocate memory for a new CapyDistNormal and create it

Input argument(s):

dimEvent: the dimension of the random variable describing an event
mean: the means in each dimension of the random variable
stdDev: the standard deviations in each dimension of the random variable

Output and side effect(s):

Return a CapyDistNormal

Free the memory used by a CapyDistNormal

Input argument(s):

that: the CapyDistNormal to free

Create a CapyDistDiscrete

Input argument(s):

nbEvt: the number of events in the distribution

Output and side effect(s):

Return a CapyDistDiscrete

Allocate memory for a CapyDistDiscrete and create a CapyDistDiscrete

Input argument(s):

nbEvt: the number of events in the distribution

Output and side effect(s):

Return a CapyDistDiscrete

Free the memory used by a CapyDistDiscrete

Input argument(s):

that: the CapyDistDiscrete to free

2022-03-19
in LibCapy,
46 views
Copyright 2021-2024 Baillehache Pascal