de.cau.cs.kieler.klay.force
Class ComponentsProcessor

java.lang.Object
  extended by de.cau.cs.kieler.core.alg.AbstractAlgorithm
      extended by de.cau.cs.kieler.klay.force.ComponentsProcessor
All Implemented Interfaces:
IAlgorithm

public class ComponentsProcessor
extends AbstractAlgorithm

A processor that is able to split an input graph into connected components and to pack those components after layout.

Splitting into components

Precondition:
a graph.
Postcondition:
a list of graphs that represent the connected components of the input graph.

Packing components

Precondition:
a list of graphs with complete layout and layer assignment.
Postcondition:
a single graph.

Rating red

Constructor Summary
ComponentsProcessor()
           
 
Method Summary
 FGraph pack(List<FGraph> components)
          Pack the given components into a single graph.
 List<FGraph> split(FGraph graph)
          Split the given graph into its connected components.
 
Methods inherited from class de.cau.cs.kieler.core.alg.AbstractAlgorithm
getMonitor, reset, reset, setProgressMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentsProcessor

public ComponentsProcessor()
Method Detail

split

public List<FGraph> split(FGraph graph)
Split the given graph into its connected components.

Parameters:
graph - an input graph
Returns:
a list of components that can be processed one by one

pack

public FGraph pack(List<FGraph> components)
Pack the given components into a single graph.

Parameters:
components - a list of components
Returns:
a single graph that contains all components