STK++ 0.9.13
STK::IMixtureAlgo Class Reference

Interface base class for the algorithms. More...

#include <STK_IMixtureAlgo.h>

Inheritance diagram for STK::IMixtureAlgo:
Inheritance graph

Public Member Functions

virtual ~IMixtureAlgo ()
 destructor
 
int nbIterMax () const
 
int epsilon () const
 
Real threshold () const
 
void setModel (IMixtureComposer *p_model)
 set model
 
void setNbIterMax (int nbIterMax)
 set maximal number of iterations
 
void setEpsilon (Real epsilon)
 set tolerance value
 
void setThreshold (Real threshold)
 set threshold value
 
- Public Member Functions inherited from STK::IRunnerBase
String consterror () const
 get the last error message.
 
virtual bool run ()=0
 run the computations.
 

Protected Member Functions

 IMixtureAlgo ()
 default constructor
 
 IMixtureAlgo (IMixtureAlgo const &algo)
 Copy constructor.
 
- Protected Member Functions inherited from STK::IRunnerBase
 IRunnerBase ()
 default constructor
 
 IRunnerBase (IRunnerBase const &runner)
 copy constructor
 
virtual ~IRunnerBase ()
 destructor
 
virtual void update ()
 update the runner.
 

Protected Attributes

IMixtureComposerp_model_
 pointer on the mixture model
 
int nbIterMax_
 number of iterations of the algorithm
 
Real epsilon_
 tolerance of the algorithm.
 
Real threshold_
 Minimal number of individuals.
 
- Protected Attributes inherited from STK::IRunnerBase
String msg_error_
 String with the last error message.
 
bool hasRun_
 true if run has been used, false otherwise
 

Detailed Description

Interface base class for the algorithms.

All algorithms are runners applying on a model instance given by pointer and have to implement the run method.

All algorithms start with an paramUpdateStep(), so user have to provide an instance of the model with initial parameters values.

Definition at line 54 of file STK_IMixtureAlgo.h.

Constructor & Destructor Documentation

◆ IMixtureAlgo() [1/2]

STK::IMixtureAlgo::IMixtureAlgo ( )
protected

default constructor

Definition at line 44 of file STK_IMixtureAlgo.cpp.

44: IRunnerBase(), p_model_(0), nbIterMax_(0), epsilon_(0.), threshold_(2.) {}
int nbIterMax_
number of iterations of the algorithm
IMixtureComposer * p_model_
pointer on the mixture model
Real epsilon_
tolerance of the algorithm.
Real threshold_
Minimal number of individuals.
IRunnerBase()
default constructor
Definition STK_IRunner.h:68

◆ IMixtureAlgo() [2/2]

STK::IMixtureAlgo::IMixtureAlgo ( IMixtureAlgo const algo)
protected

Copy constructor.

Parameters
algoalgorithm to copy

Definition at line 47 of file STK_IMixtureAlgo.cpp.

47 : IRunnerBase(algo)
48 , p_model_(algo.p_model_)
49 , nbIterMax_(algo.nbIterMax_)
50 , epsilon_(algo.epsilon_)
51 , threshold_(algo.threshold_)
52{}

◆ ~IMixtureAlgo()

STK::IMixtureAlgo::~IMixtureAlgo ( )
virtual

destructor

Definition at line 55 of file STK_IMixtureAlgo.cpp.

55{}

Member Function Documentation

◆ epsilon()

int STK::IMixtureAlgo::epsilon ( ) const
inline
Returns
the epsilon of the algorithm

Definition at line 71 of file STK_IMixtureAlgo.h.

71{ return epsilon_;}

References epsilon_.

Referenced by setEpsilon().

◆ nbIterMax()

int STK::IMixtureAlgo::nbIterMax ( ) const
inline
Returns
the maximal number of iteration of the algorithm

Definition at line 69 of file STK_IMixtureAlgo.h.

69{ return nbIterMax_;}

References nbIterMax_.

Referenced by setNbIterMax().

◆ setEpsilon()

void STK::IMixtureAlgo::setEpsilon ( Real  epsilon)
inline

set tolerance value

Definition at line 81 of file STK_IMixtureAlgo.h.

81{ epsilon_ = epsilon;}

References epsilon(), and epsilon_.

◆ setModel()

void STK::IMixtureAlgo::setModel ( IMixtureComposer p_model)

◆ setNbIterMax()

void STK::IMixtureAlgo::setNbIterMax ( int  nbIterMax)
inline

set maximal number of iterations

Definition at line 79 of file STK_IMixtureAlgo.h.

References nbIterMax(), and nbIterMax_.

◆ setThreshold()

void STK::IMixtureAlgo::setThreshold ( Real  threshold)
inline

set threshold value

Definition at line 83 of file STK_IMixtureAlgo.h.

References threshold(), and threshold_.

◆ threshold()

Real STK::IMixtureAlgo::threshold ( ) const
inline
Returns
the threshold of the algorithm

Definition at line 73 of file STK_IMixtureAlgo.h.

73{ return threshold_;}

References threshold_.

Referenced by setThreshold().

Member Data Documentation

◆ epsilon_

Real STK::IMixtureAlgo::epsilon_
protected

tolerance of the algorithm.

Definition at line 91 of file STK_IMixtureAlgo.h.

Referenced by epsilon(), STK::EMAlgo::run(), STK::CEMAlgo::run(), and setEpsilon().

◆ nbIterMax_

int STK::IMixtureAlgo::nbIterMax_
protected

number of iterations of the algorithm

Definition at line 89 of file STK_IMixtureAlgo.h.

Referenced by nbIterMax(), STK::EMAlgo::run(), STK::CEMAlgo::run(), STK::SEMAlgo::run(), STK::SemiSEMAlgo::run(), and setNbIterMax().

◆ p_model_

IMixtureComposer* STK::IMixtureAlgo::p_model_
protected

pointer on the mixture model

Definition at line 87 of file STK_IMixtureAlgo.h.

Referenced by STK::EMAlgo::run(), STK::CEMAlgo::run(), STK::SEMAlgo::run(), STK::SemiSEMAlgo::run(), and setModel().

◆ threshold_

Real STK::IMixtureAlgo::threshold_
protected

Minimal number of individuals.

If the expected number of individuals is under this number, the algorithm will stop and return false.

Definition at line 95 of file STK_IMixtureAlgo.h.

Referenced by STK::EMAlgo::run(), STK::CEMAlgo::run(), STK::SEMAlgo::run(), STK::SemiSEMAlgo::run(), setModel(), setThreshold(), and threshold().


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