Fix a bug in TrustRegionMinimizer.
LocalParameterization::Plus is allowed to return false when for some
reason the operation cannot be performed. Uptil now, this would
cause the TrustRegionMinimizer to terminate with a numerical failure.
This is not correct behaviour. Just like CostFunction::Evaluate,
returning false from LocalParameterization::Plus should result
in the current step to be rejected rather than the entire optimization
coming to a halt.
LineSearchMinimizer has also been updated to use the same pattern.
Thanks to Michael Vitus for reporting this.
Change-Id: I1351966bc6db3bf6cd46387b78d4e52a9df51696
2 files changed