Package org.somox.metrics.structure
Class SubsystemComponent
java.lang.Object
org.somox.metrics.abstractmetrics.AbstractMetric
org.somox.metrics.structure.SubsystemComponent
- All Implemented Interfaces:
IMetric
SubsystemComponent metric
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetMID()
Returns the Metric ID of the Metricvoid
initialize
(Root gastModel, SoMoXConfiguration somoxConfiguration, Map<MetricID, IMetric> allMetrics, org.jgrapht.DirectedGraph<org.emftext.language.java.classifiers.ConcreteClassifier, ClassAccessGraphEdge> accessGraph, ComponentToImplementingClassesHelper componentToImplementingClassesHelper) Initializes the Metric.protected void
internalComputeDirected
(ClusteringRelation relationToCompute) Template method to be implemented by subclasses to effectively compute the metric valueboolean
boolean
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
-
SubsystemComponent
public SubsystemComponent()
-
-
Method Details
-
initialize
public void initialize(Root gastModel, SoMoXConfiguration somoxConfiguration, Map<MetricID, IMetric> allMetrics, org.jgrapht.DirectedGraph<org.emftext.language.java.classifiers.ConcreteClassifier, ClassAccessGraphEdge> accessGraph, ComponentToImplementingClassesHelper componentToImplementingClassesHelper) Description copied from interface:IMetric
Initializes the Metric. Must be called before metrics are computed. Should be called again, if the model changed- Specified by:
initialize
in interfaceIMetric
- Overrides:
initialize
in classAbstractMetric
- Parameters:
gastModel
- the Root object of the GAST modelsomoxConfiguration
- the configuration of the metric computationallMetrics
- A map of all metrics available in the running SoMoX instance, maps metricID to Metric implementationaccessGraph
- A graph which contains the number of accesses from the source GASTClass to the target GASTClass for all edges in thecomponentToImplementingClassesHelper
- Helper initialized graph
-
internalComputeDirected
Template method to be implemented by subclasses to effectively compute the metric value- Specified by:
internalComputeDirected
in classAbstractMetric
- Parameters:
relationToCompute
- The relation to compute
-
isCommutative
public boolean isCommutative()- Specified by:
isCommutative
in interfaceIMetric
- Specified by:
isCommutative
in classAbstractMetric
- Returns:
- true if the metric gives the same result if firstComponent and secondComponent are swapped
-
getMID
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.
-