27 using namespace gtsam;
96 first.insert(0, (
Vector(1) << 1).finished());
100 second.insert(5,
Vector2(6, 7));
101 second.insert(2,
Vector2(4, 5));
118 Vector expSubVector = (
Vector(5) << 1, 4, 5, 6, 7).finished();
138 double dotExpected = test1.
vector().dot(
test2.vector());
139 double dotActual = test1.
dot(
test2);
143 double normExpected = test1.
vector().norm();
144 double normActual = test1.
norm();
148 double sqNormExpected = test1.
vector().norm();
149 double sqNormActual = test1.
norm();
187 x << 1, 2, 3, 4, 5, 6, 7;
195 std::map<Key,size_t> dims;
196 dims.insert(make_pair(0,1));
197 dims.insert(make_pair(1,2));
198 dims.insert(make_pair(2,2));
199 dims.insert(make_pair(5,2));
204 scatter.emplace_back(0,1);
205 scatter.emplace_back(1,2);
206 scatter.emplace_back(2,2);
207 scatter.emplace_back(5,2);
229 std::map<Key,size_t> dims;
230 dims.insert(make_pair(0,1));
231 dims.insert(make_pair(5,2));
255 " 0: 1\n 1: 2 3\n 2: 4 5\n 5: 6 7\n 7: 8 9\n";
272 "<table class='VectorValues'>\n"
274 " <tr><th>Variable</th><th>value</th></tr>\n"
277 " <tr><th>x1</th><td> 2 3.1</td></tr>\n"
278 " <tr><th>x2</th><td> 4 5.2</td></tr>\n"
279 " <tr><th>x5</th><td> 6 7.3</td></tr>\n"
280 " <tr><th>x7</th><td> 8 9.4</td></tr>\n"
284 string actual =
vv.
html();