GTSAM
4.0.2
C++ library for smoothing and mapping (SAM)
|
#include <SymbolicConditional.h>
Public Types | |
typedef SymbolicConditional | This |
typedef SymbolicFactor | BaseFactor |
Typedef to this class. | |
typedef Conditional< BaseFactor, This > | BaseConditional |
Typedef to the factor base class. | |
typedef std::shared_ptr< This > | shared_ptr |
Typedef to the conditional base class. | |
typedef BaseFactor::iterator | iterator |
Boost shared_ptr to this class. | |
typedef BaseFactor::const_iterator | const_iterator |
iterator to keys | |
typedef Factor | Base |
typedef SymbolicConditional | ConditionalType |
typedef std::pair< typename SymbolicFactor ::const_iterator, typename SymbolicFactor ::const_iterator > | ConstFactorRange |
typedef ConstFactorRangeIterator | Frontals |
typedef ConstFactorRangeIterator | Parents |
Protected Attributes | |
KeyVector | keys_ |
The keys involved in this factor. | |
size_t | nrFrontals_ |
Testable | |
bool | equals (const This &c, double tol=1e-9) const |
Standard Interface | |
size_t | nrFrontals () const |
size_t | nrParents () const |
Key | firstFrontalKey () const |
Frontals | frontals () const |
Parents | parents () const |
double | operator() (const HybridValues &x) const |
Evaluate probability density, sugar. | |
virtual double | logNormalizationConstant () const |
double | normalizationConstant () const |
Advanced Interface | |
size_t & | nrFrontals () |
SymbolicFactor ::const_iterator | beginFrontals () const |
SymbolicFactor ::iterator | beginFrontals () |
SymbolicFactor ::const_iterator | endFrontals () const |
SymbolicFactor ::iterator | endFrontals () |
SymbolicFactor ::const_iterator | beginParents () const |
SymbolicFactor ::iterator | beginParents () |
SymbolicFactor ::const_iterator | endParents () const |
SymbolicFactor ::iterator | endParents () |
static bool | CheckInvariants (const SymbolicConditional &conditional, const VALUES &x) |
Standard Constructors | |
template<typename ITERATOR > | |
static Factor | FromIterators (ITERATOR first, ITERATOR last) |
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 () |
Standard Constructors | |
SymbolicConditional () | |
SymbolicConditional (Key j) | |
SymbolicConditional (Key j, Key parent) | |
SymbolicConditional (Key j, Key parent1, Key parent2) | |
SymbolicConditional (Key j, Key parent1, Key parent2, Key parent3) | |
SymbolicFactor::shared_ptr | clone () const |
Copy this object as its actual derived type. | |
template<typename ITERATOR > | |
static SymbolicConditional | FromIterators (ITERATOR firstKey, ITERATOR lastKey, size_t nrFrontals) |
template<typename ITERATOR > | |
static SymbolicConditional::shared_ptr | FromIteratorsShared (ITERATOR firstKey, ITERATOR lastKey, size_t nrFrontals) |
template<class CONTAINER > | |
static SymbolicConditional | FromKeys (const CONTAINER &keys, size_t nrFrontals) |
template<class CONTAINER > | |
static SymbolicConditional::shared_ptr | FromKeysShared (const CONTAINER &keys, size_t nrFrontals) |
Testable | |
void | print (const std::string &str="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override |
bool | equals (const This &c, double tol=1e-9) const |
HybridValues methods. | |
double | logProbability (const HybridValues &x) const override |
logProbability throws exception, symbolic. | |
double | evaluate (const HybridValues &x) const override |
evaluate throws exception, symbolic. | |
Testable | |
void | printKeys (const std::string &s="SymbolicFactor", const KeyFormatter &formatter=DefaultKeyFormatter) const override |
print only keys | |
Advanced Constructors | |
template<typename KEYITERATOR > | |
static SymbolicFactor | FromIterators (KEYITERATOR beginKey, KEYITERATOR endKey) |
template<typename KEYITERATOR > | |
static SymbolicFactor::shared_ptr | FromIteratorsShared (KEYITERATOR beginKey, KEYITERATOR endKey) |
template<class CONTAINER > | |
static SymbolicFactor | FromKeys (const CONTAINER &keys) |
template<class CONTAINER > | |
static SymbolicFactor::shared_ptr | FromKeysShared (const CONTAINER &keys) |
Standard Interface | |
double | error (const HybridValues &c) const override |
The error method throws an exception. | |
std::pair< std::shared_ptr< SymbolicConditional >, std::shared_ptr< SymbolicFactor > > | eliminate (const Ordering &keys) const |
SymbolicConditional is a conditional with keys but no probability data, produced by symbolic elimination of SymbolicFactor.
It is also a SymbolicFactor, and thus derives from it. It derives also from Conditional<This>, which is a generic interface class for conditionals.
|
inherited |
A mini implementation of an iterator range, to share const views of frontals and parents.
|
inherited |
View of the frontal keys (call frontals())
|
inherited |
View of the separator keys (call parents())
|
inline |
Empty Constructor to make serialization possible
|
inline |
No parents
Two parents
|
inline |
Three parents
|
inlineinherited |
Iterator at beginning of involved variable keys
|
inlineinherited |
Iterator at beginning of involved variable keys
|
inlineinherited |
Iterator pointing to first frontal key.
|
inlineinherited |
Mutable iterator pointing to first frontal key.
|
inlineinherited |
Iterator pointing to the first parent key.
|
inlineinherited |
Mutable iterator pointing to the first parent key.
|
staticinherited |
Check invariants of this conditional, given the values x
. It tests:
conditional | The conditional to test, as a reference to the derived type. |
VALUES | HybridValues, or a more narrow type like DiscreteValues. |
|
inherited |
Eliminate the variables in keys
, in the order specified in keys
, returning a conditional and marginal.
|
inlineinherited |
Iterator at end of involved variable keys
|
inlineinherited |
Iterator at end of involved variable keys
|
inlineinherited |
Iterator pointing past the last frontal key.
|
inlineinherited |
Mutable iterator pointing past the last frontal key.
|
inlineinherited |
Iterator pointing past the last parent key.
|
inlineinherited |
Mutable iterator pointing past the last parent key.
bool gtsam::SymbolicConditional::equals | ( | const This & | c, |
double | tol = 1e-9 |
||
) | const |
Check equality
|
inherited |
check equality
|
inlineinherited |
Convenience function to get the first frontal key
|
inlinestatic |
Named constructor from an arbitrary number of keys and frontals
|
inlinestaticinherited |
Constructor from a collection of keys
|
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.
|
inlinestatic |
Named constructor from an arbitrary number of keys and frontals
|
inlinestaticinherited |
Constructor from a collection of keys
|
inlinestatic |
Named constructor from an arbitrary number of keys and frontals
|
inlinestaticinherited |
Constructor from a collection of keys - compatible with boost assign::list_of and boost assign::cref_list_of
|
inlinestatic |
Named constructor from an arbitrary number of keys and frontals
|
inlinestaticinherited |
Constructor from a collection of keys - compatible with boost assign::list_of and boost assign::cref_list_of
|
inlineinherited |
return a view of the frontal keys
|
inlineinherited |
|
virtualinherited |
All conditional types need to implement a log normalization constant to make it such that error>=0.
|
inherited |
Non-virtual, exponentiate logNormalizationConstant.
|
inlineinherited |
return the number of frontals
|
inlineinherited |
Mutable version of nrFrontals
|
inlineinherited |
return the number of parents
|
inlineinherited |
return a view of the parent keys
|
overridevirtual |
Print with optional formatter
Reimplemented from gtsam::Factor.
|
inlineinherited |
|
protectedinherited |
The first nrFrontal variables are frontal and the rest are parents.