[mlpack-git] master, mlpack-1.0.x: Explicitly use arma::sign(). (dbf8fdf)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:50:50 EST 2015
Repository : https://github.com/mlpack/mlpack
On branches: master,mlpack-1.0.x
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit dbf8fdf72cbbf0ff3583f56695f1ce03273ac6a9
Author: Ryan Curtin <ryan at ratml.org>
Date: Thu Jul 3 12:43:52 2014 +0000
Explicitly use arma::sign().
>---------------------------------------------------------------
dbf8fdf72cbbf0ff3583f56695f1ce03273ac6a9
src/mlpack/core/dists/laplace_distribution.hpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mlpack/core/dists/laplace_distribution.hpp b/src/mlpack/core/dists/laplace_distribution.hpp
index cee7dff..5757f8e 100644
--- a/src/mlpack/core/dists/laplace_distribution.hpp
+++ b/src/mlpack/core/dists/laplace_distribution.hpp
@@ -89,7 +89,8 @@ class LaplaceDistribution
result.randu();
// Convert from uniform distribution to Laplace distribution.
- return mean - scale * sign(result) % arma::log(1 - 2.0 * (result - 0.5));
+ return mean - scale * arma::sign(result) % arma::log(1 - 2.0 * (result -
+ 0.5));
}
/**
More information about the mlpack-git
mailing list