Darwin
1.10(beta)
|
Interface for various (marginal) inference algorithms. More...
Public Member Functions | |
drwnInference (const drwnFactorGraph &graph) | |
reference to initial clique potentials | |
drwnInference (const drwnInference &inf) | |
virtual void | clear () |
clear internally cached data (e.g., computation graph) | |
virtual bool | inference ()=0 |
run inference (or resume for iterative algorithms) and return true if converged | |
virtual void | marginal (drwnTableFactor &belief) const =0 |
return the belief over the variables in the given factor, which must be one of the cliques in the original factor graph | |
virtual drwnFactorGraph | varMarginals () const |
returns marginals for each variable in the factor graph's universe | |
drwnTableFactor | operator[] (int varIndx) const |
return the marginal distribution over variable varIndx | |
drwnTableFactor | operator[] (const char *varName) const |
return the marginal distribution over variable varName | |
Protected Attributes | |
const drwnFactorGraph & | _graph |
Interface for various (marginal) inference algorithms.
Algorithms operate on a factor graph (see drwnFactorGraph) that is assumed to be provided as unnormalized probability distributions, i.e., and the task is to find the marginal distibution over each variable. A constant reference is maintained to the factor graph, so it is important that the drwnFactorGraph object not be destoryed before destroying the drwnMapInference object.