Do not define trivial constructors or destructors unless necessary
(e.g., for implementing pimpl) following the rule of zero. Define
virtual base class destructors out-of-line to avoid emitting vtables in
every translation unit.
Change-Id: Iea2d8978e62a8ee5a97b86cbb4e858d56e0fb274
- Change formatting standard to Cpp11. Main difference is not having
the space between two closing >> for nested templates. We don't
choose c++14, because older versions of clang-format (version 9
and earlier) don't know this value yet, and it doesn't make a
difference in the formatting.
- Apply clang-format to all (non generated) internal source files.
- Manually fix some code sections (clang-format on/off) and c-strings
- Exclude some embedded external files with very different formatting
(gtest/gmock)
- Add script to format all source files
Change-Id: Ic6cea41575ad6e37c9e136dbce176b0d505dc44d
Since the output of LossFunction::Evaluate is multiplied by 0.5, the
current implementation of the Tukey loss function must be multiplied
by 2.
Change-Id: Ia94753eef1a375fe48cc2e0d2cc61350904c8248
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
The loss functions that ship with ceres can sometimes
generate a zero first derivative if the residual is too
large.
In such cases Corrector fails with an ugly undebuggable
crash. This CL is the first in a series of fixes to
take care of this.
We clamp the values of rho' from below by
numeric_limits<double>::min().
Also included here is some minor cleanup where the constants
are treated as doubles rather than integers.
Thanks to Pierre Moulon for reporting this problem.
Change-Id: I3aaf375303ecc2659bbf6fb56a812e7dc3a41106