com.cra.bnet.engine
Class JunctionTree

java.lang.Object
  |
  +--com.cra.shared.graph.AbstractGraph
        |
        +--com.cra.shared.graph.HashGraph
              |
              +--com.cra.bnet.engine.JunctionTree
All Implemented Interfaces:
Graph

public class JunctionTree
extends HashGraph

Constructs a junction tree from a given directed graph. Let G be the set of cliques from an undirected graph, and let the cliques of G be organized in a tree T. T is a junction (join) tree if for any pair of vertices V,W all vertices on the path between V and W contain the intersection V and W.

This class implements the Graph interface and therefore can be used a graph. All edges are undirected. Each vertex is a Set object containing elements of type Object that are vertices of the Graph used to create the junction tree. Each edge object is a Set containing the intersection of the edge's adjacent vertices. Although this class is modifiable, clients are discouraged from modifying the vertices and edges. Any modification renders the junction tree invalid.


Constructor Summary
JunctionTree(Graph digraph)
          Creates a new junction tree from the specified directed graph.
JunctionTree(Graph digraph, Map vertexWeights)
          Creates a new junction tree from the specified directed graph using the specified vertex weights.
 
Methods inherited from class com.cra.shared.graph.HashGraph
add, addDirected, addUndirected, inEdgeSet, outEdgeSet, undirectedEdgeSet, vertexSet
 
Methods inherited from class com.cra.shared.graph.AbstractGraph
clear, contains, containsDirected, containsUndirected, equals, hashCode, isEmpty, remove, removeDirected, removeUndirected, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JunctionTree

public JunctionTree(Graph digraph)
Creates a new junction tree from the specified directed graph.

Parameters:
digraph - directed graph.

JunctionTree

public JunctionTree(Graph digraph,
                    Map vertexWeights)
Creates a new junction tree from the specified directed graph using the specified vertex weights. Entries of the map should be of type (Object, Integer) where Objects are vertices in the graph and Integers are their corresponding weights.

Parameters:
digraph - directed graph.
vertexWeights - vertex weights.