[mlpack] 272/324: Implemented Save, Load

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:17 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit df9c85889333265e4f4953359c8d39a6160d8a17
Author: michaelfox99 <michaelfox99 at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Tue Aug 5 13:28:29 2014 +0000

    Implemented Save, Load
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16956 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/core/dists/discrete_distribution.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/mlpack/core/dists/discrete_distribution.cpp b/src/mlpack/core/dists/discrete_distribution.cpp
index 07f3ead..cbab3d5 100644
--- a/src/mlpack/core/dists/discrete_distribution.cpp
+++ b/src/mlpack/core/dists/discrete_distribution.cpp
@@ -104,6 +104,14 @@ void DiscreteDistribution::Estimate(const arma::mat& observations,
     probabilities.fill(1 / probabilities.n_elem); // Force normalization.
 }
 
+/** Save to SaveRestoreUtility
+ */
+void DiscreteDistribution::Save(util::SaveRestoreUtility& n) const
+{
+  n.SaveParameter(probabilities, "probabilities");
+  n.SaveParameter(Type(), "type");
+}
+
 /*
  * Returns a string representation of this object.
  */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list