use QR by default

release/4.3a0
Frank Dellaert 2011-09-07 17:11:11 +00:00
parent 929be39e76
commit af15401b17
1 changed files with 9 additions and 8 deletions

View File

@ -9,15 +9,15 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
/* /**
* testKalmanFilter.cpp * @file KalmanFilter.cpp
* *
* Simple linear Kalman filter. * @brief Simple linear Kalman filter.
* Implemented using factor graphs, i.e., does LDL-based SRIF, really. * Implemented using factor graphs, i.e., does LDL-based SRIF, really.
* *
* Created on: Sep 3, 2011 * @date Sep 3, 2011
* @author Stephen Williams * @author Stephen Williams
* @author Frank Dellaert * @author Frank Dellaert
*/ */
#include <gtsam/linear/GaussianSequentialSolver.h> #include <gtsam/linear/GaussianSequentialSolver.h>
@ -26,11 +26,12 @@
namespace gtsam { namespace gtsam {
// Auxiliary function to solve factor graph and return pointer to root conditional /// Auxiliary function to solve factor graph and return pointer to root conditional
GaussianConditional* solve(GaussianFactorGraph& factorGraph) { GaussianConditional* solve(GaussianFactorGraph& factorGraph) {
// Solve the factor graph // Solve the factor graph
GaussianSequentialSolver solver(factorGraph); const bool useQr = true; // make sure we use QR (numerically stable)
GaussianSequentialSolver solver(factorGraph, useQR);
GaussianBayesNet::shared_ptr bayesNet = solver.eliminate(); GaussianBayesNet::shared_ptr bayesNet = solver.eliminate();
// As this is a filter, all we need is the posterior P(x_t), // As this is a filter, all we need is the posterior P(x_t),