[mlpack] 34/58: Comment normalization for doxygen, and remove no-longer-relevant comment.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Tue Sep 9 13:19:41 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 85f9215cacda1abf219932a7769c5e21f9de2777
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Wed Aug 20 21:08:24 2014 +0000

    Comment normalization for doxygen, and remove no-longer-relevant comment.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17089 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/core/dists/gaussian_distribution.cpp | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/mlpack/core/dists/gaussian_distribution.cpp b/src/mlpack/core/dists/gaussian_distribution.cpp
index 595613e..35c2d12 100644
--- a/src/mlpack/core/dists/gaussian_distribution.cpp
+++ b/src/mlpack/core/dists/gaussian_distribution.cpp
@@ -24,10 +24,9 @@ using namespace mlpack::distribution;
 double GaussianDistribution::Probability(const arma::vec& observation) const
 {
   arma::vec diff = mean - observation;
-  
-  // Parentheses required for Armadillo 3.0.0 bug.
+
   arma::vec exponent = -0.5 * (trans(diff) * inv(covariance) * diff);
-  
+
   // TODO: What if det(cov) < 0?
   return pow(2 * M_PI, (double) observation.n_elem / -2.0) *
       pow(det(covariance), -0.5) * exp(exponent[0]);
@@ -177,15 +176,21 @@ std::string GaussianDistribution::ToString() const
 }
 
 
-/*
- * Save to or Load from SaveRestoreUtility
+/*&
+ * Save to SaveRestoreUtility.
  */
-void GaussianDistribution::Save(util::SaveRestoreUtility& sr) const {
+void GaussianDistribution::Save(util::SaveRestoreUtility& sr) const
+{
   sr.SaveParameter(Type(), "type");
   sr.SaveParameter(mean, "mean");
   sr.SaveParameter(covariance, "covariance");
 }
-void GaussianDistribution::Load(const util::SaveRestoreUtility& sr) {
+
+/**
+ * Load from SaveRestoreUtility.
+ */
+void GaussianDistribution::Load(const util::SaveRestoreUtility& sr)
+{
   sr.LoadParameter(mean, "mean");
   sr.LoadParameter(covariance, "covariance");
 }

-- 
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