COM.hugin.HAPI
Class JunctionTree

java.lang.Object
  extended byCOM.hugin.HAPI.JunctionTree

public class JunctionTree
extends java.lang.Object

Thic class represents the JunctionTrees in the compiled domain.


Method Summary
 boolean cgEvidenceIsPropagated()
          Returns true if CG evidence has been propagated in this JunctionTree; otherwise, returns false.
 boolean equilibriumIs(Domain.Equilibrium equilibrium)
          Tests the Equilibrium type.
 boolean evidenceIsPropagated()
          Returns true if evidence has been propagated in this JunctionTree; otherwise, returns false.
 boolean evidenceModeIs(Domain.EvidenceMode mode)
          Returns true if the EvidenceMode matches mode; otherwise, returns false.
 boolean evidenceToPropagate()
          Returns true if the JunctionTree contains evidence that has not been propagated; otherwise, returns false.
 CliqueList getCliques()
          Returns the cliques of this JunctionTree.
 double getConflict()
          Returns the conflict measure of the data inserted in this JunctionTree.
 Clique getRoot()
          Returns the root clique of this JunctionTree.
 long getTotalCGSize()
          Returns the total number of CG table entries for this JunctionTree.
 long getTotalSize()
          Returns the total number of discrete table configurations for this JunctionTree.
 boolean isAlive()
          Is this JunctionTree object alive?
 boolean likelihoodIsPropagated()
          Returns true if likelihoods have been propagated in this JunctionTree; otherwise, returns false.
 void propagate(Domain.Equilibrium equilibrium, Domain.EvidenceMode evidenceMode)
          Propagates evidence in this JunctionTree.
 boolean tablesToPropagate()
          Returns true if this JunctionTree contains updated tables that have not been propagated; otherwise, returns false.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

cgEvidenceIsPropagated

public boolean cgEvidenceIsPropagated()
                               throws ExceptionHugin
Returns true if CG evidence has been propagated in this JunctionTree; otherwise, returns false.

Throws:
ExceptionHugin

equilibriumIs

public boolean equilibriumIs(Domain.Equilibrium equilibrium)
                      throws ExceptionHugin
Tests the Equilibrium type. Returns true if the equilibrium of this JunctionTree can be obtained through a propagation using equilibrium as the Equilibrium type; otherwise, returns false.

Parameters:
equilibrium - the type of Equilibrium to test for.
Throws:
ExceptionHugin

evidenceIsPropagated

public boolean evidenceIsPropagated()
                             throws ExceptionHugin
Returns true if evidence has been propagated in this JunctionTree; otherwise, returns false.

Throws:
ExceptionHugin

evidenceModeIs

public boolean evidenceModeIs(Domain.EvidenceMode mode)
                       throws ExceptionHugin
Returns true if the EvidenceMode matches mode; otherwise, returns false.

Parameters:
mode - the type of EvidenceMode to test for.
Throws:
ExceptionHugin

evidenceToPropagate

public boolean evidenceToPropagate()
                            throws ExceptionHugin
Returns true if the JunctionTree contains evidence that has not been propagated; otherwise, returns false.

Throws:
ExceptionHugin

getCliques

public CliqueList getCliques()
                      throws ExceptionHugin
Returns the cliques of this JunctionTree.

Throws:
ExceptionHugin

getConflict

public double getConflict()
                   throws ExceptionHugin
Returns the conflict measure of the data inserted in this JunctionTree.

Returns:
A double.
Throws:
ExceptionHugin

getRoot

public Clique getRoot()
               throws ExceptionHugin
Returns the root clique of this JunctionTree.

Returns:
A Clique.
Throws:
ExceptionHugin

getTotalSize

public long getTotalSize()
                  throws ExceptionHugin
Returns the total number of discrete table configurations for this JunctionTree. Both clique and separator table configurations are counted. Also, if the junction tree has utility potentials, then the clique and separator configurations will effectively be counted twice.

Throws:
ExceptionHugin

getTotalCGSize

public long getTotalCGSize()
                    throws ExceptionHugin
Returns the total number of CG table entries for this JunctionTree. Both clique and separator table entries are counted.

Throws:
ExceptionHugin

likelihoodIsPropagated

public boolean likelihoodIsPropagated()
                               throws ExceptionHugin
Returns true if likelihoods have been propagated in this JunctionTree; otherwise, returns false.

Throws:
ExceptionHugin

propagate

public void propagate(Domain.Equilibrium equilibrium,
                      Domain.EvidenceMode evidenceMode)
               throws ExceptionHugin
Propagates evidence in this JunctionTree.

Parameters:
equilibrium - the type of Equilibrium reached after the propagation.
evidenceMode - the EvidenceMode used.
Throws:
ExceptionHugin

tablesToPropagate

public boolean tablesToPropagate()
                          throws ExceptionHugin
Returns true if this JunctionTree contains updated tables that have not been propagated; otherwise, returns false.

Throws:
ExceptionHugin

isAlive

public boolean isAlive()
Is this JunctionTree object alive?