io.loader.shared
Class GraphBuilder

java.lang.Object
  extended by io.loader.shared.GraphBuilder

public class GraphBuilder
extends java.lang.Object

extract a skeleton graph (see SkeletonGraph) from the sampled parts


Field Summary
private static org.apache.log4j.Logger logger
          logger instance
 
Constructor Summary
GraphBuilder()
           
 
Method Summary
static SkeletonGraph buildGraph(java.util.Map<SkeletonNode,java.util.List<SkeletonBranch>> allParts)
          Build a graph from the sampled parts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.log4j.Logger logger
logger instance

Constructor Detail

GraphBuilder

public GraphBuilder()
Method Detail

buildGraph

public static SkeletonGraph buildGraph(java.util.Map<SkeletonNode,java.util.List<SkeletonBranch>> allParts)
                                throws InvalidSkeletonException
Build a graph from the sampled parts. The vertices of the graph are the critical nodes of the skeleton (that is, junction and end nodes). The edges of the graph is the list of nodes connection the two vertices.

Parameters:
allParts - Map containing all parts sampled in the skeleton. Key is the skeleton node the parts in the value list are emanating from.
Returns:
graph constructed based on the found end and junction nodes.
Throws:
InvalidSkeletonException - if the skeleton seems to be broken