29 #include <boost/assign/std/list.hpp> 33 using namespace gtsam;
45 static const double tol = 1
e-4;
68 GaussianBayesTree::sharedClique
R = bayesTree.
roots().front();
73 GaussianBayesTree::sharedClique
C2 = bayesTree[
X(5)];
79 Matrix A56 = (
Matrix(2,2) << -0.382022,0.,0.,-0.382022).finished();
82 GaussianBayesTree::sharedClique C3 = bayesTree[
X(4)];
87 double sigma4 = 0.661968;
88 Matrix A46 = (
Matrix(2,2) << -0.146067,0.,0.,-0.146067).finished();
91 GaussianBayesTree::sharedClique C4 = bayesTree[
X(3)];
122 ordering +=
X(1),
X(3),
X(5),
X(7),
X(2),
X(6),
X(4);
126 VectorValues expectedSolution = VectorValues::Zero(actualSolution);
137 Matrix actualCovarianceX1;
144 double sigx2 = 0.68712938;
173 ordering +=
X(1),
X(3),
X(5),
X(7),
X(2),
X(6),
X(4);
178 GaussianBayesTree::sharedClique
R = bayesTree.
roots().front();
183 GaussianBayesTree::sharedClique
C2 = bayesTree[
X(3)];
234 ordering +=
X(1),
X(3),
X(5),
X(7),
X(2),
X(6),
X(4);
245 const Matrix I = I_2x2,
A = -0.00429185*
I;
265 double sig14 = 0.784465;
298 fg.
add(1, (
Matrix(1, 1) << 1.0).finished(), 3, (
Matrix(1, 1) << 2.0).finished(), 5, (
Matrix(1, 1) << 3.0).finished(), (
Vector(1) << 4.0).finished(), model);
299 fg.
add(1, (
Matrix(1, 1) << 5.0).finished(), (
Vector(1) << 6.0).finished(), model);
300 fg.
add(2, (
Matrix(1, 1) << 7.0).finished(), 4, (
Matrix(1, 1) << 8.0).finished(), 5, (
Matrix(1, 1) << 9.0).finished(), (
Vector(1) << 10.0).finished(), model);
301 fg.
add(2, (
Matrix(1, 1) << 11.0).finished(), (
Vector(1) << 12.0).finished(), model);
302 fg.
add(5, (
Matrix(1, 1) << 13.0).finished(), 6, (
Matrix(1, 1) << 14.0).finished(), (
Vector(1) << 15.0).finished(), model);
303 fg.
add(6, (
Matrix(1, 1) << 17.0).finished(), 7, (
Matrix(1, 1) << 18.0).finished(), (
Vector(1) << 19.0).finished(), model);
304 fg.
add(7, (
Matrix(1, 1) << 20.0).finished(), (
Vector(1) << 21.0).finished(), model);
325 expectedJointJ.row(0) = -expectedJointJ.row(0);
328 expectedJointJ.row(1) = -expectedJointJ.row(1);
GaussianFactorGraph createSmoother(int T)
static int runAllTests(TestResult &result)
noiseModel::Diagonal::shared_ptr model
static enum @843 ordering
boost::shared_ptr< BayesTreeType > eliminateMultifrontal(OptionalOrderingType orderingType=boost::none, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex=boost::none) const
Rot2 R(Rot2::fromAngle(0.1))
bool signbit(const mpreal &x)
Matrix augmentedJacobian(const Ordering &ordering) const
TEST(GaussianBayesTree, linear_smoother_shortcuts)
sharedConditional marginalFactor(Key j, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
void add(const GaussianFactor &factor)
std::pair< boost::shared_ptr< GaussianConditional >, boost::shared_ptr< HessianFactor > > EliminateCholesky(const GaussianFactorGraph &factors, const Ordering &keys)
sharedBayesNet jointBayesNet(Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
#define EXPECT(condition)
Contains the HessianFactor class, a general quadratic factor.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Conditional Gaussian Base class.
boost::shared_ptr< Diagonal > shared_ptr
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
#define LONGS_EQUAL(expected, actual)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
VectorValues optimize() const
Create small example with two poses and one landmark.
Chordal Bayes Net, the result of eliminating a factor graph.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
std::pair< GaussianConditional::shared_ptr, JacobianFactor::shared_ptr > EliminateQR(const GaussianFactorGraph &factors, const Ordering &keys)
Gaussian Bayes Tree, the result of eliminating a GaussianJunctionTree.
static const Eigen::MatrixBase< Vector2 >::ConstantReturnType Z_2x1
const Roots & roots() const