javaslam.tjt
Class JunctionTree.JTEdge

java.lang.Object
  |
  +--javaslam.tjt.graph.Edge
        |
        +--javaslam.tjt.JunctionTree.JTEdge
Enclosing class:
JunctionTree

protected class JunctionTree.JTEdge
extends Edge

A (directed) edge from one cluster to another in a junction tree. Each (undirected) edge of the junction tree is composed of two directed edges which share the same potential object.


Field Summary
 
Fields inherited from class javaslam.tjt.graph.Edge
from, to
 
Constructor Summary
protected JunctionTree.JTEdge(JunctionTree.Cluster from, JunctionTree.Cluster to, Gaussian p)
          Constructor.
 
Method Summary
 boolean consistent()
          Returns true iff this edge is consistent.
 Gaussian getPotential()
          Returns the separator potential.
 JunctionTree.JTEdge getReverse()
          Returns the complement of this edge, i.e., the edge that emanates from this edge's terminus and terminates on this edge's origin (and which shares this edge's separator potential).
 Set getVariables()
          Returns an unmodifiable set of this edge's separator variables.
 void passFlow()
          Passes a flow along this edge.
 void rename(Variable var, Variable subst)
          Renames a variable in the separator of this edge.
 
Methods inherited from class javaslam.tjt.graph.Edge
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JunctionTree.JTEdge

protected JunctionTree.JTEdge(JunctionTree.Cluster from,
                              JunctionTree.Cluster to,
                              Gaussian p)
Constructor.

Parameters:
from - the cluster from which this edge emanates
to - the cluster on which this edge terminates
p - the separator potential of this edge (which is shared with this edge's complement)
Method Detail

getPotential

public Gaussian getPotential()
Returns the separator potential.

Returns:
this edge's separator potential

getVariables

public Set getVariables()
Returns an unmodifiable set of this edge's separator variables.


getReverse

public JunctionTree.JTEdge getReverse()
Returns the complement of this edge, i.e., the edge that emanates from this edge's terminus and terminates on this edge's origin (and which shares this edge's separator potential).

Returns:
the complement of this edge

rename

public void rename(Variable var,
                   Variable subst)
Renames a variable in the separator of this edge.

Parameters:
var - the original variable
subst - the variable substituted for the original variable
Throws:
IllegalArgumentException - if var and subst have differing dimensions

passFlow

public void passFlow()
Passes a flow along this edge. The separator potential and the cluster potential of this edge's terminus are updated.


consistent

public boolean consistent()
Returns true iff this edge is consistent. A junction tree edge is consistent iff the separator marginals of its cluster potentials are equal.