HMMModel Class Reference

A serializable HMM model that also stores the type. More...

Public Member Functions

 HMMModel ()
 Construct an uninitialized model. More...

 
 HMMModel (const HMMType type)
 Construct a model of the given type. More...

 
 HMMModel (const HMMModel &other)
 Copy another model. More...

 
 HMMModel (HMMModel &&other)
 Take ownership of another model. More...

 
 ~HMMModel ()
 Clean memory. More...

 
HMM< distribution::DiscreteDistribution > * DiscreteHMM ()
 Accessor methods for discreteHMM, gaussianHMM and gmmHMM. More...

 
HMM< distribution::GaussianDistribution > * GaussianHMM ()
 
HMM< gmm::GMM > * GMMHMM ()
 
HMMModeloperator= (const HMMModel &other)
 Copy assignment operator. More...

 
template
<
typename
ActionType
,
typename
ExtraInfoType
>
void PerformAction (ExtraInfoType *x)
 Given a functor type, perform that functor with the optional extra info on the HMM. More...

 
template
<
typename
Archive
>
void serialize (Archive &ar, const unsigned int)
 Serialize the model. More...

 
HMMType Type ()
 

Detailed Description

A serializable HMM model that also stores the type.

Definition at line 31 of file hmm_model.hpp.

Constructor & Destructor Documentation

◆ HMMModel() [1/4]

HMMModel ( )
inline

Construct an uninitialized model.

Definition at line 45 of file hmm_model.hpp.

◆ HMMModel() [2/4]

HMMModel ( const HMMType  type)
inline

Construct a model of the given type.

Definition at line 55 of file hmm_model.hpp.

References mlpack::hmm::DiscreteHMM, mlpack::hmm::GaussianHMM, and mlpack::hmm::GaussianMixtureModelHMM.

◆ HMMModel() [3/4]

HMMModel ( const HMMModel other)
inline

Copy another model.

Definition at line 70 of file hmm_model.hpp.

References mlpack::hmm::DiscreteHMM, mlpack::hmm::GaussianHMM, and mlpack::hmm::GaussianMixtureModelHMM.

◆ HMMModel() [4/4]

HMMModel ( HMMModel &&  other)
inline

Take ownership of another model.

Definition at line 87 of file hmm_model.hpp.

References mlpack::hmm::DiscreteHMM.

◆ ~HMMModel()

~HMMModel ( )
inline

Clean memory.

Definition at line 127 of file hmm_model.hpp.

Member Function Documentation

◆ DiscreteHMM()

HMM<distribution::DiscreteDistribution>* DiscreteHMM ( )
inline

Accessor methods for discreteHMM, gaussianHMM and gmmHMM.

Note that an instatiation of this class will only contain one type of HMM (as indicated by the "type" instance variable) - the other two pointers will be NULL.

For instance, if the HMMModel object holds a discrete HMM, then: type –> DiscreteHMM gaussianHMM –> NULL gmmHMM –> NULL discreteHMM –> HMM<DiscreteDistribution> object and hence, calls to GMMHMM() and GaussianHMM() will return NULL. Only the call to DiscreteHMM() will return a non NULL pointer.

Hence, in practice, a user should be careful to first check the type of HMM (by calling the Type() accessor) and then perform subsequent actions, to avoid null pointer dereferences.

Definition at line 197 of file hmm_model.hpp.

◆ GaussianHMM()

HMM<distribution::GaussianDistribution>* GaussianHMM ( )
inline

Definition at line 198 of file hmm_model.hpp.

◆ GMMHMM()

HMM<gmm::GMM>* GMMHMM ( )
inline

Definition at line 199 of file hmm_model.hpp.

◆ operator=()

HMMModel& operator= ( const HMMModel other)
inline

Copy assignment operator.

Definition at line 100 of file hmm_model.hpp.

References mlpack::hmm::DiscreteHMM, mlpack::hmm::GaussianHMM, and mlpack::hmm::GaussianMixtureModelHMM.

◆ PerformAction()

void PerformAction ( ExtraInfoType *  x)
inline

Given a functor type, perform that functor with the optional extra info on the HMM.

Definition at line 140 of file hmm_model.hpp.

References mlpack::hmm::DiscreteHMM, mlpack::hmm::GaussianHMM, and mlpack::hmm::GaussianMixtureModelHMM.

◆ serialize()

void serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serialize the model.

Definition at line 152 of file hmm_model.hpp.

References mlpack::hmm::DiscreteHMM, mlpack::hmm::GaussianHMM, and mlpack::hmm::GaussianMixtureModelHMM.

◆ Type()

HMMType Type ( )
inline

Definition at line 177 of file hmm_model.hpp.


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