#include <HybridFactor.h>

Public Types | |
| typedef Factor | Base |
| Our base class. More... | |
| typedef std::shared_ptr< HybridFactor > | shared_ptr |
| shared_ptr to this class More... | |
| typedef HybridFactor | This |
| This class. More... | |
Public Types inherited from gtsam::Factor | |
| typedef KeyVector::const_iterator | const_iterator |
| Const iterator over keys. More... | |
| typedef KeyVector::iterator | iterator |
| Iterator over keys. More... | |
Public Member Functions | |
Standard Constructors | |
| HybridFactor ()=default | |
| HybridFactor (const KeyVector &keys) | |
| Construct hybrid factor from continuous keys. More... | |
| HybridFactor (const DiscreteKeys &discreteKeys) | |
| Construct hybrid factor from discrete keys. More... | |
| HybridFactor (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys) | |
| Construct a new Hybrid Factor object. More... | |
Testable | |
| virtual bool | equals (const HybridFactor &lf, double tol=1e-9) const |
| equals More... | |
| void | print (const std::string &s="HybridFactor\, const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| print More... | |
Standard Interface | |
| bool | isDiscrete () const |
| True if this is a factor of discrete variables only. More... | |
| bool | isContinuous () const |
| True if this is a factor of continuous variables only. More... | |
| bool | isHybrid () const |
| True is this is a Discrete-Continuous factor. More... | |
| size_t | nrContinuous () const |
| Return the number of continuous variables in this factor. More... | |
| const DiscreteKeys & | discreteKeys () const |
| Return the discrete keys for this factor. More... | |
| const KeyVector & | continuousKeys () const |
| Return only the continuous keys for this factor. More... | |
Public Member Functions inherited from gtsam::Factor | |
| virtual | ~Factor ()=default |
| Default destructor. More... | |
| bool | empty () const |
| Whether the factor is empty (involves zero variables). More... | |
| Key | front () const |
| First key. More... | |
| Key | back () const |
| Last key. More... | |
| const_iterator | find (Key key) const |
| find More... | |
| const KeyVector & | keys () const |
| Access the factor's involved variable keys. More... | |
| const_iterator | begin () const |
| const_iterator | end () const |
| virtual double | error (const HybridValues &c) const |
| size_t | size () const |
| virtual void | printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| print only keys More... | |
| bool | equals (const This &other, double tol=1e-9) const |
| check equality More... | |
| KeyVector & | keys () |
| iterator | begin () |
| iterator | end () |
Protected Attributes | |
| KeyVector | continuousKeys_ |
| Record continuous keys for book-keeping. More... | |
| DiscreteKeys | discreteKeys_ |
Protected Attributes inherited from gtsam::Factor | |
| KeyVector | keys_ |
| The keys involved in this factor. More... | |
Private Attributes | |
| bool | isContinuous_ = false |
| bool | isDiscrete_ = false |
| bool | isHybrid_ = false |
Additional Inherited Members | |
Protected Member Functions inherited from gtsam::Factor | |
| Factor () | |
| template<typename CONTAINER > | |
| Factor (const CONTAINER &keys) | |
| template<typename ITERATOR > | |
| Factor (ITERATOR first, ITERATOR last) | |
Static Protected Member Functions inherited from gtsam::Factor | |
| template<typename CONTAINER > | |
| static Factor | FromKeys (const CONTAINER &keys) |
| template<typename ITERATOR > | |
| static Factor | FromIterators (ITERATOR first, ITERATOR last) |
Base class for truly hybrid probabilistic factors
Examples:
a mixture of Gaussian and discrete distributions over a set of variables.
Definition at line 52 of file HybridFactor.h.
| typedef Factor gtsam::HybridFactor::Base |
Our base class.
Definition at line 69 of file HybridFactor.h.
| typedef std::shared_ptr<HybridFactor> gtsam::HybridFactor::shared_ptr |
shared_ptr to this class
Definition at line 68 of file HybridFactor.h.
This class.
Definition at line 66 of file HybridFactor.h.
|
default |
Default constructor creates empty factor
|
explicit |
Construct hybrid factor from continuous keys.
| keys | Vector of continuous keys. |
Definition at line 52 of file HybridFactor.cpp.
|
explicit |
Construct hybrid factor from discrete keys.
| keys | Vector of discrete keys. |
Definition at line 66 of file HybridFactor.cpp.
| gtsam::HybridFactor::HybridFactor | ( | const KeyVector & | continuousKeys, |
| const DiscreteKeys & | discreteKeys | ||
| ) |
Construct a new Hybrid Factor object.
| continuousKeys | Vector of keys for continuous variables. |
| discreteKeys | Vector of keys for discrete variables. |
Definition at line 56 of file HybridFactor.cpp.
|
inline |
Return only the continuous keys for this factor.
Definition at line 132 of file HybridFactor.h.
|
inline |
Return the discrete keys for this factor.
Definition at line 129 of file HybridFactor.h.
|
virtual |
equals
Reimplemented in gtsam::MixtureFactor, gtsam::HybridConditional, gtsam::GaussianMixture, and gtsam::GaussianMixtureFactor.
Definition at line 73 of file HybridFactor.cpp.
|
inline |
True if this is a factor of continuous variables only.
Definition at line 120 of file HybridFactor.h.
|
inline |
True if this is a factor of discrete variables only.
Definition at line 117 of file HybridFactor.h.
|
inline |
True is this is a Discrete-Continuous factor.
Definition at line 123 of file HybridFactor.h.
|
inline |
Return the number of continuous variables in this factor.
Definition at line 126 of file HybridFactor.h.
|
overridevirtual |
Reimplemented from gtsam::Factor.
Reimplemented in gtsam::MixtureFactor.
Definition at line 82 of file HybridFactor.cpp.
|
protected |
Record continuous keys for book-keeping.
Definition at line 62 of file HybridFactor.h.
|
protected |
Definition at line 60 of file HybridFactor.h.
|
private |
Definition at line 55 of file HybridFactor.h.
|
private |
Definition at line 54 of file HybridFactor.h.
|
private |
Definition at line 56 of file HybridFactor.h.