25 using namespace gtsam;
34 const vector<pair<Key, Matrix> > terms {{0,
A1}, {1,
A2}, {3,
A3}};
57 RegularHessianFactor<2> factor2(0, 1, 3, G11, G12, G13,
g1, G22, G23,
g2, G33, g3,
f);
62 vector<Matrix> Gs {G11, G12, G13, G22, G23, G33};
63 vector<Vector> gs {
g1,
g2, g3};
79 vector<size_t> dims {2, 2, 2};
89 HessianFactor::const_iterator i2 =
i1 + 1;
91 Vector Y(6);
Y << 9, 12, 9, 12, 9, 12;
104 actualVV.
insert(0, Vector2::Zero());
105 actualVV.
insert(1, Vector2::Zero());
106 actualVV.
insert(3, Vector2::Zero());
111 Vector expected_y(8); expected_y << 9, 12, 9, 12, 0, 0, 9, 12;
112 Vector fast_y = Vector8::Zero();
113 double xvalues[8] = {1,2,3,4,0,0,5,6};
114 factor.multiplyHessianAdd(
alpha, xvalues, fast_y.data());
118 factor.multiplyHessianAdd(
alpha, xvalues, fast_y.data());