Refactor the array validation routines into their own file, as they are used by
more than just the residual block evaluation routines now.
Check the step computed by the linear solver for finiteness, and terminate early
if it is not. This will prevent bugs where the solver continues to run after
encountering an nan.
diff --git a/internal/ceres/CMakeLists.txt b/internal/ceres/CMakeLists.txt
index e6dcbd9..f7caa6c 100644
--- a/internal/ceres/CMakeLists.txt
+++ b/internal/ceres/CMakeLists.txt
@@ -29,6 +29,7 @@
# Author: keir@google.com (Keir Mierle)
SET(CERES_INTERNAL_SRC
+ array_utils.cc
block_evaluate_preparer.cc
block_jacobi_preconditioner.cc
block_jacobian_writer.cc
@@ -153,6 +154,7 @@
${CMAKE_SOURCE_DIR}/data)
ENDMACRO (CERES_TEST)
+ CERES_TEST(array_utils)
CERES_TEST(autodiff)
CERES_TEST(autodiff_cost_function)
CERES_TEST(block_random_access_dense_matrix)