[mlpack-git] master: Probably needless const-correctness. (3e719f7)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:12:15 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

>---------------------------------------------------------------

commit 3e719f766233dc0b3dcd34ff8bf0e5fae3096bbb
Author: Ryan Curtin <ryan at ratml.org>
Date:   Tue Jan 13 10:45:16 2015 -0500

    Probably needless const-correctness.


>---------------------------------------------------------------

3e719f766233dc0b3dcd34ff8bf0e5fae3096bbb
 src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp b/src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp
index f4ef2be..1d8b8fd 100644
--- a/src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp
+++ b/src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp
@@ -100,9 +100,8 @@ size_t MatrixCompletion::DefaultRank(const size_t m,
   //   multiplicity of optimal eigenvalues.
   //   Pablo Moscato, Michael Norman, and Gabor Pataki.
   //   Math Oper. Res., 23(2). 1998.
-
   const size_t mpn = m + n;
-  float r = 0.5 + sqrt(0.25 + 2 * p);
+  const float r = 0.5 + sqrt(0.25 + 2 * p);
   if (ceil(r) > mpn)
     r = mpn; // An upper bound on the dimension.
   return ceil(r);



More information about the mlpack-git mailing list