|
GTSAM
4.0.2
C++ library for smoothing and mapping (SAM)
|
Implementation of a discrete conditional mixture factor. Implements a joint discrete-continuous factor where the discrete variable serves to "select" a mixture component corresponding to a GaussianFactor type of measurement. More...
#include <GaussianMixtureFactor.h>


Public Types | |
| using | Base = HybridFactor |
| using | This = GaussianMixtureFactor |
| using | shared_ptr = std::shared_ptr< This > |
| using | sharedFactor = std::shared_ptr< GaussianFactor > |
| using | Factors = DecisionTree< Key, sharedFactor > |
| typedef for Decision Tree of Gaussian factors and log-constant. | |
| typedef KeyVector::iterator | iterator |
| Iterator over keys. | |
| typedef KeyVector::const_iterator | const_iterator |
| Const iterator over keys. | |
Public Member Functions | |
Constructors | |
| GaussianMixtureFactor ()=default | |
| Default constructor, mainly for serialization. | |
| GaussianMixtureFactor (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys, const Factors &factors) | |
| Construct a new Gaussian mixture factor. More... | |
| GaussianMixtureFactor (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys, const std::vector< sharedFactor > &factors) | |
| Construct a new GaussianMixtureFactor object using a vector of GaussianFactor shared pointers. More... | |
Testable | |
| bool | equals (const HybridFactor &lf, double tol=1e-9) const override |
| equals | |
| void | print (const std::string &s="GaussianMixtureFactor\, const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| print | |
Testable | |
| bool | equals (const This &other, double tol=1e-9) const |
| check equality | |
| virtual void | printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| print only keys | |
Standard Interface | |
| bool | isDiscrete () const |
| True if this is a factor of discrete variables only. | |
| bool | isContinuous () const |
| True if this is a factor of continuous variables only. | |
| bool | isHybrid () const |
| True is this is a Discrete-Continuous factor. | |
| size_t | nrContinuous () const |
| Return the number of continuous variables in this factor. | |
| const DiscreteKeys & | discreteKeys () const |
| Return the discrete keys for this factor. | |
| const KeyVector & | continuousKeys () const |
| Return only the continuous keys for this factor. | |
Standard Interface | |
| bool | empty () const |
| Whether the factor is empty (involves zero variables). | |
| Key | front () const |
| First key. | |
| Key | back () const |
| Last key. | |
| const_iterator | find (Key key) const |
| find | |
| const KeyVector & | keys () const |
| Access the factor's involved variable keys. | |
| const_iterator | begin () const |
| const_iterator | end () const |
| size_t | size () const |
Advanced Interface | |
| KeyVector & | keys () |
| iterator | begin () |
| iterator | end () |
Static Protected Member Functions | |
Standard Constructors | |
| template<typename CONTAINER > | |
| static Factor | FromKeys (const CONTAINER &keys) |
| template<typename ITERATOR > | |
| static Factor | FromIterators (ITERATOR first, ITERATOR last) |
Protected Attributes | |
| DiscreteKeys | discreteKeys_ |
| KeyVector | continuousKeys_ |
| Record continuous keys for book-keeping. | |
| KeyVector | keys_ |
| The keys involved in this factor. | |
Standard API | |
| sharedFactor | operator() (const DiscreteValues &assignment) const |
| Get factor at a given discrete assignment. | |
| GaussianFactorGraphTree | add (const GaussianFactorGraphTree &sum) const |
Combine the Gaussian Factor Graphs in sum and this while maintaining the original tree structure. More... | |
| AlgebraicDecisionTree< Key > | error (const VectorValues &continuousValues) const |
| Compute error of the GaussianMixtureFactor as a tree. More... | |
| double | error (const HybridValues &values) const override |
| Compute the log-likelihood, including the log-normalizing constant. More... | |
| GaussianFactorGraphTree & | operator+= (GaussianFactorGraphTree &sum, const GaussianMixtureFactor &factor) |
| Add MixtureFactor to a Sum, syntactic sugar. | |
Implementation of a discrete conditional mixture factor. Implements a joint discrete-continuous factor where the discrete variable serves to "select" a mixture component corresponding to a GaussianFactor type of measurement.
Represents the underlying Gaussian mixture as a Decision Tree, where the set of discrete variables indexes to the continuous gaussian distribution.
| gtsam::GaussianMixtureFactor::GaussianMixtureFactor | ( | const KeyVector & | continuousKeys, |
| const DiscreteKeys & | discreteKeys, | ||
| const Factors & | factors | ||
| ) |
Construct a new Gaussian mixture factor.
| continuousKeys | A vector of keys representing continuous variables. |
| discreteKeys | A vector of keys representing discrete variables and their cardinalities. |
| factors | The decision tree of Gaussian factors stored as the mixture density. |
|
inline |
Construct a new GaussianMixtureFactor object using a vector of GaussianFactor shared pointers.
| continuousKeys | Vector of keys for continuous factors. |
| discreteKeys | Vector of discrete keys. |
| factors | Vector of gaussian factor shared pointers. |
| GaussianFactorGraphTree gtsam::GaussianMixtureFactor::add | ( | const GaussianFactorGraphTree & | sum | ) | const |
|
inlineinherited |
Iterator at beginning of involved variable keys
|
inlineinherited |
Iterator at beginning of involved variable keys
|
inlineinherited |
Iterator at end of involved variable keys
|
inlineinherited |
Iterator at end of involved variable keys
| AlgebraicDecisionTree<Key> gtsam::GaussianMixtureFactor::error | ( | const VectorValues & | continuousValues | ) | const |
Compute error of the GaussianMixtureFactor as a tree.
| continuousValues | The continuous VectorValues. |
|
overridevirtual |
Compute the log-likelihood, including the log-normalizing constant.
Reimplemented from gtsam::Factor.
|
inlinestaticprotectedinherited |
Construct factor from iterator keys. This is called internally from derived factor static factor methods, as a workaround for not being able to call the protected constructors above.
|
inlinestaticprotectedinherited |
Construct factor from container of keys. This is called internally from derived factor static factor methods, as a workaround for not being able to call the protected constructors above.
|
inlineinherited |
|
inlineinherited |
1.8.13