[mlpack-git] master: iteration=1 to allow maxIterations=0 to work (6f0c814)

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


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

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

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

commit 6f0c814c9e031653fb3202718b5c22425e45c070
Author: Stephen Tu <tu.stephenl at gmail.com>
Date:   Wed Jan 28 18:34:31 2015 -0800

    iteration=1 to allow maxIterations=0 to work


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

6f0c814c9e031653fb3202718b5c22425e45c070
 src/mlpack/core/optimizers/sdp/primal_dual_impl.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/core/optimizers/sdp/primal_dual_impl.hpp b/src/mlpack/core/optimizers/sdp/primal_dual_impl.hpp
index 58c0a83..7e1cbb2 100644
--- a/src/mlpack/core/optimizers/sdp/primal_dual_impl.hpp
+++ b/src/mlpack/core/optimizers/sdp/primal_dual_impl.hpp
@@ -252,7 +252,7 @@ PrimalDualSolver<SDPType>::Optimize(arma::mat& X,
   M.set_size(sdp.NumConstraints(), sdp.NumConstraints());
 
   double primalObj = 0., alpha, beta;
-  for (size_t iteration = 0; iteration != maxIterations; iteration++)
+  for (size_t iteration = 1; iteration != maxIterations; iteration++)
   {
     if (sdp.NumSparseConstraints())
       rp(arma::span(0, sdp.NumSparseConstraints() - 1)) =



More information about the mlpack-git mailing list