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/parameter_block.h b/internal/ceres/parameter_block.h
index 4bac1a8..cedb30c 100644
--- a/internal/ceres/parameter_block.h
+++ b/internal/ceres/parameter_block.h
@@ -32,13 +32,13 @@
#define CERES_INTERNAL_PARAMETER_BLOCK_H_
#include <cstdlib>
-#include "ceres/integral_types.h"
#include <glog/logging.h>
+#include "ceres/array_utils.h"
+#include "ceres/integral_types.h"
#include "ceres/internal/eigen.h"
#include "ceres/internal/port.h"
#include "ceres/internal/scoped_ptr.h"
#include "ceres/local_parameterization.h"
-#include "ceres/residual_block_utils.h"
namespace ceres {
namespace internal {