de.saar.chorus.domgraph.chart
Class Split

Object
  extended by Split

public class Split
extends Object

A split in a dominance chart. A split of a subgraph is induced by the choice of a certain free fragment as the root of a solved form of this subgraph. It also records the weakly connected components into which the subgraph is split by removing the free fragment, and to which hole of the fragment the nodes of each WCC are connected.

Author:
Alexander Koller

Constructor Summary
Split(String rootFragment)
          Creates a split with a given root fragment.
 
Method Summary
 void addWcc(String hole, Set<String> wcc)
          Adds a weakly connected component to a split representation.
 Set<String> getAllDominators()
          Returns the set of holes of the root fragment which are connected to any wcc.
 List<Set<String>> getAllSubgraphs()
          Returns the set of WCCs into which the subgraph is split by removing the root fragment.
 String getRootFragment()
          Returns the root fragment of this split.
 List<Set<String>> getWccs(String hole)
          Returns the set of weakly connected components which are connected to the specified hole.
 String toString()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Split

public Split(String rootFragment)
Creates a split with a given root fragment.

Parameters:
rootFragment - the root fragment of this split
Method Detail

addWcc

public void addWcc(String hole,
                   Set<String> wcc)
Adds a weakly connected component to a split representation.

Parameters:
hole - the hole of the free fragment to which the wcc is connected
wcc - a weakly connected component of the subgraph

getRootFragment

public String getRootFragment()
Returns the root fragment of this split.

Returns:
the root fragment

getWccs

public List<Set<String>> getWccs(String hole)
Returns the set of weakly connected components which are connected to the specified hole.

Parameters:
hole - a hole of the root fragment
Returns:
the list of wccs connected to this hole, or null if this is not a hole or no wccs are connected to it.

getAllDominators

public Set<String> getAllDominators()
Returns the set of holes of the root fragment which are connected to any wcc.

Returns:
the set of holes

getAllSubgraphs

public List<Set<String>> getAllSubgraphs()
Returns the set of WCCs into which the subgraph is split by removing the root fragment.

Returns:
the set of wccs

toString

public String toString()
Overrides:
toString in class Object