de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph.alg
Class GreedyCycleRemover

java.lang.Object
  extended by de.cau.cs.kieler.core.alg.AbstractAlgorithm
      extended by de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph.alg.AbstractCycleRemover
          extended by de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph.alg.GreedyCycleRemover
All Implemented Interfaces:
IAlgorithm, ICycleRemover

public class GreedyCycleRemover
extends AbstractCycleRemover

Cycle remover implementation that uses a greedy algorithm.

Rating proposed yellow
(2009-12-11) msp

Field Summary
 
Fields inherited from interface de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph.alg.ICycleRemover
REVERSED
 
Constructor Summary
GreedyCycleRemover()
           
 
Method Summary
 void removeCycles(KSlimGraph graph)
          Remove cycles in a given graph.
 void reset()
          Removes the associated progress monitor.
 
Methods inherited from class de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph.alg.AbstractCycleRemover
getReversedEdges, restoreGraph, reverseEdges, setReversedEdges
 
Methods inherited from class de.cau.cs.kieler.core.alg.AbstractAlgorithm
getMonitor, reset, setProgressMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.cau.cs.kieler.core.alg.IAlgorithm
reset, setProgressMonitor
 

Constructor Detail

GreedyCycleRemover

public GreedyCycleRemover()
Method Detail

reset

public void reset()
Removes the associated progress monitor. Any subclass that overrides this method should call super.reset().

Specified by:
reset in interface IAlgorithm
Overrides:
reset in class AbstractCycleRemover

removeCycles

public void removeCycles(KSlimGraph graph)
Remove cycles in a given graph. Loops on a single node are ignored and have to be processed properly in later steps. Each edge is assigned a rank with value REVERSED if and only if the edge was reversed for cycle removal.

Parameters:
graph - graph to be processed