28 #include <boost/assign/std/list.hpp> 29 #include <boost/assign/std/vector.hpp> 30 #include <boost/assign/list_inserter.hpp> 31 #include <boost/make_shared.hpp> 32 #include <boost/assign/list_of.hpp> 38 using namespace gtsam;
42 static const double tol = 1
e-5;
46 0., 4.6904).finished();
53 5.0254, 5.5432).finished();
56 5.5737, 3.0153).finished();
59 -3.0153, -3.5635).finished();
64 vector<pair<Key, Matrix> > terms = pair_list_of
108 A1(0,0) = 1 ; A1(1,0) = 2;
109 A1(0,1) = 3 ; A1(1,1) = 4;
112 A2(0,0) = 6 ; A2(1,0) = 0.2;
113 A2(0,1) = 8 ; A2(1,1) = 0.4;
116 R(0,0) = 0.1 ;
R(1,0) = 0.3;
117 R(0,1) = 0.0 ;
R(1,1) = 0.34;
124 expected(1, d, R, 2, A1, 10, A2, model),
125 actual(1, d, R, 2, A1, 10, A2, model);
135 expectedX(0) = 20-3-11 ; expectedX(1) = 40-7-15;
151 Vector sx1(2); sx1 << 1.0, 1.0;
152 Vector sl1(2); sl1 << 1.0, 1.0;
173 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 0.1,
174 0.0, 1.0, 0.0, 2.0, 0.0, 3.0, 0.2,
175 0.0, 0.0, 3.0, 0.0, 4.0, 0.0, 0.3,
176 0.0, 0.0, 0.0, 3.0, 0.0, 4.0, 0.4;
190 (1, (
Vector(4) << -3.1,-3.4,-11.9,-13.2).finished());
207 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 0.1,
208 0.0, 1.0, 0.0, 2.0, 0.0, 3.0, 0.2,
209 0.0, 0.0, 3.0, 0.0, 4.0, 0.0, 0.3,
210 0.0, 0.0, 0.0, 3.0, 0.0, 4.0, 0.4;
246 Matrix R11 = (
Matrix(1, 1) << 1.0).finished(), S12 = (
Matrix(1, 1) << 1.0).finished();
262 x = map_list_of<Key, Vector>
263 (1, (
Vector(1) << 2.).finished())
264 (2, (
Vector(1) << 5.).finished()),
265 y = map_list_of<Key, Vector>
266 (1, (
Vector(1) << 2.).finished())
267 (2, (
Vector(1) << 3.).finished());
288 Matrix IExpected = R.transpose() *
R;
Provides additional testing facilities for common data structures.
static int runAllTests(TestResult &result)
noiseModel::Diagonal::shared_ptr model
FACTOR::const_iterator endParents() const
const Matrix & matrix() const
A matrix with column blocks of pre-defined sizes. Used in JacobianFactor and GaussianConditional.
FACTOR::const_iterator beginParents() const
#define EXPECT(condition)
FACTOR::const_iterator endFrontals() const
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Conditional Gaussian Base class.
const constBVector d() const
const SharedDiagonal & get_model() const
noiseModel::Diagonal::shared_ptr SharedDiagonal
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
FACTOR::const_iterator beginFrontals() const
#define EXPECT_LONGS_EQUAL(expected, actual)
static shared_ptr Sigmas(const Vector &sigmas, bool smart=true)
VectorValues solve(const VectorValues &parents) const
TEST(LPInitSolver, InfiniteLoopSingleVar)
Chordal Bayes Net, the result of eliminating a factor graph.
KeyVector::const_iterator const_iterator
Const iterator over keys.
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
iterator insert(const std::pair< Key, Vector > &key_value)
std::uint64_t Key
Integer nonlinear key type.
Matrix information() const override
VectorValues backSubstituteTranspose(const VectorValues &gx) const