[mlpack-git] master: Probably needless const-correctness. (16ee4c4)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Tue Jan 13 10:47:06 EST 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/d81511957f5fcc5e46cee49c6103e3ae7ac1d45d...9061d83c0b0068dec13ea80c6837b688b6321023

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

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

    Probably needless const-correctness.


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

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