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

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

public class MultiEdgeCountAnalysis
extends Object
implements IAnalysis

A graph analysis that counts the number of multi edges. (edges with the same source and target) Returns a single-component result (int multiEdgeCount). To be precise, the value returned is computed as follows. Starting with zero, for each pair of ports the result is incremented by the number of edges connecting them if that number is bigger than 1.

Rating red

Constructor Summary
MultiEdgeCountAnalysis()
           
 
Method Summary
 int countMultiEdges(KNode node)
          Counts the number of multi edges in the graph rooted at the given node.
 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

MultiEdgeCountAnalysis

public MultiEdgeCountAnalysis()
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

countMultiEdges

public int countMultiEdges(KNode node)
Counts the number of multi edges in the graph rooted at the given node.

Parameters:
node - root of the graph to analyze.
Returns:
the number of multi edges.