comment out overflow exception

release/4.3a0
Kai Ni 2010-01-19 04:18:59 +00:00
parent ef2fb243c2
commit ebbdfc79aa
2 changed files with 4 additions and 3 deletions

View File

@ -28,9 +28,9 @@ namespace gtsam {
double absoluteDecrease = currentError - newError; double absoluteDecrease = currentError - newError;
if (verbosity >= 2) if (verbosity >= 2)
cout << "absoluteDecrease: " << absoluteDecrease << endl; cout << "absoluteDecrease: " << absoluteDecrease << endl;
if (absoluteDecrease < 0) // if (absoluteDecrease < 0)
throw overflow_error( // throw overflow_error(
"NonlinearFactorGraph::optimize: error increased, diverges."); // "NonlinearFactorGraph::optimize: error increased, diverges.");
// calculate relative error decrease and update currentError // calculate relative error decrease and update currentError
double relativeDecrease = absoluteDecrease / currentError; double relativeDecrease = absoluteDecrease / currentError;

View File

@ -50,6 +50,7 @@ namespace gtsam {
VectorConfig SubgraphPCG<Graph, Config>::linearizeAndOptimize(const Graph& g, VectorConfig SubgraphPCG<Graph, Config>::linearizeAndOptimize(const Graph& g,
const Config& theta_bar, const Ordering& ordering) const { const Config& theta_bar, const Ordering& ordering) const {
//TODO: 3 is hard coded here
VectorConfig zeros; VectorConfig zeros;
BOOST_FOREACH(const Symbol& j, ordering) zeros.insert(j,zero(3)); BOOST_FOREACH(const Symbol& j, ordering) zeros.insert(j,zero(3));