gtsam  4.0.0
gtsam
GaussianBayesTree.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
20 #pragma once
21 
26 
27 namespace gtsam {
28 
29  // Forward declarations
30  class GaussianConditional;
31  class VectorValues;
32 
33  /* ************************************************************************* */
35  class GTSAM_EXPORT GaussianBayesTreeClique :
36  public BayesTreeCliqueBase<GaussianBayesTreeClique, GaussianFactorGraph>
37  {
38  public:
41  typedef boost::shared_ptr<This> shared_ptr;
42  typedef boost::weak_ptr<This> weak_ptr;
44  GaussianBayesTreeClique(const boost::shared_ptr<GaussianConditional>& conditional) : Base(conditional) {}
45  };
46 
47  /* ************************************************************************* */
49  class GTSAM_EXPORT GaussianBayesTree :
50  public BayesTree<GaussianBayesTreeClique>
51  {
52  private:
54 
55  public:
56  typedef GaussianBayesTree This;
57  typedef boost::shared_ptr<This> shared_ptr;
58 
61 
63  bool equals(const This& other, double tol = 1e-9) const;
64 
66  VectorValues optimize() const;
67 
93  VectorValues optimizeGradientSearch() const;
94 
100  VectorValues gradient(const VectorValues& x0) const;
101 
107  VectorValues gradientAtZero() const;
108 
110  double error(const VectorValues& x) const;
111 
117  double determinant() const;
118 
124  double logDeterminant() const;
125 
128  Matrix marginalCovariance(Key key) const;
129  };
130 
132  template<>
133  struct traits<GaussianBayesTree> : public Testable<GaussianBayesTree> {
134  };
135 
136 } //\ namespace gtsam
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Optimize for triangulation.
Definition: triangulation.cpp:73
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:57
Template to create a binary predicate.
Definition: Testable.h:110
Chordal Bayes Net, the result of eliminating a factor graph.
This is the base class for BayesTree cliques.
Definition: BayesTreeCliqueBase.h:48
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
Definition: BayesTree.h:64
A Bayes tree representing a Gaussian density.
Definition: GaussianBayesTree.h:49
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:73
Base class for cliques of a BayesTree.
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
A clique in a GaussianBayesTree.
Definition: GaussianBayesTree.h:35
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
Linear Factor Graph where all factors are Gaussians.
Bayes Tree is a tree of cliques of a Bayes Chain.
GaussianBayesTree()
Default constructor, creates an empty Bayes tree.
Definition: GaussianBayesTree.h:60