Otherbstyle fixes.

This commit is contained in:
Ryan Curtin
2019-12-05 11:05:56 -05:00
parent 20b33d1b71
commit 8da98845fb
2 changed files with 20 additions and 16 deletions
+8 -5
View File
@@ -356,15 +356,18 @@ class HMM
double& Tolerance() { return tolerance; }
/**
* Serialize the object.
* Load the object.
*/
template<typename Archive>
void load(Archive& ar, const unsigned int version);
/**
* Save the object.
*/
template<typename Archive>
void save(Archive& ar, const unsigned int version) const;
BOOST_SERIALIZATION_SPLIT_MEMBER()
BOOST_SERIALIZATION_SPLIT_MEMBER();
protected:
@@ -402,8 +405,8 @@ class HMM
std::vector<Distribution> emission;
/**
*a proxy vriable in linear space for logTransition.
*Should be removed in mlpack 4.0.
* A proxy variable in linear space for logTransition.
* Should be removed in mlpack 4.0.
*/
arma::mat transitionProxy;
@@ -419,7 +422,7 @@ class HMM
void ConvertToLogSpace() const;
/**
* a proxy vriable in linear space for logInitial.
* A proxy vriable in linear space for logInitial.
* Should be removed in mlpack 4.0.
*/
arma::vec initialProxy;
+12 -11
View File
@@ -663,18 +663,19 @@ void HMM<Distribution>::Backward(const arma::mat& dataSeq,
* Make sure the variables in log space are in sync with the linear counter parts
*/
template<typename Distribution>
void HMM<Distribution>::ConvertToLogSpace() const {
if (recalculateInitial)
{
logInitial = log(initialProxy);
recalculateInitial = false;
}
void HMM<Distribution>::ConvertToLogSpace() const
{
if (recalculateInitial)
{
logInitial = log(initialProxy);
recalculateInitial = false;
}
if (recalculateTransition)
{
logTransition = log(transitionProxy);
recalculateTransition = false;
}
if (recalculateTransition)
{
logTransition = log(transitionProxy);
recalculateTransition = false;
}
}
//! Serialize the HMM.