NodeSplitParameterization extends ConsistencyParameterization { public static Tree<Treatment, FoldedEdge<Treatment, Study>> findSpanningTree(UndirectedGraph<Treatment, FoldedEdge<Treatment, Study>> cGraph, BasicParameter split) { UndirectedSparseGraph<Treatment, FoldedEdge<Treatment, Study>> graph = new UndirectedSparseGraph<Treatment, FoldedEdge<Treatment, Study>>(); GraphUtil.copyGraph(cGraph, graph); graph.removeEdge(cGraph.findEdge(split.getBaseline(), split.getSubject())); return ConsistencyParameterization.findSpanningTree(graph); } NodeSplitParameterization(Network network, BasicParameter splitNode, Tree<Treatment, FoldedEdge<Treatment, Study>> tree, Map<Study, Treatment> baselines); static NodeSplitParameterization create(Network network, BasicParameter split); static List<BasicParameter> getSplittableNodes(Network network); static List<BasicParameter> getSplittableNodes(Hypergraph<Treatment, Study> studyGraph, UndirectedGraph<Treatment, FoldedEdge<Treatment, Study>> cGraph); static boolean isSplittable(Hypergraph<Treatment, Study> studyGraph, Pair<Treatment> split); static Tree<Treatment, FoldedEdge<Treatment, Study>> findSpanningTree(UndirectedGraph<Treatment, FoldedEdge<Treatment, Study>> cGraph, BasicParameter split); static Map<Study, Treatment> findStudyBaselines(Hypergraph<Treatment, Study> studyGraph, Tree<Treatment, FoldedEdge<Treatment, Study>> tree, BasicParameter split); @Override List<NetworkParameter> getParameters(); @Override Map<NetworkParameter, Integer> parameterize(Treatment ta, Treatment tb); SplitParameter getDirectParameter(); SplitParameter getIndirectParameter(); Map<NetworkParameter, Integer> parameterizeIndirect(); @Override List<List<Pair<Treatment>>> parameterizeStudy(Study s); BasicParameter getSplitNode();  }
@Test public void testFindSpanningTree() { Tree<Treatment, FoldedEdge<Treatment, Study>> tree = NodeSplitParameterization.findSpanningTree(NetworkModel.createComparisonGraph(d_network), new BasicParameter(d_ta, d_tb)); assertEquals(4, tree.getEdgeCount()); assertNotNull(tree.findEdge(d_tc, d_ta)); assertNotNull(tree.findEdge(d_tc, d_tb)); assertNotNull(tree.findEdge(d_tc, d_td)); assertNotNull(tree.findEdge(d_tc, d_te)); }