|
mlpack
|
A serializable HMM model that also stores the type. More...
#include <hmm_model.hpp>
Public Member Functions | |
| HMMModel (const HMMType type=HMMType::DiscreteHMM) | |
| Construct a model of the given type. | |
| HMMModel (const HMMModel &other) | |
| Copy another model. | |
| HMMModel (HMMModel &&other) | |
| Take ownership of another model. | |
| HMMModel & | operator= (const HMMModel &other) |
| Copy assignment operator. | |
| HMMModel & | operator= (HMMModel &&other) |
| Move assignment operator. | |
| ~HMMModel () | |
| Clean memory. | |
| template<typename ActionType , typename ExtraInfoType > | |
| void | PerformAction (ExtraInfoType *x) |
| Given a functor type, perform that functor with the optional extra info on the HMM. | |
| template<typename Archive > | |
| void | serialize (Archive &ar, const uint32_t) |
| Serialize the model. | |
| HMMType | Type () |
| HMM< distribution::DiscreteDistribution > * | DiscreteHMM () |
| Accessor methods for discreteHMM, gaussianHMM, gmmHMM, and diagGMMHMM. More... | |
| HMM< distribution::GaussianDistribution > * | GaussianHMM () |
| HMM< gmm::GMM > * | GMMHMM () |
| HMM< gmm::DiagonalGMM > * | DiagGMMHMM () |
|
inline |
Accessor methods for discreteHMM, gaussianHMM, gmmHMM, and diagGMMHMM.
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 diagGMMHMM –> NULL discreteHMM –> HMM<DiscreteDistribution> object and hence, calls to GMMHMM(), DiagGMMHMM() 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.
1.8.13