[mlpack-svn] r16377 - mlpack/trunk/src/mlpack/core/math

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Mar 25 08:47:57 EDT 2014


Author: rcurtin
Date: Tue Mar 25 08:47:57 2014
New Revision: 16377

Log:
Make parameter const because const-correctness is a good thing.


Modified:
   mlpack/trunk/src/mlpack/core/math/lin_alg.cpp
   mlpack/trunk/src/mlpack/core/math/lin_alg.hpp

Modified: mlpack/trunk/src/mlpack/core/math/lin_alg.cpp
==============================================================================
--- mlpack/trunk/src/mlpack/core/math/lin_alg.cpp	(original)
+++ mlpack/trunk/src/mlpack/core/math/lin_alg.cpp	Tue Mar 25 08:47:57 2014
@@ -16,7 +16,7 @@
  * 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++)
   {

Modified: mlpack/trunk/src/mlpack/core/math/lin_alg.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/core/math/lin_alg.hpp	(original)
+++ mlpack/trunk/src/mlpack/core/math/lin_alg.hpp	Tue Mar 25 08:47:57 2014
@@ -20,7 +20,7 @@
  * 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-svn mailing list