public class NameResemblance extends AbstractMetric
Type
s in any of the two component candidates the similar names and
divides it by the total amount of names. The names are trimmed before they are compared, i.e., their prefixes and suffixes are
removed as configured on this metric's configuration tab.Constructor and Description |
---|
NameResemblance() |
Modifier and Type | Method and Description |
---|---|
MetricTab |
getLaunchConfigurationTab()
Returns the GUI launch configuration tab that can be used to configure the metric.
|
MetricID |
getMID()
Returns the Metric ID of the Metric
|
void |
initialize(Root gastModel,
SoMoXConfiguration somoxConfiguration,
java.util.Map<MetricID,IMetric> allMetrics,
<any> accessGraph,
ComponentToImplementingClassesHelper componentToImplementingClassesHelper)
Initializes the Metric.
|
boolean |
isCommutative() |
boolean |
isNormalised() |
computeDirected, getMetricParameters
public static final MetricID METRIC_ID
public void initialize(Root gastModel, SoMoXConfiguration somoxConfiguration, java.util.Map<MetricID,IMetric> allMetrics, <any> accessGraph, ComponentToImplementingClassesHelper componentToImplementingClassesHelper)
IMetric
initialize
in interface IMetric
initialize
in class AbstractMetric
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 graphpublic boolean isCommutative()
isCommutative
in interface IMetric
isCommutative
in class AbstractMetric
public MetricTab getLaunchConfigurationTab()
getLaunchConfigurationTab
in interface IMetric
getLaunchConfigurationTab
in class AbstractMetric
public MetricID getMID()
public boolean isNormalised()