pedviz.algorithms.sugiyama
Class SicknessSplitter

java.lang.Object
  extended by pedviz.algorithms.sugiyama.SicknessSplitter
All Implemented Interfaces:
Splitter

public class SicknessSplitter
extends java.lang.Object
implements Splitter

This class can be used as a WallSplitter for the SugiyamaLayout class. It splits the specified graph in two walls, dependent on the sickness of a person.

Version:
0.1
Author:
Lukas Forer

Constructor Summary
SicknessSplitter(java.lang.String[] columns, java.lang.String[] values)
          Creates a SicknessSplitter object with the given array of traits and values.
 
Method Summary
 void afterSplit(Graph graph)
          This method will be run after the graph was split.
 void beforeSplit(Graph graph)
          This method will be run before the graph will be split.
 int getWall(Graph graph, Node node, int index)
          Returns the id of the wall for the given node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SicknessSplitter

public SicknessSplitter(java.lang.String[] columns,
                        java.lang.String[] values)
Creates a SicknessSplitter object with the given array of traits and values.

Parameters:
columns - the array contains all columns, which contains sickness informations.
values - the array contains the values, which describe when the person is sick.
Method Detail

beforeSplit

public void beforeSplit(Graph graph)
Description copied from interface: Splitter
This method will be run before the graph will be split.

Specified by:
beforeSplit in interface Splitter
Parameters:
graph - the Graph object

afterSplit

public void afterSplit(Graph graph)
Description copied from interface: Splitter
This method will be run after the graph was split.

Specified by:
afterSplit in interface Splitter
Parameters:
graph - the Graph object

getWall

public int getWall(Graph graph,
                   Node node,
                   int index)
Description copied from interface: Splitter
Returns the id of the wall for the given node. The id is dependent from the used algorithm.

Specified by:
getWall in interface Splitter
Parameters:
graph - the Graph object
node - the Node object
index - the index of the Node in the given Graph