Numworks Epsilon  1.4.1
Graphing Calculator Operating System
Probability::Law Class Referenceabstract

#include <law.h>

Inheritance diagram for Probability::Law:
Shared::CurveViewRange Probability::OneParameterLaw Probability::TwoParameterLaw Probability::ExponentialLaw Probability::PoissonLaw Probability::BinomialLaw Probability::NormalLaw Probability::UniformLaw

Public Types

enum  Type : uint8_t {
  Type::Binomial, Type::Uniform, Type::Exponential, Type::Normal,
  Type::Poisson
}
 
- Public Types inherited from Shared::CurveViewRange
enum  Axis { Axis::X, Axis::Y }
 

Public Member Functions

 Law ()
 
virtual ~Law ()=default
 
virtual I18n::Message title ()=0
 
virtual Type type () const =0
 
virtual bool isContinuous () const =0
 
float xGridUnit () override
 
virtual int numberOfParameter ()=0
 
virtual float parameterValueAtIndex (int index)=0
 
virtual I18n::Message parameterNameAtIndex (int index)=0
 
virtual I18n::Message parameterDefinitionAtIndex (int index)=0
 
virtual void setParameterAtIndex (float f, int index)=0
 
virtual float evaluateAtAbscissa (float x) const =0
 
virtual bool authorizedValueAtIndex (float x, int index) const =0
 
virtual double cumulativeDistributiveFunctionAtAbscissa (double x) const
 
double rightIntegralFromAbscissa (double x) const
 
double finiteIntegralBetweenAbscissas (double a, double b) const
 
virtual double cumulativeDistributiveInverseForProbability (double *probability)
 
virtual double rightIntegralInverseForProbability (double *probability)
 
virtual double evaluateAtDiscreteAbscissa (int k) const
 
- Public Member Functions inherited from Shared::CurveViewRange
virtual uint32_t rangeChecksum ()
 
virtual float xMin ()=0
 
virtual float xMax ()=0
 
virtual float yMin ()=0
 
virtual float yMax ()=0
 
virtual float yGridUnit ()
 
float computeGridUnit (Axis axis, float min, float max)
 

Static Public Attributes

static constexpr int k_maxNumberOfOperations = 1000000
 
- Static Public Attributes inherited from Shared::CurveViewRange
static constexpr float k_maxNumberOfXGridUnits = 18.0f
 
static constexpr float k_maxNumberOfYGridUnits = 13.0f
 

Static Protected Attributes

static constexpr double k_maxProbability = 0.9999995
 
static constexpr float k_displayTopMarginRatio = 0.05f
 
static constexpr float k_displayBottomMarginRatio = 0.2f
 
static constexpr float k_displayLeftMarginRatio = 0.05f
 
static constexpr float k_displayRightMarginRatio = 0.05f
 

Detailed Description

Definition at line 12 of file law.h.

Member Enumeration Documentation

◆ Type

Enumerator
Binomial 
Uniform 
Exponential 
Normal 
Poisson 

Definition at line 15 of file law.h.

Constructor & Destructor Documentation

◆ Law()

Probability::Law::Law ( )

Definition at line 7 of file law.cpp.

◆ ~Law()

virtual Probability::Law::~Law ( )
virtualdefault

Member Function Documentation

◆ authorizedValueAtIndex()

virtual bool Probability::Law::authorizedValueAtIndex ( float  x,
int  index 
) const
pure virtual

◆ cumulativeDistributiveFunctionAtAbscissa()

double Probability::Law::cumulativeDistributiveFunctionAtAbscissa ( double  x) const
virtual

Reimplemented in Probability::NormalLaw, Probability::UniformLaw, and Probability::ExponentialLaw.

Definition at line 16 of file law.cpp.

◆ cumulativeDistributiveInverseForProbability()

double Probability::Law::cumulativeDistributiveInverseForProbability ( double *  probability)
virtual

◆ evaluateAtAbscissa()

virtual float Probability::Law::evaluateAtAbscissa ( float  x) const
pure virtual

◆ evaluateAtDiscreteAbscissa()

double Probability::Law::evaluateAtDiscreteAbscissa ( int  k) const
virtual

Reimplemented in Probability::BinomialLaw.

Definition at line 134 of file law.cpp.

◆ finiteIntegralBetweenAbscissas()

double Probability::Law::finiteIntegralBetweenAbscissas ( double  a,
double  b 
) const

Definition at line 44 of file law.cpp.

◆ isContinuous()

virtual bool Probability::Law::isContinuous ( ) const
pure virtual

◆ numberOfParameter()

virtual int Probability::Law::numberOfParameter ( )
pure virtual

◆ parameterDefinitionAtIndex()

virtual I18n::Message Probability::Law::parameterDefinitionAtIndex ( int  index)
pure virtual

◆ parameterNameAtIndex()

virtual I18n::Message Probability::Law::parameterNameAtIndex ( int  index)
pure virtual

◆ parameterValueAtIndex()

virtual float Probability::Law::parameterValueAtIndex ( int  index)
pure virtual

◆ rightIntegralFromAbscissa()

double Probability::Law::rightIntegralFromAbscissa ( double  x) const

Definition at line 37 of file law.cpp.

◆ rightIntegralInverseForProbability()

double Probability::Law::rightIntegralInverseForProbability ( double *  probability)
virtual

Reimplemented in Probability::BinomialLaw.

Definition at line 101 of file law.cpp.

◆ setParameterAtIndex()

virtual void Probability::Law::setParameterAtIndex ( float  f,
int  index 
)
pure virtual

◆ title()

virtual I18n::Message Probability::Law::title ( )
pure virtual

◆ type()

virtual Type Probability::Law::type ( ) const
pure virtual

◆ xGridUnit()

float Probability::Law::xGridUnit ( )
overridevirtual

Implements Shared::CurveViewRange.

Definition at line 12 of file law.cpp.

Member Data Documentation

◆ k_displayBottomMarginRatio

constexpr float Probability::Law::k_displayBottomMarginRatio = 0.2f
staticprotected

Definition at line 45 of file law.h.

◆ k_displayLeftMarginRatio

constexpr float Probability::Law::k_displayLeftMarginRatio = 0.05f
staticprotected

Definition at line 46 of file law.h.

◆ k_displayRightMarginRatio

constexpr float Probability::Law::k_displayRightMarginRatio = 0.05f
staticprotected

Definition at line 47 of file law.h.

◆ k_displayTopMarginRatio

constexpr float Probability::Law::k_displayTopMarginRatio = 0.05f
staticprotected

Definition at line 44 of file law.h.

◆ k_maxNumberOfOperations

constexpr int Probability::Law::k_maxNumberOfOperations = 1000000
static

Definition at line 40 of file law.h.

◆ k_maxProbability

constexpr double Probability::Law::k_maxProbability = 0.9999995
staticprotected

Definition at line 43 of file law.h.


The documentation for this class was generated from the following files: