Package org.somox.metrics.ratio
Class Instability
java.lang.Object
org.somox.metrics.abstractmetrics.AbstractMetric
org.somox.metrics.abstractmetrics.AbstractComposedMetric
org.somox.metrics.ratio.Instability
- All Implemented Interfaces:
IMetric
Instability metric
The ratio of efferent coupling (Ce) to total coupling. I = Ce / (Ce + Ca).
This metric is an indicator of the package's resilience to change. The range
for this metric is 0 to 1, with I=0 indicating a completely stable package
and I=1 indicating a completely instable package. see
http://www.ndepend.com/Metrics.aspx#Instability
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected IMetric[]
getChildMetrics
(Map<MetricID, IMetric> allMetrics) In a subclass override this method and return the subset of metrics in allMetrics which are needed in this composed metric.protected ICompositionFunction
getCompositionFunction
(SoMoXConfiguration somoxConfiguration) Return the function used to compose the set of child metricsgetMID()
Returns the Metric ID of the Metricboolean
boolean
Methods inherited from class org.somox.metrics.abstractmetrics.AbstractComposedMetric
getAllChildMetrics, initialize, internalComputeDirected, metricIDToIMetric
Methods inherited from class org.somox.metrics.abstractmetrics.AbstractMetric
calculateUnion, calculateUnion, checkMetricPostCondition, checkMetricPreCondition, computeDirected, getAccessGraphCache, getComponentToClassHelper, getLaunchConfigurationTab, getMetric, getMetricParameters
-
Field Details
-
METRIC_ID
-
-
Constructor Details
-
Instability
public Instability()
-
-
Method Details
-
getChildMetrics
Description copied from class:AbstractComposedMetric
In a subclass override this method and return the subset of metrics in allMetrics which are needed in this composed metric.- Specified by:
getChildMetrics
in classAbstractComposedMetric
- Parameters:
allMetrics
- The set of all metrics registered in the system via the metric extension point- Returns:
- The subset of all metrics needed in this composed metric
-
getCompositionFunction
Description copied from class:AbstractComposedMetric
Return the function used to compose the set of child metrics- Specified by:
getCompositionFunction
in classAbstractComposedMetric
- Parameters:
somoxConfiguration
- The somox configuration object used to initialize the function- Returns:
- The function used to compute the composed metric
-
isCommutative
public boolean isCommutative()- Specified by:
isCommutative
in interfaceIMetric
- Overrides:
isCommutative
in classAbstractComposedMetric
- Returns:
- true if the metric gives the same result if firstComponent and secondComponent are swapped
-
getMID
Description copied from interface:IMetric
Returns the Metric ID of the Metric- Returns:
- the metric id of the instance
-
isNormalised
public boolean isNormalised()- Returns:
- whether the metric is normalized. If it is normalized, values of this metric must be between 0.0 and 1.0.
-