STK++ 0.9.13
STK::MultiLaw::JointBernoulli< RowVector > Class Template Reference

Implement the Joint Bernoulli probability law. More...

#include <STK_MultiLaw_JointBernoulli.h>

Inheritance diagram for STK::MultiLaw::JointBernoulli< RowVector >:
Inheritance graph

Public Types

typedef JointProbability< RowVector, Law::BernoulliBase
 
- Public Types inherited from STK::MultiLaw::JointProbability< RowVector, Law::Bernoulli >
typedef RowVector::Type Type
 
typedef IMultiLaw< RowVector > Base
 

Public Member Functions

 JointBernoulli ()
 default constructor
 
 JointBernoulli (int const &nbVar)
 constructor
 
virtual ~JointBernoulli ()
 destructor
 
Real constprob (int const &j) const
 
void setProb (int const &j, Real const &prob)
 
- Public Member Functions inherited from STK::MultiLaw::JointProbability< RowVector, Law::Bernoulli >
 JointProbability (String const &name)
 Constructor.
 
 JointProbability (String const &name, int nbVar)
 Constructor.
 
virtual ~JointProbability ()
 destructor
 
Array1D< Law > constJointLaw () const
 
Law constlaw (int const &j) const
 
Law & law (int const &j)
 
Law constatLaw (int const &j) const
 
Law & atLaw (int const &j)
 
void resize (int const &nbVar)
 resize the joint probability
 
virtual Real pdf (RowVector const &x) const
 compute the probability distribution function (density) of the multivariate law.
 
virtual Real lpdf (RowVector const &x) const
 compute the log probability distribution function Give the value of the log-pdf at the point x.
 
virtual void rand (RowVector &x) const
 simulate a realization of the joint law and store the result in x.
 
- Public Member Functions inherited from STK::MultiLaw::IMultiLaw< RowVector >
virtual ~IMultiLaw ()
 destructor.
 
- Public Member Functions inherited from STK::Law::ILawBase
String constname () const
 

Additional Inherited Members

- Protected Member Functions inherited from STK::MultiLaw::IMultiLaw< RowVector >
 IMultiLaw (String const &name)
 Constructor.
 
- Protected Member Functions inherited from STK::Law::ILawBase
 ILawBase (String const &name)
 Constructor.
 
 ~ILawBase ()
 destructor.
 
- Protected Attributes inherited from STK::MultiLaw::JointProbability< RowVector, Law::Bernoulli >
Array1D< Law > jointLaw_
 Array with the marginal laws.
 
- Protected Attributes inherited from STK::Law::ILawBase
String name_
 Name of the Law.
 

Detailed Description

template<class RowVector>
class STK::MultiLaw::JointBernoulli< RowVector >

Implement the Joint Bernoulli probability law.

Definition at line 50 of file STK_MultiLaw_JointBernoulli.h.

Member Typedef Documentation

◆ Base

template<class RowVector >
typedef JointProbability<RowVector, Law::Bernoulli> STK::MultiLaw::JointBernoulli< RowVector >::Base

Definition at line 53 of file STK_MultiLaw_JointBernoulli.h.

Constructor & Destructor Documentation

◆ JointBernoulli() [1/2]

template<class RowVector >
STK::MultiLaw::JointBernoulli< RowVector >::JointBernoulli ( )
inline

default constructor

Definition at line 55 of file STK_MultiLaw_JointBernoulli.h.

55: Base(_T("JointBernoulli")) {}
#define _T(x)
Let x unmodified.
JointProbability< RowVector, Law::Bernoulli > Base

◆ JointBernoulli() [2/2]

template<class RowVector >
STK::MultiLaw::JointBernoulli< RowVector >::JointBernoulli ( int const nbVar)
inline

constructor

Definition at line 57 of file STK_MultiLaw_JointBernoulli.h.

58 : Base(_T("JointBernoulli"), nbVar) {}

◆ ~JointBernoulli()

template<class RowVector >
virtual STK::MultiLaw::JointBernoulli< RowVector >::~JointBernoulli ( )
inlinevirtual

destructor

Definition at line 60 of file STK_MultiLaw_JointBernoulli.h.

60{}

Member Function Documentation

◆ prob()

template<class RowVector >
Real const & STK::MultiLaw::JointBernoulli< RowVector >::prob ( int const j) const
inline
Returns
the probability of success of the jth law

Definition at line 62 of file STK_MultiLaw_JointBernoulli.h.

63 { return this->law(j).prob();}

References STK::MultiLaw::JointProbability< RowVector, Law::Bernoulli >::law().

Referenced by STK::MultiLaw::JointBernoulli< RowVector >::setProb().

◆ setProb()

template<class RowVector >
void STK::MultiLaw::JointBernoulli< RowVector >::setProb ( int const j,
Real const prob 
)
inline
Returns
the probability of success of the jth law

Definition at line 65 of file STK_MultiLaw_JointBernoulli.h.

66 { this->law(j).setProb(prob);}
Real const & prob(int const &j) const

References STK::MultiLaw::JointProbability< RowVector, Law::Bernoulli >::law(), and STK::MultiLaw::JointBernoulli< RowVector >::prob().


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