1. Convert a CompressedRowSparseMatrix constructor which
takes a TripletSparseMatrix as input into a factory method
which allows the input to be transposed.
2. Move the random matrix creation routine for CompressedRowSparseMatrix
from being a standalone function to a static method.
3. Add a corresponding random matrix generation static method to
TripletSparseMatrix.
4. Add a new constructor to TripletSparseMatrix, which takes as input
the row, col and values arrays.
Change-Id: Iec7b184646818f432a5e6822bea3b2f3128a82aa
- Use target_compile_features() to specify the C++11 dependency for
Ceres if the CXX11 option is enabled and the current CMake version
supports it (>= 3.1). Otherwise fall back onto our existing
target_compile_options() solution if available.
- We prefer the use of target_compile_features() if available as it more
gracefully handles ‘upgrading’ of the C++ standard in client projects
that depend upon Ceres, e.g. if the client requires C++14. The
current solution may fail to produce the expected result in this case
as raised in
https://github.com/ceres-solver/ceres-solver/issues/273.
Change-Id: Ib3cff8d4b9fe93fa6d6b376b4dd53923bb1c4ecc
Now that there is a single piece of code doing the outer product
computation for all three sparse linear algebra backends, move
this code one level up the call stack and there by make the actual
per-library solver code shorter and simpler.
Also fix a minor omission in the outer product computation code
where row/column blocks were not being copied over to the
outer product matrix.
Change-Id: I22a7967bdc659385b741901afefa7af312e676e5
SchurEliminator::Init now takes a bool that tells it whether
it can assume that the diagonal blocks it is inverting can
be assumed to be full rank or not.
This information is then passed onto InvertPSDMatrix.
Change-Id: I26037b6233f2aad5584fed245f631c3959928afe
- Updates FindEigen.cmake to default to an installed Eigen CMake
Configuration if available, otherwise falls back to previous behaviour
of searching for Eigen components.
- This mimics the behaviour of FindGflags.cmake & FindGlog.cmake.
Change-Id: Ifce948d554a0135ce1a0c443267c0230e516f14b
THIS IS AN API BREAKING CHANGE.
Decouple the algorithm from the sparse linear algebra
library being used to perform the computation.
Before this change
Covariance::AlgorithmType had values
DENSE_SVD
EIGEN_SPARSE_QR
SUITE_SPARSE_QR
This has been replaced by two enums now.
Covariance::Options::sparse_linear_algebra_library_type
which can take values EIGEN_SPARSE, SUITE_SPARSE or CX_SPARSE.
The last one is currently not supported.
And Covariance::Options::algorithm_type takes values
DENSE_SVD
SPARSE_QR
This sets the stage for future extensions of the covariance
computation algorithm.
Also as part of this change, the covariance computation chapter
has been made a top level chapter on its own instead of being
buried deep inside the Solving Non-linear Least Squares problem.
Change-Id: Ibfbf60902d8d17694d9ff585047a5a57d329ab22
SolveLowerTriangularInPlace
SolveLowerTriangularTransposeInPlace
were unused functions which can be removed.
Change-Id: I0fd29c1efae2a0a74666f6e3541473bebc22ae82
This code was currently buried under a bool inside SparseNormalCholeskySolver.
Pulling this out in its own solver makes the code simpler more readable
and more performant in the case of SuiteSparse.
Change-Id: I72379ca9ca162abbb83c12f7ee8ff92bc71e772c
By adding an enum to CompressedRowSparseMatrix, which indicates
whether the matrix is unsymmetric, upper or lower triangular
we are able to improve the readability and fix some minor
bugs in the way some matrix manipulation code was being
called.
Thank to William Rucklidge for this suggestion.
Change-Id: I355c90d11cd5d31f5a25741b0bda4fc4583e9095
Move it to compressed_row_sparse_matrix.h/cc for upcoming re-use.
Also clean up the tests for ComputeOuterProduct so that they do
not depend on CXSparse anymore and use Eigen instead. This also
makes the test simpler and shorter.
Change-Id: I06bbeb3b0c6a07fb1f3da354ef0abd17d246be9a
1. Add stype to the outerproduct computation to control the output
matrix in upper or lower triangular matrix. For SuiteSparse,
upper triangular matrix is generated. SuiteSparse can directly use
this matrix format for cholesky without matrix transpose overhead.
2. Change the outerproduct computation to block multiplication. This
reduces the computation complexity for the sort in preprocessing, also
allows formulation of the block outerproduct computation as dense Eigen
block matrix multiplication.
3. Solve 32 Tango problems on Qualcomm MSM8994 Cortex-A53 (1.55GHz)
before change: 140 seconds
after change: 131 seconds
Change-Id: I8054114cef911de6a303310a448821ca296e4744
- Using Ceres_[SOURCE/BINARY]_DIR (which are defined by CMake when
project(Ceres) is called, in favour of CMAKE_[SOURCE/BINARY]_DIR
enables Ceres to be nested within (and built by) a larger CMake
project (which also contains other projects).
- CMAKE_[SOURCE/BINARY]_DIR always refers to the top-level source
and binary directories (i.e. the first encountered), as a result if
Ceres is a nested project within a larger project, these would not
correctly identify the source/binary directories for Ceres (as they
would refer to the root project in which Ceres is nested).
- Using Ceres_[SOURCE/BINARY]_DIR should ensure that Ceres always uses
the correct source/binary directories, irrespective of whether Ceres
is nested or not.
Change-Id: I62226ea3f6552b1d7e2bdac1aef02f1f489ae55e
Doing this also necessitated some re-organization of the derivatives
article into chapters and some minor edits.
Change-Id: Ic08e83af138817173caa80a52a9e72707cd57512
Ensures that a quadratic function can be minimizer to zero
and the final cost is reported correctly.
Change-Id: Ib03752b627988dc8038566ed1fa444b7d9d2fd2d
Remove the "Guide" and expose the modeling and solving non-linear
least squares in the left hand side navigation bar.
Change-Id: Ibbb4f0f580a5981165a0945570fc0f4c4ea559e9
Previously, even when an iteration was successful, the LineSearchMinimizer
would only add the iteration summary to the Summary object if none
of the convergence tests were passed. This could cause iterations with
significant progress in the last iteration to be mis-reported.
The solution would be correct, but the actual cost would be misreported.
This change changes the order of these operations and ensures that
the iteration summary is added whenever the iteration itself is successful.
Thanks to Daniel Weindl for reporting this.
Change-Id: Iff10eccb49d50ad28127f44e149c17fa466db4ae
- When Ceres is exported (rather than installed), the miniglog headers
still reside in the internal Ceres source directory, not the public
headers directory.
Change-Id: Ia54eb7f8bb0cd24c0112a715a739c15247bc9239
- When compiling on Clang on OS X with MINIGLOG enabled, name lookup
finds two ambiguous definitions of WARNING, one in the global
namespace and one in the google namespace, both defined in the
miniglog version of logging.h.
Change-Id: I6f1ad7d2750e1ed20ec1ba4574aab599086431df
1. Add schur_templates.cc to Android.mk
2. When detecting the Schur structure of the Jacobian,
the check for whether linear solver being used is indeed
of Schur type or not, should use the LinearSolver::Options
struct created and populated by the preprocessor rather than
depending on the value in the input Solver::Options. The reason
is that the preprocessor may change the linear solver type
depending on the lack of a Schur structure in the problem.
Change-Id: I6f018f6817c05d704409181c7b1e25155528ab84
1. Refactor the python code that generates the template specializations
to remove code duplication.
2. Improved the logic for template specialization selection where
Eigen::Dynamic now serves as a wildcard.
3. Added schur_templates.h/cc which allows querying the set of available
template specializations without instantiating a linear solver.
4. Added Solver::Summary::schur_structre_given and
Solver::Summary::schur_structure_used and expose them in
Solver::Summary::FullReport for better performance debugging.
5. Updated the templates with newer dates and some minor comments cleanup
which lead to the the template specializations to be re-generated.
Change-Id: Iaf3c6f714353597899916c300465da01f151c3de