de.cau.cs.kieler.kiml.grana.analyses
Class LayersAnalysis

java.lang.Object
  extended by de.cau.cs.kieler.kiml.grana.analyses.LayersAnalysis
All Implemented Interfaces:
IAnalysis

public class LayersAnalysis
extends Object
implements IAnalysis

An analysis for the number of horizontal and vertical layers. Returns a pair of integers.

Rating red

Constructor Summary
LayersAnalysis()
           
 
Method Summary
 int[] countLayers(KNode parentNode)
          Count the number of layers in the given graph and its nested subgraphs.
 Object doAnalysis(KNode parentNode, Map<String,Object> results, IKielerProgressMonitor progressMonitor)
          Performs the actual analysis process and returns the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayersAnalysis

public LayersAnalysis()
Method Detail

doAnalysis

public Object doAnalysis(KNode parentNode,
                         Map<String,Object> results,
                         IKielerProgressMonitor progressMonitor)
Performs the actual analysis process and returns the results. If more than one component have been specified for the analysis in the extension the method is expected to return an array.

Specified by:
doAnalysis in interface IAnalysis
Parameters:
parentNode - the parent node which the analysis is performed on
results - the result of analyses that were performed before this one (it should include the results of all dependency analyses)
progressMonitor - progress monitor used to keep track of progress
Returns:
the analysis results

countLayers

public int[] countLayers(KNode parentNode)
Count the number of layers in the given graph and its nested subgraphs.

Parameters:
parentNode - the parent node
Returns:
the number of horizontal / vertical layers, respectively