STK++ 0.9.13
|
facade design pattern. More...
#include <STK_MixtureFacade.h>
Public Member Functions | |
StrategyFacade (IMixtureComposer *&p_model) | |
constructor. | |
virtual | ~StrategyFacade () |
destructor. | |
void | setModel (IMixtureComposer *&p_model) |
set model in case we want to use the strategy again | |
void | createSimpleStrategy (Clust::initType init, int nbTrialInInit, Clust::algoType initAlgo, int nbInitIter, Real initEpsilon, int nbTry, Clust::algoType algo, int nbIter, Real epsilon) |
create a SimpleStrategy | |
void | createFullStrategy (Clust::initType init, int nbTryInInit, Clust::algoType initAlgo, int nbInitIter, Real initEpsilon, int nbTry, int nbInitRun, int nbShortRun, Clust::algoType shortAlgo, int nbShortIter, Real shortEpsilon, Clust::algoType longAlgo, int nblongIter, Real longEpsilon) |
create a FullStrategy | |
virtual bool | run () |
run the strategy | |
![]() | |
String const & | error () const |
get the last error message. | |
Protected Attributes | |
IMixtureComposer *& | p_model_ |
the mixture model to estimate | |
IMixtureStrategy * | p_strategy_ |
the strategy to use in order to estimate the mixture model | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
Additional Inherited Members | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
virtual void | update () |
update the runner. | |
facade design pattern.
StrategyFacade allows to create the strategy for estimating a mixture model with less effort
Definition at line 56 of file STK_MixtureFacade.h.
|
inline |
constructor.
p_model | a reference on the current model |
Definition at line 62 of file STK_MixtureFacade.h.
|
virtual |
void STK::StrategyFacade::createFullStrategy | ( | Clust::initType | init, |
int | nbTryInInit, | ||
Clust::algoType | initAlgo, | ||
int | nbInitIter, | ||
Real | initEpsilon, | ||
int | nbTry, | ||
int | nbInitRun, | ||
int | nbShortRun, | ||
Clust::algoType | shortAlgo, | ||
int | nbShortIter, | ||
Real | shortEpsilon, | ||
Clust::algoType | longAlgo, | ||
int | nblongIter, | ||
Real | longEpsilon | ||
) |
create a FullStrategy
Definition at line 58 of file STK_MixtureFacade.cpp.
References STK::Clust::createAlgo(), STK::Clust::createFullStrategy(), STK::Clust::createInit(), p_model_, and p_strategy_.
void STK::StrategyFacade::createSimpleStrategy | ( | Clust::initType | init, |
int | nbTrialInInit, | ||
Clust::algoType | initAlgo, | ||
int | nbInitIter, | ||
Real | initEpsilon, | ||
int | nbTry, | ||
Clust::algoType | algo, | ||
int | nbIter, | ||
Real | epsilon | ||
) |
create a SimpleStrategy
Definition at line 48 of file STK_MixtureFacade.cpp.
References STK::Clust::createAlgo(), STK::Clust::createInit(), STK::Clust::createSimpleStrategy(), p_model_, and p_strategy_.
|
virtual |
run the strategy
Implements STK::IRunnerBase.
Definition at line 70 of file STK_MixtureFacade.cpp.
References _T, STK::IRunnerBase::error(), STK::IMixtureComposer::finalizeStep(), STK::IStatModelBase::lnLikelihood(), STK::IRunnerBase::msg_error_, p_model_, p_strategy_, run(), STK::IRunnerBase::run(), stk_cout, and STKERROR_NO_ARG.
Referenced by run(), and STK::LearnFacade::run().
|
inline |
set model in case we want to use the strategy again
p_model | the model to set |
Definition at line 70 of file STK_MixtureFacade.h.
References p_model_.
|
protected |
the mixture model to estimate
Definition at line 85 of file STK_MixtureFacade.h.
Referenced by createFullStrategy(), createSimpleStrategy(), run(), and setModel().
|
protected |
the strategy to use in order to estimate the mixture model
Definition at line 87 of file STK_MixtureFacade.h.
Referenced by createFullStrategy(), createSimpleStrategy(), run(), and ~StrategyFacade().