#include <Conditional.h>
Classes | |
struct | ConstFactorRangeIterator |
Public Types | |
typedef std::pair< typename FACTOR::const_iterator, typename FACTOR::const_iterator > | ConstFactorRange |
typedef ConstFactorRangeIterator | Frontals |
typedef ConstFactorRangeIterator | Parents |
Public Member Functions | |
Testable | |
void | print (const std::string &s="Conditional", const KeyFormatter &formatter=DefaultKeyFormatter) const |
bool | equals (const This &c, double tol=1e-9) const |
Standard Interface | |
virtual | ~Conditional () |
size_t | nrFrontals () const |
size_t | nrParents () const |
Key | firstFrontalKey () const |
Frontals | frontals () const |
Parents | parents () const |
virtual double | logProbability (const HybridValues &c) const |
virtual double | evaluate (const HybridValues &c) const |
double | operator() (const HybridValues &x) const |
Evaluate probability density, sugar. More... | |
virtual double | logNormalizationConstant () const |
double | normalizationConstant () const |
Protected Member Functions | |
Standard Constructors | |
Conditional () | |
Conditional (size_t nrFrontals) | |
Protected Attributes | |
size_t | nrFrontals_ |
Private Types | |
typedef Conditional< FACTOR, DERIVEDCONDITIONAL > | This |
Typedef to this class. More... | |
Private Member Functions | |
Serialization | |
FACTOR & | asFactor () |
const FACTOR & | asFactor () const |
Advanced Interface | |
FACTOR::const_iterator | beginFrontals () const |
FACTOR::const_iterator | endFrontals () const |
FACTOR::const_iterator | beginParents () const |
FACTOR::const_iterator | endParents () const |
size_t & | nrFrontals () |
FACTOR::iterator | beginFrontals () |
FACTOR::iterator | endFrontals () |
FACTOR::iterator | beginParents () |
FACTOR::iterator | endParents () |
template<class VALUES > | |
static bool | CheckInvariants (const DERIVEDCONDITIONAL &conditional, const VALUES &x) |
Definition at line 61 of file Conditional.h.
typedef std::pair<typename FACTOR::const_iterator, typename FACTOR::const_iterator> gtsam::Conditional< FACTOR, DERIVEDCONDITIONAL >::ConstFactorRange |
A mini implementation of an iterator range, to share const views of frontals and parents.
Definition at line 75 of file Conditional.h.
typedef ConstFactorRangeIterator gtsam::Conditional< FACTOR, DERIVEDCONDITIONAL >::Frontals |
View of the frontal keys (call frontals())
Definition at line 94 of file Conditional.h.
typedef ConstFactorRangeIterator gtsam::Conditional< FACTOR, DERIVEDCONDITIONAL >::Parents |
View of the separator keys (call parents())
Definition at line 97 of file Conditional.h.
|
private |
Typedef to this class.
Definition at line 69 of file Conditional.h.
|
inlineprotected |
Empty Constructor to make serialization possible
Definition at line 104 of file Conditional.h.
|
inlineprotected |
Constructor
Definition at line 107 of file Conditional.h.
|
inlinevirtual |
Definition at line 126 of file Conditional.h.
|
inlineprivate |
Definition at line 230 of file Conditional.h.
|
inlineprivate |
Definition at line 233 of file Conditional.h.
|
inline |
Iterator pointing to first frontal key.
Definition at line 179 of file Conditional.h.
|
inline |
Mutable iterator pointing to first frontal key.
Definition at line 194 of file Conditional.h.
|
inline |
Iterator pointing to the first parent key.
Definition at line 185 of file Conditional.h.
|
inline |
Mutable iterator pointing to the first parent key.
Definition at line 200 of file Conditional.h.
|
static |
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. |
Definition at line 77 of file Conditional-inst.h.
|
inline |
Iterator pointing past the last frontal key.
Definition at line 182 of file Conditional.h.
|
inline |
Mutable iterator pointing past the last frontal key.
Definition at line 197 of file Conditional.h.
|
inline |
Iterator pointing past the last parent key.
Definition at line 188 of file Conditional.h.
|
inline |
Mutable iterator pointing past the last parent key.
Definition at line 203 of file Conditional.h.
bool gtsam::Conditional< FACTOR, DERIVEDCONDITIONAL >::equals | ( | const This & | c, |
double | tol = 1e-9 |
||
) | const |
check equality
Definition at line 41 of file Conditional-inst.h.
|
virtual |
All conditional types need to implement an evaluate
function, that yields a true probability. The default implementation just exponentiates logProbability.
Reimplemented in gtsam::GaussianConditional, gtsam::DiscreteConditional, gtsam::GaussianMixture, gtsam::HybridConditional, and gtsam::SymbolicConditional.
Definition at line 55 of file Conditional-inst.h.
|
inline |
Convenience function to get the first frontal key
Definition at line 135 of file Conditional.h.
|
inline |
return a view of the frontal keys
Definition at line 143 of file Conditional.h.
|
virtual |
All conditional types need to implement a log normalization constant to make it such that error>=0.
Reimplemented in gtsam::DiscreteConditional, gtsam::HybridConditional, gtsam::GaussianMixture, and gtsam::GaussianConditional.
Definition at line 62 of file Conditional-inst.h.
|
virtual |
All conditional types need to implement a logProbability
function, for which exp(logProbability(x)) = evaluate(x).
Reimplemented in gtsam::GaussianConditional, gtsam::DiscreteConditional, gtsam::GaussianMixture, gtsam::HybridConditional, and gtsam::SymbolicConditional.
Definition at line 48 of file Conditional-inst.h.
double gtsam::Conditional< FACTOR, DERIVEDCONDITIONAL >::normalizationConstant | ( | ) | const |
Non-virtual, exponentiate logNormalizationConstant.
Definition at line 70 of file Conditional-inst.h.
|
inline |
return the number of frontals
Definition at line 129 of file Conditional.h.
|
inline |
Mutable version of nrFrontals
Definition at line 191 of file Conditional.h.
|
inline |
return the number of parents
Definition at line 132 of file Conditional.h.
|
inline |
Evaluate probability density, sugar.
Definition at line 161 of file Conditional.h.
|
inline |
return a view of the parent keys
Definition at line 146 of file Conditional.h.
void gtsam::Conditional< FACTOR, DERIVEDCONDITIONAL >::print | ( | const std::string & | s = "Conditional< FACTOR, DERIVEDCONDITIONAL >" , |
const KeyFormatter & | formatter = DefaultKeyFormatter |
||
) | const |
print with optional formatter
Definition at line 30 of file Conditional-inst.h.
|
protected |
The first nrFrontal variables are frontal and the rest are parents.
Definition at line 65 of file Conditional.h.