From ebbdfc79aa5dd0edc31d66c19a823b98448ad6e3 Mon Sep 17 00:00:00 2001 From: Kai Ni Date: Tue, 19 Jan 2010 04:18:59 +0000 Subject: [PATCH] comment out overflow exception --- cpp/NonlinearOptimizer-inl.h | 6 +++--- cpp/SubgraphPreconditioner-inl.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cpp/NonlinearOptimizer-inl.h b/cpp/NonlinearOptimizer-inl.h index bf4730731..cf82fb1cd 100644 --- a/cpp/NonlinearOptimizer-inl.h +++ b/cpp/NonlinearOptimizer-inl.h @@ -28,9 +28,9 @@ namespace gtsam { double absoluteDecrease = currentError - newError; if (verbosity >= 2) cout << "absoluteDecrease: " << absoluteDecrease << endl; - if (absoluteDecrease < 0) - throw overflow_error( - "NonlinearFactorGraph::optimize: error increased, diverges."); +// if (absoluteDecrease < 0) +// throw overflow_error( +// "NonlinearFactorGraph::optimize: error increased, diverges."); // calculate relative error decrease and update currentError double relativeDecrease = absoluteDecrease / currentError; diff --git a/cpp/SubgraphPreconditioner-inl.h b/cpp/SubgraphPreconditioner-inl.h index 9563330a6..43074b5b5 100644 --- a/cpp/SubgraphPreconditioner-inl.h +++ b/cpp/SubgraphPreconditioner-inl.h @@ -50,6 +50,7 @@ namespace gtsam { VectorConfig SubgraphPCG::linearizeAndOptimize(const Graph& g, const Config& theta_bar, const Ordering& ordering) const { + //TODO: 3 is hard coded here VectorConfig zeros; BOOST_FOREACH(const Symbol& j, ordering) zeros.insert(j,zero(3));