use of org.drools.beliefs.graph.Graph in project drools by kiegroup.
the class JunctionTreeBuilderTest method testEliminationCandidate2.
@Test
public void testEliminationCandidate2() {
Graph graph = new BayesNetwork();
GraphNode x0 = addNode(graph);
GraphNode x1 = addNode(graph);
GraphNode x2 = addNode(graph);
GraphNode x3 = addNode(graph);
GraphNode x4 = addNode(graph);
connectParentToChildren(x1, x2, x3, x4);
connectParentToChildren(x3, x4);
JunctionTreeBuilder jtBuilder = new JunctionTreeBuilder(graph);
jtBuilder.moralize();
EliminationCandidate vt1 = new EliminationCandidate(graph, jtBuilder.getAdjacencyMatrix(), x1);
assertEquals(2, vt1.getNewEdgesRequired());
assertEquals(bitSet("11110"), vt1.getCliqueBitSit());
}