QPSolver now returns dual values after solving. This can be used as a guessed dual value for the nonlinear level
parent
cb7153a9d2
commit
e16efaab2c
|
@ -16,9 +16,9 @@
|
||||||
* @author Duy-Nguyen Ta
|
* @author Duy-Nguyen Ta
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gtsam/inference/Symbol.h>
|
|
||||||
#include <gtsam/base/Testable.h>
|
|
||||||
#include <CppUnitLite/TestHarness.h>
|
#include <CppUnitLite/TestHarness.h>
|
||||||
|
#include <gtsam/base/Testable.h>
|
||||||
|
#include <gtsam/inference/Symbol.h>
|
||||||
#include <gtsam/linear/QPSolver.h>
|
#include <gtsam/linear/QPSolver.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -150,7 +150,8 @@ TEST(QPSolver, iterate) {
|
||||||
bool converged = false;
|
bool converged = false;
|
||||||
int it = 0;
|
int it = 0;
|
||||||
while (!converged) {
|
while (!converged) {
|
||||||
converged = solver.iterateInPlace(workingGraph, currentSolution);
|
VectorValues lambdas;
|
||||||
|
converged = solver.iterateInPlace(workingGraph, currentSolution, lambdas);
|
||||||
CHECK(assert_equal(expectedSolutions[it], currentSolution, 1e-100));
|
CHECK(assert_equal(expectedSolutions[it], currentSolution, 1e-100));
|
||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue