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

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Mon Feb 2 15:16:51 EST 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/bb6e5c56aab07e6449d86021246b52a9e323f3a0...bd6cb33f8d8270b02a84e81e38727679bb6c319a

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

commit 3e9c12f4974e278895c6e44ff44247ff03940d07
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


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

3e9c12f4974e278895c6e44ff44247ff03940d07
 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