24 #include <boost/assign/std/vector.hpp> 25 #include <boost/assign/std/map.hpp> 26 #include <boost/assign/list_of.hpp> 29 using namespace gtsam;
37 Matrix A1 = I_2x2, A2 = I_2x2, A3 = I_2x2;
39 vector<pair<Key, Matrix> > terms;
40 terms += make_pair(0, A1), make_pair(1, A2), make_pair(3, A3);
63 RegularHessianFactor<2> factor2(0, 1, 3, G11, G12, G13, g1, G22, G23, g2, G33, g3, f);
68 vector<Matrix> Gs; Gs += G11, G12, G13, G22, G23, G33;
69 vector<Vector> gs; gs +=
g1,
g2, g3;
85 vector<size_t> dims; dims += 2, 2, 2;
94 HessianFactor::const_iterator i1 = factor.
begin();
95 HessianFactor::const_iterator i2 = i1 + 1;
97 Vector Y(6); Y << 9, 12, 9, 12, 9, 12;
106 expected.insert(0, Y.segment<2>(0));
107 expected.insert(1, Y.segment<2>(2));
108 expected.insert(3, Y.segment<2>(4));
113 actualVV.
insert(0, Vector2::Zero());
114 actualVV.
insert(1, Vector2::Zero());
115 actualVV.
insert(3, Vector2::Zero());
120 Vector expected_y(8); expected_y << 9, 12, 9, 12, 0, 0, 9, 12;
121 Vector fast_y = Vector8::Zero();
122 double xvalues[8] = {1,2,3,4,0,0,5,6};
static int runAllTests(TestResult &result)
JacobianFactor factor3(keyY, A32, keyZ, A33, b3, noiseModel::Isotropic::Sigma(2, sigma3))
Matrix augmentedInformation() const override
const SymmetricBlockMatrix & info() const
Return underlying information matrix.
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
const_iterator begin() const
#define EXPECT(condition)
Matrix information() const override
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
HessianFactor class with constant sized blocks.
Linear Factor Graph where all factors are Gaussians.
TEST(RegularHessianFactor, Constructors)
constBlock aboveDiagonalBlock(DenseIndex I, DenseIndex J) const
Get block above the diagonal (I, J).
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
Pose3 g1(Rot3(), Point3(100.0, 0.0, 300.0))
JacobianFactor factor2(keyX, A21, keyY, A22, b2, noiseModel::Isotropic::Sigma(2, sigma2))
Eigen::SelfAdjointView< Block, Eigen::Upper > diagonalBlock(DenseIndex J)
Return the J'th diagonal block as a self adjoint view.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Pose3 g2(g1.expmap(h *V1_g1))
iterator insert(const std::pair< Key, Vector > &key_value)
void multiplyHessianAdd(double alpha, const VectorValues &x, VectorValues &y) const override