1. 27 Jun, 2015 1 commit
    • Alex Stewart's avatar
      Ensure Eigen is at least 3.1.0 for Eigen/SparseCore. · b7e9a576
      Alex Stewart authored
      - 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
      b7e9a576
  2. 22 Jun, 2015 1 commit
    • Alex Stewart's avatar
      Add option to use C++11 (not TR1) shared_ptr & unordered_map. · 6414bd02
      Alex Stewart authored
      - On at least some compilers, -std=c++11 is required in order to compile
        against std::shared_ptr & std::unordered_map, which resulted in our
        checks failing to find them and using the TR1 versions instead, which
        causes conflicts for users using C++11.
      - Now, if the compiler supports it and the user enables the CXX11
        option, we explicitly enable C++11 before searching for shared_ptr &
        unordered_map, which means we should always find the C++11 versions
        if they are available.
      - As use of CXX11 results in a version of Ceres that must be used with
        -std=c++11 for GCC & Clang, we roll this into the Ceres target when
        the version of CMake supports this, otherwise we warn the user they
        will have to do this themselves.
      - CXX11 is OFF by default, to ensure that the behaviour of Ceres is
        unchanged from before.
      
      Change-Id: I157ea7a4fadc6bc02da176b8e771f1f327ccaf78
      6414bd02
  3. 18 Jun, 2015 1 commit
    • David Gossow's avatar
      Add DynamicCostFunctionToFunctor. · 2a1dfd2b
      David Gossow authored
      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
      2a1dfd2b
  4. 10 Jun, 2015 1 commit
  5. 30 May, 2015 2 commits
  6. 27 May, 2015 1 commit
    • pmoulon's avatar
      Typo fix. · 5a5526e1
      pmoulon authored
      Change-Id: I7c59f92f8691beb2a0b999c1f93e31a099bbdb9d
      5a5526e1
  7. 26 May, 2015 1 commit
  8. 19 May, 2015 1 commit
  9. 14 May, 2015 1 commit
    • Sameer Agarwal's avatar
      Improve numeric differentation near zero. · 9064b4ed
      Sameer Agarwal authored
      Before this change, the default step size
      for a function F(x) at x was
      
      step_size = |x| * relative_step_size
      
      if step_size was exactly zero, then to prevent
      division by zero we would fall back to relative_step_size.
      
      This however is not good enough, as values of x say 1e-64
      would lead to step sizes ~ 1e-70 and dividing by such numbers
      leads to inaccurate results. For even smaller numbers, like
      1e-300, which I have observed can occur as the optimization
      algorithm makes progress, this leads to NaNs.
      
      The key change in this CL is to change the fallback mechanism
      to be
      
      step_size = max(|x| * relative_step_size, min_step_size)
      
      where
      
      min_step_size = sqrt(DBL_EPSILON)
      
      This is the recommended minimum value for the step size
      for double precision arithmetic on the interwebs.
      
      This results in a small loss of precision in the transcendental
      functions test, but that is unavoidable as we are not taking
      sufficiently small steps anymore.
      
      On the whole though this will improve the numerical performance
      of the algorithm.
      
      To validate this approach, one of the parameter values for the
      EasyFunctorTest has been set to 1e-64, which causes the test
      to start failing without the corrected fallback logic.
      
      This change should also address some if not all of
      
      https://github.com/ceres-solver/ceres-solver/issues/121
      
      Change-Id: I4a9013ef358626c1ba7b8abad60b3904163d63f6
      9064b4ed
  10. 13 May, 2015 1 commit
  11. 06 May, 2015 2 commits
  12. 05 May, 2015 2 commits
  13. 04 May, 2015 2 commits
  14. 29 Apr, 2015 1 commit
    • Russell Smith's avatar
      Additional special cases in the handling of pow(Jet,Jet). · 77e80aec
      Russell Smith authored
      I think this is all of the cases. These cases arise because pow(a,b) is limited
      to real valued results, if the argument and result were complex valued then
      these cases would disappear.
      
      NOTE: Since there is so much special casing here, it is worth checking to see
      if cpow() is implemented in terms of pow(), and what might be the consequences
      of using cpow() on the type std::complex<Jet<double, N> >. It is *possible*
      that a separate implementation of cpow might be required also.
      
      Also some comment fixes.
      
      Change-Id: Ia1e38df4cdcb548f778304c2854cacba6e1556ff
      77e80aec
  15. 27 Apr, 2015 1 commit
  16. 16 Apr, 2015 4 commits
  17. 15 Apr, 2015 2 commits
  18. 14 Apr, 2015 2 commits
  19. 11 Apr, 2015 2 commits
  20. 10 Apr, 2015 1 commit
    • Sameer Agarwal's avatar
      Remove confusing code from DenseJacobianWriter · d500caac
      Sameer Agarwal authored
      The code seemed to imply that its possible to call the Write
      method with a null pointer which is never the case. There would
      be no point to calling Write.
      
      Thanks to Michael Vitus for pointing this out.
      
      Change-Id: Ic9a276856d0a7e65d53a1cc8742d4831c1a52615
      d500caac
  21. 07 Apr, 2015 1 commit
    • Sameer Agarwal's avatar
      Revert 81219fff. · e712ce18
      Sameer Agarwal authored
      Eigen upstream was broken a little while ago, and it seemed to be
      the case that we needed a fix for using the LLT factorization on
      ARM.
      
      This has been fixed and AFAIK there are no stable eigen releases
      with this bug in it.
      
      For full gore, see
      
      http://eigen.tuxfamily.org/bz/show_bug.cgi?id=992
      
      In light of the fix, the extra layer of indirection introduced earlier
      is not needed and we are reverting to normal programming.
      
      Change-Id: I16929d2145253b38339b573b27b6b8fabd523704
      e712ce18
  22. 06 Apr, 2015 6 commits
    • Sameer Agarwal's avatar
      Lint changes from Jim Roseborough. · e78a97ac
      Sameer Agarwal authored
      Change-Id: I4b1e9ac6c1c74e96f51e57e0cbeaa3d3d649f770
      e78a97ac
    • Alex Stewart's avatar
      Add documentation on CMake package installation process. · d95f9192
      Alex Stewart authored
      - 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
      d95f9192
    • Sameer Agarwal's avatar
      Revert a call to SolveUpperTriangularUsingCholesky. · e2a71699
      Sameer Agarwal authored
      The call to llt in backsubstitute seems to be using one
      of the fixed size specializations which is best done with
      an inline call to llt/ldlt rather than introducing yet another
      variant of the SolverUpperTriangularUsingCholesky and calling it.
      
      Also change the way SolverUpperTriangularUsingCholesky handles
      error. It always computes the solution even if it is garbage
      and then returns the error code.
      
      This ensures that the previous code that depends on unconditional
      computation still works.
      
      Change-Id: Idb1e6efdae9a3775a072e3b87cde02e0bbddb319
      e2a71699
    • Sameer Agarwal's avatar
      Use solveInPlace correctly. · 59d7f984
      Sameer Agarwal authored
      When solving a linear system using Eigen's dense Cholesky factorization
      if the right hand side of the linear system is the same vector
      that will store the solution, call solveInPlace instead of solve.
      
      Change-Id: I3e6d2f21ff420c25217cd87ee5d269fdfabbf19a
      59d7f984
    • Sameer Agarwal's avatar
      Make CERES_EIGEN_VERSION macro independent of CMake. · 10cbe858
      Sameer Agarwal authored
      CERES_EIGEN_VERSION was being defined by the CMakeList.txt file
      but it is needed by the android build too. So this change
      directly constructs the CERES_EIGEN_VERSION string out of the
      raw Eigen version numbers.
      
      Change-Id: I65309805a59076c3082141d9042ab7e0e1b972bc
      10cbe858
    • Sameer Agarwal's avatar
      Allow using Eigen's LDLT factorization instead of LLT factorization · 81219fff
      Sameer Agarwal authored
      It seems that Eigen's LLT factorization is broken on ARM.
      This patch enables the use of LDLT factorization instead of LLT
      factorization. The switch is controlled at compile time using a
      preprocessor define - CERES_USE_EIGEN_LDLT.
      
      By default we continue to use LLT factorization though.
      
      To make the switching easier without introducing the Cholesky factorization
      based inversion and linear system solve routines have been abstracted into
      two new functions.
      
      Android.mk has been updated to enable the LDLT factorization, but
      the cmake file has not been updated as I will leave it to Alex's
      capable hands to do proper detection of ARM as a target platform.
      
      Change-Id: Iffe3abd2ce894de2a388b454df3da909b482d5e5
      81219fff
  23. 05 Apr, 2015 1 commit
  24. 04 Apr, 2015 1 commit
    • Alex Stewart's avatar
      Ensure local config.h is used if Ceres is already installed. · 5b043a94
      Alex Stewart authored
      - Previously, if Ceres was already installed to the same location as one
        of the depenedencies (e.g. /usr/local) then as the BUILD_DIR/config
        path was necessarily added to the include_directories() list *after*
        the INCLUDE_DIRS for the dependencies, the config.h for the
        *installed* version of Ceres would be used instead of the locally
        configured version, as it would appear first on the path.
      - Forcing the location of the locally configured config.h to the front
        of the include_directories() list ensures that it is found first
        (and is thus used) even if an installed version of Ceres also exists
        on the path.
      
      Change-Id: I7b4f97a3ad0120bd11551f9b8eb6bffc66966eb4
      5b043a94
  25. 31 Mar, 2015 1 commit