#include <HybridFactor.h>

Public Types | |
| typedef Factor | Base |
| Our base class. More... | |
| enum | Category { Category::None, Category::Discrete, Category::Continuous, Category::Hybrid } |
| Enum to help with categorizing hybrid factors. 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\n", 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... | |
| virtual AlgebraicDecisionTree< Key > | errorTree (const VectorValues &values) const =0 |
| Compute tree of linear errors. More... | |
| virtual std::shared_ptr< Factor > | restrict (const DiscreteValues &discreteValues) const =0 |
| Restrict the factor to the given discrete values. 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 | |
| Category | category_ = Category::None |
| Record what category of HybridFactor this is. More... | |
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 51 of file HybridFactor.h.
| typedef Factor gtsam::HybridFactor::Base |
Our base class.
Definition at line 71 of file HybridFactor.h.
| typedef std::shared_ptr<HybridFactor> gtsam::HybridFactor::shared_ptr |
shared_ptr to this class
Definition at line 70 of file HybridFactor.h.
This class.
Definition at line 68 of file HybridFactor.h.
|
strong |
Enum to help with categorizing hybrid factors.
| Enumerator | |
|---|---|
| None | |
| Discrete | |
| Continuous | |
| Hybrid | |
Definition at line 54 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 54 of file HybridFactor.cpp.
|
explicit |
Construct hybrid factor from discrete keys.
| keys | Vector of discrete keys. |
Definition at line 81 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 73 of file HybridFactor.cpp.
|
inline |
Return only the continuous keys for this factor.
Definition at line 134 of file HybridFactor.h.
|
inline |
Return the discrete keys for this factor.
Definition at line 131 of file HybridFactor.h.
|
virtual |
equals
Reimplemented in gtsam::HybridNonlinearFactor, gtsam::HybridConditional, gtsam::HybridGaussianConditional, and gtsam::HybridGaussianFactor.
Definition at line 88 of file HybridFactor.cpp.
|
pure virtual |
Compute tree of linear errors.
Implemented in gtsam::HybridConditional, gtsam::HybridGaussianFactor, and gtsam::HybridNonlinearFactor.
|
inline |
True if this is a factor of continuous variables only.
Definition at line 122 of file HybridFactor.h.
|
inline |
True if this is a factor of discrete variables only.
Definition at line 119 of file HybridFactor.h.
|
inline |
True is this is a Discrete-Continuous factor.
Definition at line 125 of file HybridFactor.h.
|
inline |
Return the number of continuous variables in this factor.
Definition at line 128 of file HybridFactor.h.
|
overridevirtual |
Reimplemented from gtsam::Factor.
Reimplemented in gtsam::HybridGaussianConditional, gtsam::HybridNonlinearFactor, and gtsam::HybridGaussianFactor.
Definition at line 96 of file HybridFactor.cpp.
|
pure virtual |
Restrict the factor to the given discrete values.
Implemented in gtsam::HybridGaussianConditional, gtsam::HybridGaussianFactor, gtsam::HybridConditional, and gtsam::HybridNonlinearFactor.
|
private |
Record what category of HybridFactor this is.
Definition at line 58 of file HybridFactor.h.
|
protected |
Record continuous keys for book-keeping.
Definition at line 64 of file HybridFactor.h.
|
protected |
Definition at line 62 of file HybridFactor.h.