[mlpack-git] master: Allow default construction, and fix syntax for Serialize(). (9986769)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Mon Jul 13 04:04:57 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/8b2ca720828224607c70d2b539c43aecf8f4ec32...b4659b668021db631b3c8a48e3d735b513706fdc
>---------------------------------------------------------------
commit 998676956137a90e064f31387606ef2dffe799e5
Author: Ryan Curtin <ryan at ratml.org>
Date: Sun Jul 12 13:33:33 2015 +0000
Allow default construction, and fix syntax for Serialize().
>---------------------------------------------------------------
998676956137a90e064f31387606ef2dffe799e5
src/mlpack/methods/hmm/hmm.hpp | 9 ++-------
src/mlpack/methods/hmm/hmm_impl.hpp | 2 +-
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/mlpack/methods/hmm/hmm.hpp b/src/mlpack/methods/hmm/hmm.hpp
index 81b1167..e7784f7 100644
--- a/src/mlpack/methods/hmm/hmm.hpp
+++ b/src/mlpack/methods/hmm/hmm.hpp
@@ -96,8 +96,8 @@ class HMM
* @param tolerance Tolerance for convergence of training algorithm
* (Baum-Welch).
*/
- HMM(const size_t states,
- const Distribution emissions,
+ HMM(const size_t states = 0,
+ const Distribution emissions = Distribution(),
const double tolerance = 1e-5);
/**
@@ -322,11 +322,6 @@ class HMM
std::string ToString() const;
/**
- * Returns a string indicating the type.
- */
- static std::string const Type() { return "HMM"; }
-
- /**
* Serialize the object.
*/
template<typename Archive>
diff --git a/src/mlpack/methods/hmm/hmm_impl.hpp b/src/mlpack/methods/hmm/hmm_impl.hpp
index 783460d..1c6c379 100644
--- a/src/mlpack/methods/hmm/hmm_impl.hpp
+++ b/src/mlpack/methods/hmm/hmm_impl.hpp
@@ -566,8 +566,8 @@ std::string HMM<Distribution>::ToString() const
}
//! Serialize the HMM.
-template<typename Archive>
template<typename Distribution>
+template<typename Archive>
void HMM<Distribution>::Serialize(Archive& ar, const unsigned int /* version */)
{
ar & data::CreateNVP(dimensionality, "dimensionality");
More information about the mlpack-git
mailing list