2009-08-22 06:23:24 +08:00
|
|
|
/**
|
2009-11-01 03:53:20 +08:00
|
|
|
* @file GaussianBayesNet.h
|
2009-08-22 06:23:24 +08:00
|
|
|
* @brief Chordal Bayes Net, the result of eliminating a factor graph
|
2009-11-01 03:53:20 +08:00
|
|
|
* @brief GaussianBayesNet
|
2009-08-22 06:23:24 +08:00
|
|
|
* @author Frank Dellaert
|
|
|
|
*/
|
|
|
|
|
|
|
|
// \callgraph
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
#include "ConditionalGaussian.h"
|
2009-11-01 03:53:20 +08:00
|
|
|
#include "BayesNet.h"
|
2009-08-22 06:23:24 +08:00
|
|
|
|
|
|
|
namespace gtsam {
|
|
|
|
|
2009-11-09 15:04:26 +08:00
|
|
|
/** A Bayes net made from linear-Gaussian densities */
|
|
|
|
typedef BayesNet<ConditionalGaussian> GaussianBayesNet;
|
2009-08-22 06:23:24 +08:00
|
|
|
|
2009-11-09 06:50:26 +08:00
|
|
|
/** Create a scalar Gaussian */
|
2009-11-09 15:04:26 +08:00
|
|
|
GaussianBayesNet scalarGaussian(const std::string& key, double mu=0.0, double sigma=1.0);
|
2009-11-09 06:50:26 +08:00
|
|
|
|
|
|
|
/** Create a simple Gaussian on a single multivariate variable */
|
2009-11-09 15:04:26 +08:00
|
|
|
GaussianBayesNet simpleGaussian(const std::string& key, const Vector& mu, double sigma=1.0);
|
2009-08-22 06:23:24 +08:00
|
|
|
|
2009-10-27 22:14:36 +08:00
|
|
|
/**
|
|
|
|
* optimize, i.e. return x = inv(R)*d
|
|
|
|
*/
|
2009-11-09 15:04:26 +08:00
|
|
|
VectorConfig optimize(const GaussianBayesNet&);
|
2009-08-22 06:23:24 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return (dense) upper-triangular matrix representation
|
|
|
|
*/
|
2009-11-09 15:04:26 +08:00
|
|
|
std::pair<Matrix, Vector> matrix(const GaussianBayesNet&);
|
2009-08-22 06:23:24 +08:00
|
|
|
|
|
|
|
} /// namespace gtsam
|