Class SubsystemComponent

java.lang.Object
org.somox.metrics.abstractmetrics.AbstractMetric
org.somox.metrics.structure.SubsystemComponent
All Implemented Interfaces:
IMetric

public class SubsystemComponent extends AbstractMetric
SubsystemComponent metric
  • Field Details

    • METRIC_ID

      public static final MetricID METRIC_ID
  • Constructor Details

    • SubsystemComponent

      public SubsystemComponent()
  • Method Details

    • initialize

      public void initialize(Root gastModel, SoMoXConfiguration somoxConfiguration, Map<MetricID,IMetric> allMetrics, org.jgrapht.graph.DefaultDirectedGraph<tools.mdsd.jamopp.model.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 interface IMetric
      Overrides:
      initialize in class AbstractMetric
      Parameters:
      gastModel - the Root object of the GAST model
      somoxConfiguration - the configuration of the metric computation
      allMetrics - A map of all metrics available in the running SoMoX instance, maps metricID to Metric implementation
      accessGraph - A graph which contains the number of accesses from the source GASTClass to the target GASTClass for all edges in the
      componentToImplementingClassesHelper - Helper initialized graph
    • internalComputeDirected

      protected void internalComputeDirected(ClusteringRelation relationToCompute)
      Template method to be implemented by subclasses to effectively compute the metric value
      Specified by:
      internalComputeDirected in class AbstractMetric
      Parameters:
      relationToCompute - The relation to compute
    • isCommutative

      public boolean isCommutative()
      Specified by:
      isCommutative in interface IMetric
      Specified by:
      isCommutative in class AbstractMetric
      Returns:
      true if the metric gives the same result if firstComponent and secondComponent are swapped
    • getMID

      public MetricID 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.