GaussianDensity.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 
19 // \callgraph
20 #pragma once
21 
23 
24 namespace gtsam {
25 
32  class GTSAM_EXPORT GaussianDensity : public GaussianConditional {
33 
34  public:
35 
36  typedef std::shared_ptr<GaussianDensity> shared_ptr;
37 
41  }
42 
44  GaussianDensity(const GaussianConditional& conditional) :
45  GaussianConditional(conditional) {
46  if(conditional.nrParents() != 0)
47  throw std::invalid_argument("GaussianDensity can only be created from a conditional with no parents");
48  }
49 
51  GaussianDensity(Key key, const Vector& d, const Matrix& R, const SharedDiagonal& noiseModel = SharedDiagonal()) :
52  GaussianConditional(key, d, R, noiseModel) {}
53 
55  static GaussianDensity FromMeanAndStddev(Key key, const Vector& mean,
56  double sigma);
57 
59  void print(const std::string& = "GaussianDensity",
60  const KeyFormatter& formatter = DefaultKeyFormatter) const override;
61 
63  Vector mean() const;
64 
66  Matrix covariance() const;
67 
68  };
69  // GaussianDensity
70 
71 }// gtsam
GaussianConditional.h
Conditional Gaussian Base class.
d
static const double d[K][N]
Definition: igam.h:11
formatter
const KeyFormatter & formatter
Definition: treeTraversal-inst.h:204
gtsam::Matrix
Eigen::MatrixXd Matrix
Definition: base/Matrix.h:39
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:39
sampling::sigma
static const double sigma
Definition: testGaussianBayesNet.cpp:170
gtsam::DefaultKeyFormatter
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition: Key.cpp:30
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:156
gtsam::KeyFormatter
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
gtsam::GaussianConditional
Definition: GaussianConditional.h:40
gtsam::SharedDiagonal
noiseModel::Diagonal::shared_ptr SharedDiagonal
Definition: NoiseModel.h:764
gtsam::GaussianDensity::GaussianDensity
GaussianDensity(const GaussianConditional &conditional)
Copy constructor from GaussianConditional.
Definition: GaussianDensity.h:44
gtsam::GaussianDensity
Definition: GaussianDensity.h:32
key
const gtsam::Symbol key('X', 0)
gtsam
traits
Definition: SFMdata.h:40
gtsam::mean
Point3 mean(const CONTAINER &points)
mean
Definition: Point3.h:75
gtsam::GaussianDensity::GaussianDensity
GaussianDensity(Key key, const Vector &d, const Matrix &R, const SharedDiagonal &noiseModel=SharedDiagonal())
constructor using d, R
Definition: GaussianDensity.h:51
gtsam::GaussianDensity::GaussianDensity
GaussianDensity()
default constructor needed for serialization
Definition: GaussianDensity.h:39
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:97
gtsam::GaussianDensity::shared_ptr
std::shared_ptr< GaussianDensity > shared_ptr
Definition: GaussianDensity.h:36
gtsam::Conditional::nrParents
size_t nrParents() const
Definition: Conditional.h:134
R
Rot2 R(Rot2::fromAngle(0.1))


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:34