formatting and docs update
parent
89768cf692
commit
ad77a45a0d
|
|
@ -36,8 +36,7 @@ GaussianMixture::GaussianMixture(
|
||||||
conditionals_(conditionals) {}
|
conditionals_(conditionals) {}
|
||||||
|
|
||||||
/* *******************************************************************************/
|
/* *******************************************************************************/
|
||||||
const GaussianMixture::Conditionals &
|
const GaussianMixture::Conditionals &GaussianMixture::conditionals() {
|
||||||
GaussianMixture::conditionals() {
|
|
||||||
return conditionals_;
|
return conditionals_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -48,8 +47,8 @@ GaussianMixture GaussianMixture::FromConditionals(
|
||||||
const std::vector<GaussianConditional::shared_ptr> &conditionalsList) {
|
const std::vector<GaussianConditional::shared_ptr> &conditionalsList) {
|
||||||
Conditionals dt(discreteParents, conditionalsList);
|
Conditionals dt(discreteParents, conditionalsList);
|
||||||
|
|
||||||
return GaussianMixture(continuousFrontals, continuousParents,
|
return GaussianMixture(continuousFrontals, continuousParents, discreteParents,
|
||||||
discreteParents, dt);
|
dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *******************************************************************************/
|
/* *******************************************************************************/
|
||||||
|
|
@ -66,8 +65,7 @@ GaussianMixture::Sum GaussianMixture::add(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *******************************************************************************/
|
/* *******************************************************************************/
|
||||||
GaussianMixture::Sum
|
GaussianMixture::Sum GaussianMixture::asGaussianFactorGraphTree() const {
|
||||||
GaussianMixture::asGaussianFactorGraphTree() const {
|
|
||||||
auto lambda = [](const GaussianFactor::shared_ptr &factor) {
|
auto lambda = [](const GaussianFactor::shared_ptr &factor) {
|
||||||
GaussianFactorGraph result;
|
GaussianFactorGraph result;
|
||||||
result.push_back(factor);
|
result.push_back(factor);
|
||||||
|
|
@ -77,8 +75,7 @@ GaussianMixture::asGaussianFactorGraphTree() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *******************************************************************************/
|
/* *******************************************************************************/
|
||||||
bool GaussianMixture::equals(const HybridFactor &lf,
|
bool GaussianMixture::equals(const HybridFactor &lf, double tol) const {
|
||||||
double tol) const {
|
|
||||||
const This *e = dynamic_cast<const This *>(&lf);
|
const This *e = dynamic_cast<const This *>(&lf);
|
||||||
return e != nullptr && BaseFactor::equals(*e, tol);
|
return e != nullptr && BaseFactor::equals(*e, tol);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,14 @@ namespace gtsam {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A conditional of gaussian mixtures indexed by discrete variables, as
|
* @brief A conditional of gaussian mixtures indexed by discrete variables, as
|
||||||
* part of a Bayes Network.
|
* part of a Bayes Network. This is the result of the elimination of a
|
||||||
|
* continuous variable in a hybrid scheme, such that the remaining variables are
|
||||||
|
* discrete+continuous.
|
||||||
*
|
*
|
||||||
* Represents the conditional density P(X | M, Z) where X is a continuous random
|
* Represents the conditional density P(X | M, Z) where X is the set of
|
||||||
* variable, M is the selection of discrete variables corresponding to a subset
|
* continuous random variables, M is the selection of discrete variables
|
||||||
* of the Gaussian variables and Z is parent of this node
|
* corresponding to a subset of the Gaussian variables and Z is parent of this
|
||||||
|
* node .
|
||||||
*
|
*
|
||||||
* The probability P(x|y,z,...) is proportional to
|
* The probability P(x|y,z,...) is proportional to
|
||||||
* \f$ \sum_i k_i \exp - \frac{1}{2} |R_i x - (d_i - S_i y - T_i z - ...)|^2 \f$
|
* \f$ \sum_i k_i \exp - \frac{1}{2} |R_i x - (d_i - S_i y - T_i z - ...)|^2 \f$
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue