diff options
author | Carlos Hernandez <chernand@google.com> | 2014-08-07 17:51:38 -0700 |
---|---|---|
committer | Carlos Hernandez <chernand@google.com> | 2014-08-11 20:38:34 +0000 |
commit | 79397c21138f54fcff6ec067b44b847f1f7e0e98 (patch) | |
tree | b2c33877af479b37f082fcbcaf50a24a49b69415 /internal/ceres/linear_solver.h | |
parent | ad78e589f893a53da23bbdf41274d89dae656f54 (diff) | |
download | ceres-solver-79397c21138f54fcff6ec067b44b847f1f7e0e98.tar.gz |
Update ceres to the latest version in g3android-wear-5.0.0_r1android-cts-5.1_r9android-cts-5.1_r8android-cts-5.1_r7android-cts-5.1_r6android-cts-5.1_r5android-cts-5.1_r4android-cts-5.1_r3android-cts-5.1_r28android-cts-5.1_r27android-cts-5.1_r26android-cts-5.1_r25android-cts-5.1_r24android-cts-5.1_r23android-cts-5.1_r22android-cts-5.1_r21android-cts-5.1_r20android-cts-5.1_r2android-cts-5.1_r19android-cts-5.1_r18android-cts-5.1_r17android-cts-5.1_r16android-cts-5.1_r15android-cts-5.1_r14android-cts-5.1_r13android-cts-5.1_r10android-cts-5.1_r1android-cts-5.0_r9android-cts-5.0_r8android-cts-5.0_r7android-cts-5.0_r6android-cts-5.0_r5android-cts-5.0_r4android-cts-5.0_r3android-5.1.1_r9android-5.1.1_r8android-5.1.1_r7android-5.1.1_r6android-5.1.1_r5android-5.1.1_r4android-5.1.1_r38android-5.1.1_r37android-5.1.1_r36android-5.1.1_r35android-5.1.1_r34android-5.1.1_r33android-5.1.1_r30android-5.1.1_r3android-5.1.1_r29android-5.1.1_r28android-5.1.1_r26android-5.1.1_r25android-5.1.1_r24android-5.1.1_r23android-5.1.1_r22android-5.1.1_r20android-5.1.1_r2android-5.1.1_r19android-5.1.1_r18android-5.1.1_r17android-5.1.1_r16android-5.1.1_r15android-5.1.1_r14android-5.1.1_r13android-5.1.1_r12android-5.1.1_r10android-5.1.1_r1android-5.1.0_r5android-5.1.0_r4android-5.1.0_r3android-5.1.0_r1android-5.0.2_r3android-5.0.2_r1android-5.0.1_r1android-5.0.0_r7android-5.0.0_r6android-5.0.0_r5.1android-5.0.0_r5android-5.0.0_r4android-5.0.0_r3android-5.0.0_r2android-5.0.0_r1lollipop-wear-releaselollipop-releaselollipop-mr1-wfc-releaselollipop-mr1-releaselollipop-mr1-fi-releaselollipop-mr1-devlollipop-mr1-cts-releaselollipop-devlollipop-cts-release
Please pay special attention to the changes in Android.mk.
They are the only real changes I had to make.
Bug: 16953678
Change-Id: I44a644358e779aaff99a2ea822387fe49ac26888
Diffstat (limited to 'internal/ceres/linear_solver.h')
-rw-r--r-- | internal/ceres/linear_solver.h | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/internal/ceres/linear_solver.h b/internal/ceres/linear_solver.h index 22691b3..58b9044 100644 --- a/internal/ceres/linear_solver.h +++ b/internal/ceres/linear_solver.h @@ -50,6 +50,26 @@ namespace ceres { namespace internal { +enum LinearSolverTerminationType { + // Termination criterion was met. + LINEAR_SOLVER_SUCCESS, + + // Solver ran for max_num_iterations and terminated before the + // termination tolerance could be satisfied. + LINEAR_SOLVER_NO_CONVERGENCE, + + // Solver was terminated due to numerical problems, generally due to + // the linear system being poorly conditioned. + LINEAR_SOLVER_FAILURE, + + // Solver failed with a fatal error that cannot be recovered from, + // e.g. CHOLMOD ran out of memory when computing the symbolic or + // numeric factorization or an underlying library was called with + // the wrong arguments. + LINEAR_SOLVER_FATAL_ERROR +}; + + class LinearOperator; // Abstract base class for objects that implement algorithms for @@ -74,9 +94,11 @@ class LinearSolver { Options() : type(SPARSE_NORMAL_CHOLESKY), preconditioner_type(JACOBI), + visibility_clustering_type(CANONICAL_VIEWS), dense_linear_algebra_library_type(EIGEN), sparse_linear_algebra_library_type(SUITE_SPARSE), use_postordering(false), + dynamic_sparsity(false), min_num_iterations(1), max_num_iterations(1), num_threads(1), @@ -87,14 +109,14 @@ class LinearSolver { } LinearSolverType type; - PreconditionerType preconditioner_type; - + VisibilityClusteringType visibility_clustering_type; DenseLinearAlgebraLibraryType dense_linear_algebra_library_type; SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type; // See solver.h for information about this flag. bool use_postordering; + bool dynamic_sparsity; // Number of internal iterations that the solver uses. This // parameter only makes sense for iterative solvers like CG. @@ -243,14 +265,23 @@ class LinearSolver { Summary() : residual_norm(0.0), num_iterations(-1), - termination_type(FAILURE) { + termination_type(LINEAR_SOLVER_FAILURE) { } double residual_norm; int num_iterations; LinearSolverTerminationType termination_type; + string message; }; + // If the optimization problem is such that there are no remaining + // e-blocks, a Schur type linear solver cannot be used. If the + // linear solver is of Schur type, this function implements a policy + // to select an alternate nearest linear solver to the one selected + // by the user. The input linear_solver_type is returned otherwise. + static LinearSolverType LinearSolverForZeroEBlocks( + LinearSolverType linear_solver_type); + virtual ~LinearSolver(); // Solve Ax = b. |