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);
68 jacobians.emplace_back(
key,
J);
86 std::dynamic_pointer_cast<JacobianFactor>(
factor.linearize(
values));
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
DecisionTreeFactor factor(D &C &B &A, "0.0 0.0 0.0 0.60658897 0.61241912 0.61241969 0.61247685 0.61247742 0.0 " "0.0 0.0 0.99995287 1.0 1.0 1.0 1.0")
JacobianFactor linearizeNumerically(const NoiseModelFactor &factor, const Values &values, double delta=1e-5)
Some functions to compute numerical derivatives.
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 Wed Jan 1 2025 04:01:31