Class for Hybrid Bayes tree orphan subtrees.
This object stores parent keys in our base type factor so that eliminating those parent keys will pull this subtree into the elimination.
This is a template instantiation for hybrid Bayes tree cliques, storing both the regular keys and discrete keys in the HybridConditional.
|
| BayesTreeOrphanWrapper (const boost::shared_ptr< CliqueType > &clique) |
| Construct a new Bayes Tree Orphan Wrapper object.
|
|
void | print (const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| print utility
|
|
| HybridConditional ()=default |
| Default constructor needed for serialization.
|
|
| HybridConditional (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys, size_t nFrontals) |
| Construct a new Hybrid Conditional object.
|
|
| HybridConditional (const KeyVector &continuousFrontals, const DiscreteKeys &discreteFrontals, const KeyVector &continuousParents, const DiscreteKeys &discreteParents) |
| Construct a new Hybrid Conditional object.
|
|
| HybridConditional (const boost::shared_ptr< GaussianConditional > &continuousConditional) |
| Construct a new Hybrid Conditional object.
|
|
| HybridConditional (const boost::shared_ptr< DiscreteConditional > &discreteConditional) |
| Construct a new Hybrid Conditional object.
|
|
| HybridConditional (const boost::shared_ptr< GaussianMixture > &gaussianMixture) |
| Construct a new Hybrid Conditional object.
|
|
void | print (const std::string &s="Hybrid Conditional: ", const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| GTSAM-style print.
|
|
bool | equals (const HybridFactor &other, double tol=1e-9) const override |
| GTSAM-style equals.
|
|
GaussianMixture::shared_ptr | asMixture () const |
| Return HybridConditional as a GaussianMixture.
|
|
GaussianConditional::shared_ptr | asGaussian () const |
| Return HybridConditional as a GaussianConditional.
|
|
DiscreteConditional::shared_ptr | asDiscrete () const |
| Return conditional as a DiscreteConditional.
|
|
boost::shared_ptr< Factor > | inner () const |
| Get the type-erased pointer to the inner type.
|
|
double | error (const HybridValues &values) const override |
| Return the error of the underlying conditional.
|
|
double | logProbability (const HybridValues &values) const override |
| Return the log-probability (or density) of the underlying conditional.
|
|
double | logNormalizationConstant () const override |
| Return the log normalization constant.
|
|
double | evaluate (const HybridValues &values) const override |
| Return the probability (or density) of the underlying conditional.
|
|
bool | frontalsIn (const VectorValues &measurements) const |
| Check if VectorValues measurements contains all frontal keys.
|
|
| HybridFactor ()=default |
| Default constructor creates empty factor.
|
|
| HybridFactor (const KeyVector &keys) |
| Construct hybrid factor from continuous keys.
|
|
| HybridFactor (const DiscreteKeys &discreteKeys) |
| Construct hybrid factor from discrete keys.
|
|
| HybridFactor (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys) |
| Construct a new Hybrid Factor object.
|
|
virtual | ~HybridFactor ()=default |
| Virtual destructor.
|
|
void | print (const std::string &s="HybridFactor\n", const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| print
|
|
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.
|
|
virtual | ~Factor ()=default |
| Default destructor.
|
|
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 |
| Iterator at beginning of involved variable keys.
|
|
const_iterator | end () const |
| Iterator at end of involved variable keys.
|
|
size_t | size () const |
|
virtual void | printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| print only keys
|
|
bool | equals (const This &other, double tol=1e-9) const |
| check equality
|
|
KeyVector & | keys () |
|
iterator | begin () |
| Iterator at beginning of involved variable keys.
|
|
iterator | end () |
| Iterator at end of involved variable keys.
|
|
void | print (const std::string &s="Conditional", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| print with optional formatter
|
|
bool | equals (const This &c, double tol=1e-9) const |
| check equality
|
|
size_t | nrFrontals () const |
| return the number of frontals
|
|
size_t | nrParents () const |
| return the number of parents
|
|
Key | firstFrontalKey () const |
| Convenience function to get the first frontal key.
|
|
Frontals | frontals () const |
| return a view of the frontal keys
|
|
Parents | parents () const |
| return a view of the parent keys
|
|
double | operator() (const HybridValues &x) const |
| Evaluate probability density, sugar.
|
|
double | normalizationConstant () const |
| Non-virtual, exponentiate logNormalizationConstant.
|
|
size_t & | nrFrontals () |
| Mutable version of nrFrontals.
|
|
FACTOR::const_iterator | beginFrontals () const |
| Iterator pointing to first frontal key.
|
|
FACTOR::iterator | beginFrontals () |
| Mutable iterator pointing to first frontal key.
|
|
FACTOR::const_iterator | endFrontals () const |
| Iterator pointing past the last frontal key.
|
|
FACTOR::iterator | endFrontals () |
| Mutable iterator pointing past the last frontal key.
|
|
FACTOR::const_iterator | beginParents () const |
| Iterator pointing to the first parent key.
|
|
FACTOR::iterator | beginParents () |
| Mutable iterator pointing to the first parent key.
|
|
FACTOR::const_iterator | endParents () const |
| Iterator pointing past the last parent key.
|
|
FACTOR::iterator | endParents () |
| Mutable iterator pointing past the last parent key.
|
|
|
static bool | CheckInvariants (const HybridConditional &conditional, const VALUES &x) |
| Check invariants of this conditional, given the values x .
|
|
| Factor () |
| Default constructor for I/O.
|
|
template<typename CONTAINER > |
| Factor (const CONTAINER &keys) |
| Construct factor from container of keys.
|
|
template<typename ITERATOR > |
| Factor (ITERATOR first, ITERATOR last) |
| Construct factor from iterator keys.
|
|
| Conditional () |
| Empty Constructor to make serialization possible.
|
|
| Conditional (size_t nrFrontals) |
| Constructor.
|
|
template<typename CONTAINER > |
static Factor | FromKeys (const CONTAINER &keys) |
| Construct factor from container of keys.
|
|
template<typename ITERATOR > |
static Factor | FromIterators (ITERATOR first, ITERATOR last) |
| Construct factor from iterator keys.
|
|
boost::shared_ptr< Factor > | inner_ |
| Type-erased pointer to the inner type.
|
|
DiscreteKeys | discreteKeys_ |
|
KeyVector | continuousKeys_ |
| Record continuous keys for book-keeping.
|
|
KeyVector | keys_ |
| The keys involved in this factor.
|
|
size_t | nrFrontals_ |
| The first nrFrontal variables are frontal and the rest are parents.
|
|