Go to the documentation of this file.
43 std::vector<std::pair<Key, Matrix> > jacobians;
47 const size_t rows =
e.size();
50 const double one_over_2delta = 1.0 / (2.0 *
delta);
61 const Vector left = factor.whitenedError(eval_values);
65 const Vector right = factor.whitenedError(eval_values);
68 jacobians.emplace_back(
key,
J);
87 if (!actual)
return false;
94 for (
size_t i = 0;
i < actual->size();
i++) {
97 (
Matrix)(actual->getA(actual->begin() +
i)), tolerance);
99 std::cout <<
"Mismatch in Jacobian " <<
i + 1
100 <<
" (base 1), as shown above" << std::endl;
114 #define EXPECT_CORRECT_FACTOR_JACOBIANS(factor, values, numerical_derivative_step, tolerance) \
115 { EXPECT(gtsam::internal::testFactorJacobians(name_, factor, values, numerical_derivative_step, tolerance)); }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
HybridValues retract(const VectorValues &delta) const
JacobianFactor linearizeNumerically(const NoiseModelFactor &factor, const Values &values, double delta=1e-5)
std::shared_ptr< GaussianFactor > linearize(const Values &x) const override
Some functions to compute numerical derivatives.
Vector whitenedError(const Values &c) const
JacobiRotation< float > J
bool testFactorJacobians(const std::string &name_, const NoiseModelFactor &factor, const gtsam::Values &values, double delta, double tolerance)
const gtsam::Symbol key('X', 0)
Non-linear factor base classes.
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
std::uint64_t Key
Integer nonlinear key type.
bool equal(const T &obj1, const T &obj2, double tol)
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:31