[mlpack-git] master, mlpack-1.0.x: Make parameter const because const-correctness is a good thing. (23fc3ac)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:45:31 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 23fc3acb6b219b958ca3c0ab1308c125d132ae1e
Author: Ryan Curtin <ryan at ratml.org>
Date: Tue Mar 25 12:47:57 2014 +0000
Make parameter const because const-correctness is a good thing.
>---------------------------------------------------------------
23fc3acb6b219b958ca3c0ab1308c125d132ae1e
src/mlpack/core/math/lin_alg.cpp | 2 +-
src/mlpack/core/math/lin_alg.hpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/core/math/lin_alg.cpp b/src/mlpack/core/math/lin_alg.cpp
index a7de356..ad7809c 100644
--- a/src/mlpack/core/math/lin_alg.cpp
+++ b/src/mlpack/core/math/lin_alg.cpp
@@ -16,7 +16,7 @@ using namespace math;
* is ignored in the power operation and then re-added. Useful for
* eigenvalues.
*/
-void mlpack::math::VectorPower(arma::vec& vec, double power)
+void mlpack::math::VectorPower(arma::vec& vec, const double power)
{
for (size_t i = 0; i < vec.n_elem; i++)
{
diff --git a/src/mlpack/core/math/lin_alg.hpp b/src/mlpack/core/math/lin_alg.hpp
index 91650db..9632ae9 100644
--- a/src/mlpack/core/math/lin_alg.hpp
+++ b/src/mlpack/core/math/lin_alg.hpp
@@ -20,7 +20,7 @@ namespace math {
* is ignored in the power operation and then re-added. Useful for
* eigenvalues.
*/
-void VectorPower(arma::vec& vec, double power);
+void VectorPower(arma::vec& vec, const double power);
/**
* Creates a centered matrix, where centering is done by subtracting
More information about the mlpack-git
mailing list