Accumulate the number of steps of the line search algorithm
and report it as part of Summary::FullReport.
Change-Id: I1de12784009a3e08f2a2c2aff5085d57a3c73828
1. Add answers to a number of FAQs.
2. Add a note to the documentation for NumericDiffCostFunction that
NumericDiffOptions needs to be documented and mentioned.
3. Update the docs for Solver::Options::numeric_derivative_relative_step_size
to indicate that this setting only applies to the gradient checker.
4. Remove deprecated constructors from NumericDiffCostFunction and
DynamicNumericDiffCostFunction.
Change-Id: If8fc011b2a5996dbc2c51268aa477550ed014a1c
- On GCC 4.9+ although GCC supports LTO, it requires use of the
non-default gcc-ar & gcc-ranlib. Whilst we can ensure Ceres is
compiled with these, doing so with GCC 4.9 causes multiple definition
linker errors of static ints inside Eigen when compiling the tests
and examples when they are not also built with LTO.
- On OS X (Xcode 6 & 7) after the latest update to gtest, if LTO
is used when compiling the tests (& examples), two tests fail
due to typeinfo::operator== (things are fine if only Ceres itself is
compiled with LTO).
- This patch disables LTO for all compilers. It should be revisited when
the performance is more stable across our supported compilers.
Change-Id: I17b52957faefbdeff0aa40846dc9b342db1b02e3
- If Ceres is built as a shared library, and LTO is enabled for Ceres
and the tests, then type_info::operator==() incorrectly returns false
in gtests' CheckedDowncastToActualType() in the following tests:
-- levenberg_marquardt_strategy_test.
-- gradient_checking_cost_function_test.
on at least Xcode 6 & 7 as reported here:
https://github.com/google/googletest/issues/595.
- This does not appear to be a gtest issue, but is perhaps an LLVM bug
or an RTTI shared library issue. Either way, disabling the use of
LTO when compiling the test application resolves the issue.
- Allow LTO to be enabled for GCC, if it is supported.
- Add CMake function to allow easy appending to target properties s/t
Ceres library-specific compile flags can be iteratively constructed.
Change-Id: I923e6aae4f7cefa098cf32b2f8fc19389e7918c9
1. Fix a typo in the Trust Region algorithm.
2. Add ARL in the list of users.
3. Update the version history.
Change-Id: Ic286e8ef1a71af07f3890b7592dd3aed9c5f87ce
- Substantial cleanup of iOS.cmake to use xcrun & xcodebuild to
determine the SDK & tool paths.
- Use libtool -static to link libraries instead of ar + ranlib, which
is not compatible with Xcode 7+, this change should be backwards
compatible to at least Xcode 6.
- Force locations of unordered_map & shared_ptr on iOS to work around
check_cxx_source_compiles() running in a forked CMake instance without
access to the variables (IOS_PLATFORM) defined by the user.
- Minor CMake style updates.
Change-Id: I5f83a60607db34d461ebe85f9dce861f53d98277
- Changing the inlining threshold for Clang as described has a minimal
effect on user performance.
- The problem that originally prompted the belief that it did was
due to an erroneous CXX flag configuration (in user code).
Change-Id: I03017241c0f87b8dcefb8c984ec3b192afd97fc2
- Increasing the inline threshold results in very variable performance
improvements, and could potentially confuse users if they are trying
to set the inline threshold themselves.
- As such, we no longer export our inline threshold configuration for
Clang, but instead document how to change it in the FAQs.
Change-Id: I88e2e0001e4586ba2718535845ed1e4b1a5b72bc
The test for CompressedRowSparseMatrix::AppendRows tries to add
a matrix of size zero, which results in an invalid pointer deferencing
even though that pointer is never written to.
Change-Id: I97dba37082bd5dad242ae1af0447a9178cd92027
The outer product computation logic in SparseNormalCholeskySolver
does not work well with dynamic sparsity. The overhead of computing
the sparsity pattern of the normal equations is only amortized if
the sparsity is constant. If the sparsity can change from call to call
SparseNormalCholeskySolver will actually be more expensive.
For Eigen and for CXSparse we now explicitly compute the normal
equations using their respective matrix-matrix product routines and solve.
Change-Id: Ifbd8ed78987cdf71640e66ed69500442526a23d4
- When compiled with Clang, Ceres and all of the examples are compiled
with an increased inlining-threshold, as the default value can result
in poor Eigen performance.
- Previously, client code using Ceres would typically not use an
increased inlining-threshold (unless the user has specifically added
it themselves). However, increasing the inlining threshold can result
in significant performance improvements in auto-diffed CostFunctions.
- This patch adds the inlining-threshold flags to the interface flags
for the Ceres CMake target s/t any client code using Ceres (via
CMake), and compiled with Clang, will now be compiled with the same
increased inlining threshold as used by Ceres itself.
Change-Id: I31e8f1abfda140d22e85bb48aa57f028a68a415e
This method numerically computes function derivatives in different
scales, extrapolating between intermediate results to conserve function
evaluations. Adaptive differentiation is essential to produce accurate
results for functions with noisy derivatives.
Full changelist:
-Created a new type of NumericDiffMethod (RIDDERS).
-Implemented EvaluateRiddersJacobianColumn in NumericDiff.
-Created unit tests with f(x) = x^2 + [random noise] and
f(x) = exp(x).
Change-Id: I2d6e924d7ff686650272f29a8c981351e6f72091
- Updated to new CMake style where function names are all lowercase,
this will be backwards compatible as CMake function names are
case insensitive.
- Updated using Emacs' M-x unscreamify-cmake-buffer.
Change-Id: If7219816f560270e59212813aeb021353a64a0e2
- In order to correctly detect shared_ptr (& unordered_map)
the iOS version must be >= 7.0 (Xcode 5.0+). This only affects the
SIMULATOR(64) platform builds, as the OS (device) build uses the
latest SDK which is now likely 8.0+.
Change-Id: Iefec8f03408b8cdc7a495f442ebba081f800adb0
- The CXX11 option has no effect on Windows, as there, any new C++11
features are enabled by default, as such to avoid confusion we only
present the option for non-Windows.
Change-Id: I38925ae3bb8c16682d404468ba95c611a519b9b9
1. Push the boundary handling logic into the underlying array
object. This has two very significant impacts:
a. The interpolation code becomes extremely simple to write
and to test.
b. The user has more flexibility in implementing how out of bounds
values are handled. We provide one default implementation.
Change-Id: Ic2f6cf9257ce7110c62e492688e5a6c8be1e7df2
- Optionally use CMake's export() functionality to export the Ceres
build directory as a package into the local CMake package registry.
- This enables the detection & use of Ceres from CMake *without*
requiring that Ceres be installed.
Change-Id: Ib5a7588446f490e1b405878475b6b1dd13accd1f
Often a parameter block is the Cartesian product of a number of
manifolds. For example, a rigid transformation SE(3) = SO(3) x R^3
In such cases, where you have the local parameterization
of the individual manifolds available,
ProductParameterization can be used to construct a local
parameterization of the cartesian product.
Change-Id: I4b5bcbd2407a38739c7725b129789db5c3d65a20
- Eigen/SparseCore is required by covariance_impl, this was added in
v 3.1.0 of Eigen, and thus without at least this version Ceres will
not compile.
- Note that Ubuntu 12.04 provides only version 3.0.5 in the mainline
repository.
- Update docs to match CMake check for Eigen >= 3.2.2 to avoid warning
about reduced sparse performance.
Change-Id: I291bb185d1c76e1e1422429169a76e3f1b828163
This adds a new wrapper class called DynamicCostFunctionToFunctor
that closes a gap in the current API: the existing
CostFunctionToFunctor can only be used with a SizedCostFunction, where
the number and sizes of all parameter vectors are known at compile-time.
The DynamicCostFunctionToFunctor allows you to wrap a generic
CostFunction into a templated functor which can then be used in a
DynamicAutoDiffCostFunction.
Also updates the existing CostFunctionToFunctor class to internally use
DynamicCostFunctionToFunctor.
Change-Id: I088adc3271c58d2519126c27037c3576965a36d6
- Include example use of new find_dependency() macro in CMake 3.x to
find dependencies in <Project>Config.cmake files.
- Also fix typo in NNLS modeling docs.
Change-Id: Ie9862b69c0451ee8775826f2957f5e182d937439
- A lot of users find the CMake package installation process confusing,
particularly the use of imported targets when exporting their own
projects which use Ceres.
- This patch adds a brief description of the overall process and the
main bear-trap users are ensnared by.
Change-Id: I44c022bbd18a393868bf88ea9ddd807c5e08abc9
1. Add documentation for cubic_interpolation.h
2. Remove the list of publications. It is an incomplete list which is
a pain to maintain.
3. Add a note about the interaction between manifolds and
NumericDiffCostFunction.
4. Fix some of the comments in cubic_interpolation.h to better reflect reality.
5. Updated the version history.
Change-Id: I0b4a5a6f3361d3fc85f1b4aec685cd80540934f1
Since Ceres is moving to using GitHub for issues, and the Google
Code URL in the current copyright header will soon become invalid,
update all the headers.
Change-Id: I1fce70375d1bcf098591f07b4d8f01a5c1e0789c
This CL is required to build Tango.
Inspired by this commit in RedwoodInternal repository:
commit 09dde53c248e04f432b5eccceea5daeedb706aea
Author: Mike Vitus <mike@hidof.com>
Date: Wed Apr 23 11:05:17 2014 -0700
Change-Id: I328b6634969de4ccdd71947945aa67a49ee9073f
The example code for DynamicNumericDiffCostFunction and
DynamicAutoDiffCostFunction in the documentation was
allocating the cost function objects on the stack rather
than the heap.
Thanks to Rodney Hoskinson for reporting this.
Change-Id: I217aee02d1e2c1e9c25b8197451e9f9e0482915d
- Previously we had no defined default value for
sparse_linear_algebra_library_type in Solver::Options if Ceres
was compiled with no sparse library available. Thus in that case,
the default value (dependent upon the compiler) would indicate that
one was available.
- Now we have an explicit option that means no sparse library is
available, which is now the default value in Solver::Options in this
case.
- Add a warning in CMake when the user disables all sparse libraries.
- Fix typos in trust_region_preprocessor_test:
(SUITE/CX)_SPARSE -> (SUITE/CX)SPARSE that induced failures when
no sparse libraries were available.
Change-Id: I869c399a12d42bfc44220cbb25ce6d6dd80236bd