Replace SolverImpl with
a. A minimizer specific preprocessor class.
b. A generic Solve function inside solver.cc
c. Presummarize and Postsummarize functions to handle
updates to the summary object.
The existing SolverImpl class was a mixture of the above three
things and was increasingly complicated code to follow. This change,
breaks it into its three separate constituents, with the aims of
better separation of concerns and thus better testability and
reliability.
The call to Solver::Solve() now consists of
1. Presummarize - summarize the given state of the problem and solver
options.
2. Preprocess - Setup everything that is needed to call the minimizer.
This includes, removing redundant parameter and residual blocks,
setting up the reordering for the linear solver, creating the
linear solver, evaluator, inner iteration minimizer etc.
3. Minimize.
4. Post summarize - summarize the result of the preprocessing and the
solve.
Change-Id: I80f35cfc9f2cbf78f1df4aceace27075779d8a3a
SPARSE_NORMAL_CHOLESKY and SPARSE_SCHUR can now be used
with EIGEN_SPARSE as the backend.
The performance is not as good as CXSparse. This needs to be
investigated. Is it because the quality of AMD ordering that
we are computing is not as good as the one for CXSparse? This
could be because we are working with the scalar matrix instead
of the block matrix.
Also, the upper/lower triangular story is not completely clear.
Both of these issues will be benchmarked and tackled in the
near future.
Also included in this change is a bunch of cleanup to the
SparseNormalCholeskySolver and SparseSchurComplementSolver
classes around the use of the of defines used to conditionally
compile out parts of the code.
The system_test has been updated to test EIGEN_SPARSE also.
Change-Id: I46a57e9c4c97782696879e0b15cfc7a93fe5496a
Sparse Cholesky factorization is not rank revealing. Therefore
this algorithm cannot reliably tell when the Jacobian matrix is
rank deficient or so poorly conditioned that the covariance matrix
cannot be estimated.
Making things worse, this algorithm works on the normal equations,
which makes the conditioning problem much worse.
This change, deletes the SPARSE_CHOLESKY algorithm in the covariance
estimation code. Also to make the naming consistent, it renames
SPARSE_QR -> SUITE_SPARSE_QR
so that it parallels EIGEN_SPARSE_QR.
Also, since we now have EIGEN_SPARSE_QR, we can default to using
it when SuiteSparse is not available instead of DENSE_SVD, which
generally speaking should only be used by folks who are dealing
with small rank deficient jacobians.
Change-Id: I8b134c7e8a2e86ca374371f185b19f1c3e74349c
Alessandro Gentilini pointed out that the install instructions
don't actually install the library.
Also included are some other minor changes to dependency
description.
Change-Id: I50872114bca7a9774ef66f55ba78ed9b7adad93f
- Explain the various ways to fix the problem of multiple definitions
of ERROR from glog / miniglog vs windows.h.
- Add note about use of CMAKE_LIBRARY_PATH to aid FindBLAS & FindLAPACK.
- Fix minor style typo in code-block for sample Ceres output.
Change-Id: I21742614f4c5a8fe1ac8f66811b7777a72bcc503
- Previously if miniglog was being used (on a non-Android system), we
compiled it into a separate library, against which Ceres then linked.
- This was unsatisfactory as it required miniglog being built as a
static library when building Ceres as a Windows DLL, because miniglog
did not use the dllexport/dllimport statements, whilst for other
platforms when building Ceres as a shared library, miniglog needed to
be compiled as a shared library.
- We now compile miniglog into Ceres on all platforms, not just on
Android.
- miniglog now uses the CERES_EXPORT macro to support Windows DLLs.
This means that miniglog now depends on Ceres' internal/port.h (and
thus internal/config.h) which define the CERES_EXPORT macro and
control its behaviour respectively.
- miniglog now also uses localtime_s, not localtime on Windows.
Change-Id: Ia55b9af8b4e6decf067eab92f0a5c2d14358a1e9
1. Update ceres-solver.spec with version bump
and a new package description.
2. Update the docs to refer to 1.9.0
3. Update version history.
4. Change build requirements for Android to be r9d.
Change-Id: Ibab27976b214a11549cb2688b91f791a6388b0b5
- A number of users are now successfully using the
suitesparse-metis-for-windows project to build Ceres with SuiteSparse
on Windows.
- Also fixing missing requirement for sphinx_rdm_theme if building
the Ceres docs.
Change-Id: I1a36c13166f96743557de2ac3b7c9b84531d1f24
- Previously we set CMAKE_MODULE_PATH explicitly rather than appending
to it when adding our local cmake directory.
- This meant the user could not easily pass their own directory which
would also be used. This would be useful if they had their own
custom FindBLAS / FindLAPACK scripts that they wanted to overload
the defaults shipped with CMake.
Change-Id: I0c1fda1b6fd81eab68755aa036f64af3efbb226d
- Previously we passed all compile options to Ceres via add_definitions
in CMake. This was fine for private definitions (used only by Ceres)
but required additional work for public definitions to ensure they
were correctly propagated to clients via CMake using
target_compile_definitions() (>= 2.8.11) or add_definitions().
- A drawback to these approaches is that they did not work for chained
dependencies on Ceres, as in if in the users project B <- A <- Ceres,
then although the required Ceres public compile definitions would
be used when compiling A, they would not be propagated to B.
- This patch replaces the addition of compile definitions via
add_definitions() with an autogenerated config.h header which
is installed with Ceres and defines all of the enabled Ceres compile
options.
- This removes the need for the user to propagate any compile
definitions in their projects, and additionally allows post-install
inspect of the options with which Ceres was compiled.
Change-Id: Idbdb6abdad0eb31e7540370e301afe87a07f2260
1. Update version history.
2. Minor changes to the tutorial to reflect the bounds constrained
problem.
3. Added static factory methods to the SnavelyReprojectionError.
4. Removed relative gradient tolerance from types.h as it is
not true anymore.
Change-Id: I8de386e5278a008c84ef2d3290d2c4351417a9f1
The existing introduction was a bit redundant and also
was not really an introduction. Also updated the build
instructions to reflect the new reality on Mac OSX.
Also updated the beginning of the tutorial to be a bit
gentler and updated the history to be more consistent
Change-Id: Ife38c1949252cf9f4c6301856957f2d38365f313
This reworks the Ceres Sphinx documentation such that it can
function as the main Ceres website, now hosted at
ceres-solver.org. This also changes to the theme sphinx_rtd_theme
used by Read The Docs; this theme has strong mobile support and is
well enough designed.
Change-Id: I63232d985859a6dac94ff58f08bf81eb2b9e7f99
- Breaking change: Problem::Options::enable_fast_parameter_block_removal
is now Problem::Options::enable_fast_removal, as it now controls
the behaviour for both parameter and residual blocks.
- Previously we did not check that the specified residual block to
remove in RemoveResidualBlock actually represented a valid residual
for the problem.
- This meant that Ceres would die unexpectedly if the user passed an
uninitialised residual_block, or more likely attempted to remove a
residual block that had already been removed automatically after
the user removed a parameter block upon on which it was dependent.
- RemoveResidualBlock now verifies the validity of the given
residual_block to remove. Either by checking against a hash set of
all residuals maintained in ProblemImpl iff enable_fast_removal
is enabled. Or by a full scan of the residual blocks if not.
Change-Id: I9ab178e2f68a74135f0a8e20905b16405c77a62b
1. Add a tip about glog.
2. Add a tip about using Summary::FullReport to optimize performance.
3. Add a tip about using the Inverse Function Theorem.
Change-Id: I949ec6843ff796672edbad8bc801230dd0ab5345
This is just a very bare bones beginning to this chapter.
But it opens the door to actually adding content to this
one tip/trick at a time.
Change-Id: I2aa386ba4da66dba5308e3f4ed4d434e44e44fd9
Now that the trust region minimizer depends on the line search
minimizer, conditional compilation of the line search minimizer
will lead to build breakages, so this option is now not available.
It is not expected to have as significant impact on users as the
amount of code in the line search minimization algorithm is
rather small to begin with.
Change-Id: I2aa6b6e6e3931b6428dbda654f14faf1ac6dd130
1. Reflect the demise of the various FOO_TOLERANCE convergence
types.
2. Update the documentation for Solver::Options::gradient_tolerance.
Change-Id: I6bd11d260d6f8a3222b6a41a62dc4943ec8fcfbf
CostFunction now uses int32 instead of int16
to store the size of its parameter blocks.
This is an API breaking change.
Change-Id: I032ea583bc7ea4b3009be25d23a3be143749c73e
1. Rename SolverTerminationType to TerminationType.
2. Consolidate the enum as
a. CONVERGENCE - subsumes FUNCTION_TOLERANCE, PARAMETER_TOLERANCE and GRADIENT_TOLERANCE
b. NO_CONVERGENCE
c. FAILURE - captures all kinds of failures including DID_NOT_RUN.
d. USER_SUCCESS
e. USER_FAILURE
3. Solver::Summary::error is renamed to be Solver::Summary::message, to both
reduce confusion as well as capture its true meaning.
Change-Id: I27a382e66e67f5a4750d0ee914d941f6b53c326d