missing include and formatting
parent
f39f678c14
commit
7603cd4871
|
@ -22,6 +22,8 @@
|
||||||
#include <gtsam/hybrid/HybridGaussianISAM.h>
|
#include <gtsam/hybrid/HybridGaussianISAM.h>
|
||||||
#include <gtsam/inference/DotWriter.h>
|
#include <gtsam/inference/DotWriter.h>
|
||||||
|
|
||||||
|
#include <numeric>
|
||||||
|
|
||||||
#include "Switching.h"
|
#include "Switching.h"
|
||||||
|
|
||||||
// Include for test suite
|
// Include for test suite
|
||||||
|
@ -62,7 +64,8 @@ std::vector<GaussianFactor::shared_ptr> components(Key key) {
|
||||||
} // namespace two
|
} // namespace two
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
TEST(HybridGaussianFactorGraph, eliminateFullMultifrontalSimple) {
|
TEST(HybridGaussianFactorGraph,
|
||||||
|
HybridGaussianFactorGraphEliminateFullMultifrontalSimple) {
|
||||||
HybridGaussianFactorGraph hfg;
|
HybridGaussianFactorGraph hfg;
|
||||||
|
|
||||||
hfg.add(JacobianFactor(X(0), I_3x3, Z_3x1));
|
hfg.add(JacobianFactor(X(0), I_3x3, Z_3x1));
|
||||||
|
@ -179,10 +182,8 @@ TEST(HybridGaussianFactorGraph, Switching) {
|
||||||
std::vector<int> naturalX(N);
|
std::vector<int> naturalX(N);
|
||||||
std::iota(naturalX.begin(), naturalX.end(), 1);
|
std::iota(naturalX.begin(), naturalX.end(), 1);
|
||||||
std::vector<Key> ordX;
|
std::vector<Key> ordX;
|
||||||
std::transform(
|
std::transform(naturalX.begin(), naturalX.end(), std::back_inserter(ordX),
|
||||||
naturalX.begin(), naturalX.end(), std::back_inserter(ordX), [](int x) {
|
[](int x) { return X(x); });
|
||||||
return X(x);
|
|
||||||
});
|
|
||||||
|
|
||||||
auto [ndX, lvls] = makeBinaryOrdering(ordX);
|
auto [ndX, lvls] = makeBinaryOrdering(ordX);
|
||||||
std::copy(ndX.begin(), ndX.end(), std::back_inserter(ordering));
|
std::copy(ndX.begin(), ndX.end(), std::back_inserter(ordering));
|
||||||
|
@ -195,10 +196,8 @@ TEST(HybridGaussianFactorGraph, Switching) {
|
||||||
std::vector<int> naturalC(N - 1);
|
std::vector<int> naturalC(N - 1);
|
||||||
std::iota(naturalC.begin(), naturalC.end(), 1);
|
std::iota(naturalC.begin(), naturalC.end(), 1);
|
||||||
std::vector<Key> ordC;
|
std::vector<Key> ordC;
|
||||||
std::transform(
|
std::transform(naturalC.begin(), naturalC.end(), std::back_inserter(ordC),
|
||||||
naturalC.begin(), naturalC.end(), std::back_inserter(ordC), [](int x) {
|
[](int x) { return M(x); });
|
||||||
return M(x);
|
|
||||||
});
|
|
||||||
|
|
||||||
// std::copy(ordC.begin(), ordC.end(), std::back_inserter(ordering));
|
// std::copy(ordC.begin(), ordC.end(), std::back_inserter(ordering));
|
||||||
const auto [ndC, lvls] = makeBinaryOrdering(ordC);
|
const auto [ndC, lvls] = makeBinaryOrdering(ordC);
|
||||||
|
@ -237,10 +236,8 @@ TEST(HybridGaussianFactorGraph, SwitchingISAM) {
|
||||||
std::vector<int> naturalX(N);
|
std::vector<int> naturalX(N);
|
||||||
std::iota(naturalX.begin(), naturalX.end(), 1);
|
std::iota(naturalX.begin(), naturalX.end(), 1);
|
||||||
std::vector<Key> ordX;
|
std::vector<Key> ordX;
|
||||||
std::transform(
|
std::transform(naturalX.begin(), naturalX.end(), std::back_inserter(ordX),
|
||||||
naturalX.begin(), naturalX.end(), std::back_inserter(ordX), [](int x) {
|
[](int x) { return X(x); });
|
||||||
return X(x);
|
|
||||||
});
|
|
||||||
|
|
||||||
auto [ndX, lvls] = makeBinaryOrdering(ordX);
|
auto [ndX, lvls] = makeBinaryOrdering(ordX);
|
||||||
std::copy(ndX.begin(), ndX.end(), std::back_inserter(ordering));
|
std::copy(ndX.begin(), ndX.end(), std::back_inserter(ordering));
|
||||||
|
@ -253,10 +250,8 @@ TEST(HybridGaussianFactorGraph, SwitchingISAM) {
|
||||||
std::vector<int> naturalC(N - 1);
|
std::vector<int> naturalC(N - 1);
|
||||||
std::iota(naturalC.begin(), naturalC.end(), 1);
|
std::iota(naturalC.begin(), naturalC.end(), 1);
|
||||||
std::vector<Key> ordC;
|
std::vector<Key> ordC;
|
||||||
std::transform(
|
std::transform(naturalC.begin(), naturalC.end(), std::back_inserter(ordC),
|
||||||
naturalC.begin(), naturalC.end(), std::back_inserter(ordC), [](int x) {
|
[](int x) { return M(x); });
|
||||||
return M(x);
|
|
||||||
});
|
|
||||||
|
|
||||||
// std::copy(ordC.begin(), ordC.end(), std::back_inserter(ordering));
|
// std::copy(ordC.begin(), ordC.end(), std::back_inserter(ordering));
|
||||||
const auto [ndC, lvls] = makeBinaryOrdering(ordC);
|
const auto [ndC, lvls] = makeBinaryOrdering(ordC);
|
||||||
|
|
Loading…
Reference in New Issue