|
|
FACTOR::const_iterator | beginFrontals () const |
| | Iterator pointing to first frontal key.
|
|
FACTOR::const_iterator | endFrontals () const |
| | Iterator pointing past the last frontal key.
|
|
FACTOR::const_iterator | beginParents () const |
| | Iterator pointing to the first parent key.
|
|
FACTOR::const_iterator | endParents () const |
| | Iterator pointing past the last parent key.
|
|
size_t & | nrFrontals () |
| | Mutable version of nrFrontals.
|
|
FACTOR::iterator | beginFrontals () |
| | Mutable iterator pointing to first frontal key.
|
|
FACTOR::iterator | endFrontals () |
| | Mutable iterator pointing past the last frontal key.
|
|
FACTOR::iterator | beginParents () |
| | Mutable iterator pointing to the first parent key.
|
|
FACTOR::iterator | endParents () |
| | Mutable iterator pointing past the last parent key.
|
| template<class VALUES> |
| static bool | CheckInvariants (const DERIVEDCONDITIONAL &conditional, const VALUES &x) |
| | Check invariants of this conditional, given the values x.
|
|
|
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
|
| virtual double | logProbability (const HybridValues &c) const |
| | All conditional types need to implement a logProbability function, for which exp(logProbability(x)) = evaluate(x).
|
| virtual double | evaluate (const HybridValues &c) const |
| | All conditional types need to implement an evaluate function, that yields a true probability.
|
|
double | operator() (const HybridValues &x) const |
| | Evaluate probability density, sugar.
|
| virtual double | negLogConstant () const |
| | All conditional types need to implement this as the negative log of the normalization constant to make it such that error>=0.
|
|
|
typedef std::pair< typename FACTOR::const_iterator, typename FACTOR::const_iterator > | ConstFactorRange |
| | A mini implementation of an iterator range, to share const views of frontals and parents.
|
|
typedef ConstFactorRangeIterator | Frontals |
| | View of the frontal keys (call frontals()).
|
|
typedef ConstFactorRangeIterator | Parents |
| | View of the separator keys (call parents()).
|
|
|
| Conditional () |
| | Empty Constructor to make serialization possible.
|
|
| Conditional (size_t nrFrontals) |
| | Constructor.
|
|
|
size_t | nrFrontals_ |
| | The first nrFrontal variables are frontal and the rest are parents.
|
◆ CheckInvariants()
template<class FACTOR, class DERIVEDCONDITIONAL>
template<class VALUES>
| bool gtsam::Conditional< FACTOR, DERIVEDCONDITIONAL >::CheckInvariants |
( |
const DERIVEDCONDITIONAL & | conditional, |
|
|
const VALUES & | x ) |
|
static |
Check invariants of this conditional, given the values x.
It tests:
- evaluate >= 0.0
- evaluate(x) == conditional(x)
- exp(logProbability(x)) == evaluate(x)
- negLogConstant() = -log(normalizationConstant())
- error >= 0.0
- logProbability(x) == -(negLogConstant() + error(x))
- Parameters
-
| conditional | The conditional to test, as a reference to the derived type. |
- Template Parameters
-
◆ evaluate()
template<class FACTOR, class DERIVEDCONDITIONAL>
◆ logProbability()
template<class FACTOR, class DERIVEDCONDITIONAL>
◆ negLogConstant()
template<class FACTOR, class DERIVEDCONDITIONAL>
The documentation for this class was generated from the following files: