de.cau.cs.kieler.core.slimgraph
Class KGraphSection

java.lang.Object
  extended by de.cau.cs.kieler.core.slimgraph.KGraphSection

public class KGraphSection
extends Object

Section of a slim graph.

TODO: Change the whole concept of subgraphs! This approach here is not good.

Rating red

Constructor Summary
KGraphSection()
           
 
Method Summary
 boolean contains(KSlimNode node)
          Checks whether this graph section contains the given node by performing a binary search in the sorted list of contained nodes.
 List<KSlimNode> getNodes()
          Returns the nodes.
 void removeEdge(KSlimNode.IncEntry edgeEntry)
          Removes the given edge from the incidence lists of its source and target.
 void restoreEdges()
          Restores all edges that were removed.
 void sortNodes()
          Sorts the nodes of this graph section.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KGraphSection

public KGraphSection()
Method Detail

getNodes

public List<KSlimNode> getNodes()
Returns the nodes.

Returns:
the nodes

sortNodes

public void sortNodes()
Sorts the nodes of this graph section. This method must be called prior to any use of contains(TSMNode).


contains

public boolean contains(KSlimNode node)
Checks whether this graph section contains the given node by performing a binary search in the sorted list of contained nodes.

Parameters:
node - node to lookup
Returns:
true if the given node is contained in nodes

removeEdge

public void removeEdge(KSlimNode.IncEntry edgeEntry)
Removes the given edge from the incidence lists of its source and target.

Parameters:
edgeEntry - edge entry to remove from this graph section

restoreEdges

public void restoreEdges()
Restores all edges that were removed.