dai::TreeEP::TreeEPSubTree Class Reference

Stores the data structures needed to efficiently update the approximation of an off-tree factor. More...

List of all members.

Public Member Functions

void init ()
 Initializes beliefs of this subtree.
void InvertAndMultiply (const std::vector< Factor > &Qa, const std::vector< Factor > &Qb)
 Inverts this approximation and multiplies it by the (super) junction tree marginals Qa and Qb.
void HUGIN_with_I (std::vector< Factor > &Qa, std::vector< Factor > &Qb)
 Runs junction tree algorithm (including off-tree factor I) storing the results in the (super) junction tree Qa and Qb.
Real logZ (const std::vector< Factor > &Qa, const std::vector< Factor > &Qb) const
 Returns energy (?) of this subtree.
const Factor *& I ()
 Returns constant reference to the pointer to the off-tree factor.
Constructors/destructors
 TreeEPSubTree ()
 Default constructor.
 TreeEPSubTree (const TreeEPSubTree &x)
 Copy constructor.
TreeEPSubTreeoperator= (const TreeEPSubTree &x)
 Assignment operator.
 TreeEPSubTree (const RootedTree &subRTree, const RootedTree &jt_RTree, const std::vector< Factor > &jt_Qa, const std::vector< Factor > &jt_Qb, const Factor *I)
 Construct from subRTree, which is a subtree of the main tree jt_RTree, with distribution represented by jt_Qa and jt_Qb, for off-tree factor I.

Private Attributes

std::vector< Factor_Qa
 Outer region pseudomarginals (corresponding with the $\tilde f_i(x_j,x_k)$ in [MiQ04]).
std::vector< Factor_Qb
 Inner region pseudomarginals (corresponding with the $\tilde f_i(x_s)$ in [MiQ04]).
RootedTree _RTree
 The junction tree (stored as a rooted tree).
std::vector< size_t > _a
 Index conversion table for outer region indices (_Qa[alpha] corresponds with Qa[_a[alpha]] of the supertree).
std::vector< size_t > _b
 Index conversion table for inner region indices (_Qb[beta] corresponds with Qb[_b[beta]] of the supertree).
const Factor_I
 Pointer to off-tree factor.
VarSet _ns
 Variables in off-tree factor.
VarSet _nsrem
 Variables in off-tree factor which are not in the root of this subtree.
Real _logZ
 Used for calculating the free energy.


Detailed Description

Stores the data structures needed to efficiently update the approximation of an off-tree factor.

The TreeEP object stores a TreeEPSubTree object for each off-tree factor. It stores the approximation of that off-tree factor, which is represented as a distribution on a subtree of the main tree.


Constructor & Destructor Documentation

dai::TreeEP::TreeEPSubTree::TreeEPSubTree (  )  [inline]

Default constructor.

dai::TreeEP::TreeEPSubTree::TreeEPSubTree ( const TreeEPSubTree x  )  [inline]

Copy constructor.

dai::TreeEP::TreeEPSubTree::TreeEPSubTree ( const RootedTree subRTree,
const RootedTree jt_RTree,
const std::vector< Factor > &  jt_Qa,
const std::vector< Factor > &  jt_Qb,
const Factor I 
)

Construct from subRTree, which is a subtree of the main tree jt_RTree, with distribution represented by jt_Qa and jt_Qb, for off-tree factor I.


Member Function Documentation

TreeEPSubTree& dai::TreeEP::TreeEPSubTree::operator= ( const TreeEPSubTree x  )  [inline]

Assignment operator.

void dai::TreeEP::TreeEPSubTree::init (  ) 

Initializes beliefs of this subtree.

void dai::TreeEP::TreeEPSubTree::InvertAndMultiply ( const std::vector< Factor > &  Qa,
const std::vector< Factor > &  Qb 
)

Inverts this approximation and multiplies it by the (super) junction tree marginals Qa and Qb.

void dai::TreeEP::TreeEPSubTree::HUGIN_with_I ( std::vector< Factor > &  Qa,
std::vector< Factor > &  Qb 
)

Runs junction tree algorithm (including off-tree factor I) storing the results in the (super) junction tree Qa and Qb.

Real dai::TreeEP::TreeEPSubTree::logZ ( const std::vector< Factor > &  Qa,
const std::vector< Factor > &  Qb 
) const

Returns energy (?) of this subtree.

const Factor*& dai::TreeEP::TreeEPSubTree::I (  )  [inline]

Returns constant reference to the pointer to the off-tree factor.


Member Data Documentation

std::vector<Factor> dai::TreeEP::TreeEPSubTree::_Qa [private]

Outer region pseudomarginals (corresponding with the $\tilde f_i(x_j,x_k)$ in [MiQ04]).

std::vector<Factor> dai::TreeEP::TreeEPSubTree::_Qb [private]

Inner region pseudomarginals (corresponding with the $\tilde f_i(x_s)$ in [MiQ04]).

The junction tree (stored as a rooted tree).

std::vector<size_t> dai::TreeEP::TreeEPSubTree::_a [private]

Index conversion table for outer region indices (_Qa[alpha] corresponds with Qa[_a[alpha]] of the supertree).

std::vector<size_t> dai::TreeEP::TreeEPSubTree::_b [private]

Index conversion table for inner region indices (_Qb[beta] corresponds with Qb[_b[beta]] of the supertree).

Pointer to off-tree factor.

Variables in off-tree factor.

Variables in off-tree factor which are not in the root of this subtree.

Used for calculating the free energy.


The documentation for this class was generated from the following files:

Generated on Thu Aug 5 19:04:08 2010 for libDAI by  doxygen 1.5.5