SandMark version 2.0


sandmark.watermark.ct.encode
Class Split

java.lang.Object
  |
  +--sandmark.watermark.ct.encode.Split

public class Split
extends java.lang.Object

This class is responsible for splitting a sandmark.util.graph.Graph into an array of subgraphs. The splitting is done in such a way that each subgraph has a root, a special node from which all other nodes in the graph can be reached. This allows us to store only pointers to root nodes in global storage to prevent the garbage collector from collecting the subgraphs.

This class returns two pieces of data:

  1. an array of subgraphs, and
  2. a component graph.
The component graph has the subgraphs as nodes, and the edges indicates the order in which the different subgraphs should be created. I.e. the componentGraph is a dependency graph whose topological order indicates to us how the subgraphs should be ordered.

Call like this:

    sandmark.util.graph.Graph graph = ...
    sandmark.watermark.ct.encode.Split split = new sandmark.watermark.ct.encode.Split(graph,2);
    split.split();
    sandmark.util.graph.Graph subGraphs[] = split.subGraphs;
    sandmark.util.graph.Graph componentGraph = split.componentGraph;
 


Field Summary
 Graph componentGraph
           
(package private)  int components
           
(package private)  Graph graph
           
 Graph[] subGraphs
           
 
Constructor Summary
Split(Graph graph, int components)
          Create a new Split object.
 
Method Summary
static void main(java.lang.String[] args)
           
 void split()
          Perform the split.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subGraphs

public Graph[] subGraphs

componentGraph

public Graph componentGraph

components

int components

graph

Graph graph
Constructor Detail

Split

public Split(Graph graph,
             int components)
Create a new Split object.

Method Detail

split

public void split()
Perform the split. Results are returned in the two public fields subGraphs and componentGraph.


main

public static void main(java.lang.String[] args)

SandMark version 2.0

Mon Jun 17 12:30:47 MST 2002