|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javaslam.tjt.graph.Node | +--javaslam.tjt.JunctionTree.Cluster
A cluster of a junction tree.
Field Summary | |
protected Gaussian |
p
The potential of this cluster. |
Fields inherited from class javaslam.tjt.graph.Node |
edges |
Constructor Summary | |
JunctionTree.Cluster()
Creates an empty cluster. |
|
JunctionTree.Cluster(Gaussian p)
Creates a cluster with the supplied potential. |
|
JunctionTree.Cluster(JunctionTree.Cluster c)
Copy constructor. |
Method Summary | |
void |
collectEvidence(JunctionTree.Cluster parent,
boolean local)
Collects evidence to this cluster. |
boolean |
contains(Set vars)
Returns true if this cluster contains the supplied
set of variables. |
boolean |
contains(Variable v)
Returns true if this cluster contains the supplied
variable. |
void |
distributeEvidence(JunctionTree.Cluster parent)
Distributes evidence from this cluster. |
void |
distributeEvidence(JunctionTree.Cluster parent,
double thresh)
Distributes evidence from this cluster so long as the propagated messages are having a significant effect on the belief state. |
void |
extend(Set vars)
Extends this cluster to contain the supplied set of Variable s. |
int |
getDimension()
Returns the dimension of this cluster, which is the dimension of its potential. |
JunctionTree |
getJunctionTree()
Returns the junction tree this cluster resides in. |
Gaussian |
getPotential()
Returns this cluster's potential. |
int |
getSize()
Returns the size of this cluster, which is the size of its potential. |
JunctionTree.Cluster |
getSubsumedNeighbor()
Searches for an adjacent cluster that whose variables are all contained in this cluster. |
JunctionTree.Cluster |
getSubsumingNeighbor()
Searches for an adjacent cluster that contains all the variables contained in this cluster. |
Set |
getVariables()
Returns an unmodifiable set of this cluster's variables. |
boolean |
isLeaf()
Returns true if this cluster is a leaf. |
void |
marginalizeOut(Set vars)
Marginalizes out a set of variables from this cluster. |
void |
rename(Variable var,
Variable subst)
Renames a variable in this cluster. |
String |
toString()
Returns a string representation of this cluster. |
Methods inherited from class javaslam.tjt.graph.Node |
addEdge, edges, equals, getEdge, getShortestPath, hashCode, removeEdge, swingEdge, swingEdgesTo |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Gaussian p
Constructor Detail |
public JunctionTree.Cluster()
public JunctionTree.Cluster(Gaussian p)
p
- a potentialpublic JunctionTree.Cluster(JunctionTree.Cluster c)
c
- a clusterMethod Detail |
public JunctionTree getJunctionTree()
public void rename(Variable var, Variable subst)
var
- the original variablesubst
- the variable substituted for the original variable
IllegalArgumentException
- if var
and
subst
have differing dimensionspublic Gaussian getPotential()
public int getDimension()
Gaussian.getDimension()
public int getSize()
Gaussian.getSize()
public Set getVariables()
public boolean isLeaf()
true
if this cluster is a leaf.
true
if this cluster is a leaf.public boolean contains(Variable v)
true
if this cluster contains the supplied
variable.
true
if this cluster contains v
public boolean contains(Set vars)
true
if this cluster contains the supplied
set of variables.
vars
- a set of Variable
s
true
if this cluster contains the
variables in vars
public void extend(Set vars)
Variable
s. The potential and the cluster's identifiers
are both updated.
vars
- a set of Variable
spublic void marginalizeOut(Set vars)
vars
- a set of Variable
spublic JunctionTree.Cluster getSubsumedNeighbor()
null
is returned.
null
if no such
cluster existspublic JunctionTree.Cluster getSubsumingNeighbor()
null
is returned.
null
if no such
cluster existspublic void collectEvidence(JunctionTree.Cluster parent, boolean local)
parent
)are asked to collect
evidence (with this node as their parent) and this cluster
passes a flow to parent
.
local
- if true
, then the children are not
asked to collect evidenceparent
- a neighbor of this cluster that is its parent in
the flow-passing tree, or null
if this
cluster is the root of the flow-passing treepublic void distributeEvidence(JunctionTree.Cluster parent)
parent
) and then
distributeEvidence
is called recursively on all
neighbors (except parent
).
parent
- a neighbor of this cluster that is its parent in
the flow-passing tree, or null
if this
cluster is the root of the flow-passing treedistributeEvidence(JunctionTree.Cluster,double)
public void distributeEvidence(JunctionTree.Cluster parent, double thresh)
distributeEvidence
is
not recursively called on the target cluster.
parent
- the parent of this cluster in the flow-passing
tree, or null
if this cluster is the rootthresh
- the relative entropy (in nats) required from the old
separator potential to the new separator potential
in order to continue distributing evidenceGaussian.kl(Gaussian)
,
distributeEvidence(JunctionTree.Cluster)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |