Loading...
Searching...
No Matches
GaussianDensity.h
Go to the documentation of this file.
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* -------------------------------------------------------------------------- */
// \callgraph
#pragma once
#include <gtsam/linear/GaussianConditional.h>
namespace gtsam {
class GTSAM_EXPORT GaussianDensity : public GaussianConditional {
public:
typedef boost::shared_ptr<GaussianDensity> shared_ptr;
GaussianDensity() :
GaussianConditional() {
}
GaussianDensity(const GaussianConditional& conditional) :
GaussianConditional(conditional) {
if(conditional.nrParents() != 0)
throw std::invalid_argument("GaussianDensity can only be created from a conditional with no parents");
}
GaussianDensity(Key key, const Vector& d, const Matrix& R, const SharedDiagonal& noiseModel = SharedDiagonal()) :
GaussianConditional(key, d, R, noiseModel) {}
static GaussianDensity FromMeanAndStddev(Key key, const Vector& mean,
double sigma);
void print(const std::string& = "GaussianDensity",
const KeyFormatter& formatter = DefaultKeyFormatter) const override;
Vector mean() const;
Matrix covariance() const;
};
// GaussianDensity
}// gtsam
GaussianConditional.h
Conditional Gaussian Base class.
gtsam
Global functions in a separate testing namespace.
Definition chartTesting.h:28
gtsam::mean
Point3 mean(const CONTAINER &points)
mean
Definition Point3.h:68
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
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::Key
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:100
gtsam::noiseModel
All noise models live in the noiseModel namespace.
Definition LossFunctions.cpp:27
gtsam::Conditional::nrParents
size_t nrParents() const
return the number of parents
Definition Conditional.h:113
gtsam::GaussianConditional::R
constABlock R() const
Return a view of the upper-triangular R block of the conditional.
Definition GaussianConditional.h:218
gtsam::GaussianConditional::GaussianConditional
GaussianConditional()
default constructor needed for serialization
Definition GaussianConditional.h:54
gtsam::GaussianConditional::d
const constBVector d() const
Get a view of the r.h.s.
Definition GaussianConditional.h:227
gtsam::GaussianDensity
A GaussianDensity is a GaussianConditional without parents.
Definition GaussianDensity.h:32
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::GaussianDensity::GaussianDensity
GaussianDensity(const GaussianConditional &conditional)
Copy constructor from GaussianConditional.
Definition GaussianDensity.h:44