www.sdmetrics.com

com.sdmetrics.metrics
Class MetricProcedureConnectedComponents

java.lang.Object
  extended by com.sdmetrics.metrics.AbstractProcedure
      extended by com.sdmetrics.metrics.MetricProcedure
          extended by com.sdmetrics.metrics.MetricProcedureConnectedComponents

public class MetricProcedureConnectedComponents
extends MetricProcedure

Calculates a "connectedcomponents" metric procedure.


Constructor Summary
MetricProcedureConnectedComponents()
           
 
Method Summary
 java.lang.Integer calculate(ModelElement element, Metric metric)
          Calculates the metric procedure.
 StronglyConnectedComponents<ModelElement> getConnectedComponents(MetricsEngine engine, ModelElement element, Metric metric)
          Calculates the connected components for a model element.
 
Methods inherited from class com.sdmetrics.metrics.AbstractProcedure
evalBooleanExpression, evalElementSetExpression, evalExpression, evalSetExpression, getFilterAttributeProcessor, getMetaModel, getMetricsEngine, getModel, getRelationOrSet, isCompatible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetricProcedureConnectedComponents

public MetricProcedureConnectedComponents()
Method Detail

calculate

public java.lang.Integer calculate(ModelElement element,
                                   Metric metric)
                            throws SDMetricsException
Description copied from class: MetricProcedure
Calculates the metric procedure.

Specified by:
calculate in class MetricProcedure
Parameters:
element - The model element for which to calculate the procedure.
metric - The metric to calculate.
Returns:
Number of connected components as defined by the metric.
Throws:
SDMetricsException - Problem during the calculation of the metric.

getConnectedComponents

public StronglyConnectedComponents<ModelElement> getConnectedComponents(MetricsEngine engine,
                                                                        ModelElement element,
                                                                        Metric metric)
                                                                 throws SDMetricsException
Calculates the connected components for a model element.

Parameters:
engine - The metrics engine to calculate the connected components
element - Model element for which to calculate the connected components
metric - Metric that defines the connected components
Returns:
The connected components for the specified model element and metric.
Throws:
SDMetricsException - Problem during the calculation

www.sdmetrics.com