[mlpack-svn] r11688 - mlpack/trunk/src/mlpack/core/optimizers/lrsdp
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Thu Mar 1 21:28:10 EST 2012
Author: rcurtin
Date: 2012-03-01 21:28:09 -0500 (Thu, 01 Mar 2012)
New Revision: 11688
Modified:
mlpack/trunk/src/mlpack/core/optimizers/lrsdp/lrsdp_impl.hpp
Log:
Some changes that had been forgotten.
Modified: mlpack/trunk/src/mlpack/core/optimizers/lrsdp/lrsdp_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/optimizers/lrsdp/lrsdp_impl.hpp 2012-03-02 01:52:40 UTC (rev 11687)
+++ mlpack/trunk/src/mlpack/core/optimizers/lrsdp/lrsdp_impl.hpp 2012-03-02 02:28:09 UTC (rev 11688)
@@ -63,8 +63,8 @@
else
{
double value = -b[index];
- for (size_t i = 0; i < a[index].n_rows; ++i)
- value += rrt(a[index](i, 0), a[index](i, 1));
+ for (size_t i = 0; i < a[index].n_cols; ++i)
+ value += a[index](2, i) * rrt(a[index](0, i), a[index](1, i));
return value;
}
@@ -109,10 +109,10 @@
}
else
{
- for (size_t j = 0; j < function.A()[i].n_rows; ++j)
+ for (size_t j = 0; j < function.A()[i].n_cols; ++j)
{
- constraint += function.A()[i](j, 2) *
- rrt(function.A()[i](j, 0), function.A()[i](j, 1));
+ constraint += function.A()[i](2, j) *
+ rrt(function.A()[i](0, j), function.A()[i](1, j));
}
}
@@ -145,10 +145,10 @@
}
else
{
- for (size_t j = 0; j < function.A()[i].n_rows; ++j)
+ for (size_t j = 0; j < function.A()[i].n_cols; ++j)
{
- constraint += function.A()[i](j, 2) *
- rrt(function.A()[i](j, 0), function.A()[i](j, 1));
+ constraint += function.A()[i](2, j) *
+ rrt(function.A()[i](0, j), function.A()[i](1, j));
}
}
@@ -161,9 +161,9 @@
else
{
// We only need to subtract the entries which could be modified.
- for (size_t j = 0; j < function.A()[i].n_rows; ++j)
+ for (size_t j = 0; j < function.A()[i].n_cols; ++j)
{
- s(function.A()[i](j, 0), function.A()[i](j, 1)) -= y;
+ s(function.A()[i](0, j), function.A()[i](1, j)) -= y;
}
}
}
More information about the mlpack-svn
mailing list