public class NameResemblance extends AbstractMetric
Types 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, getMetricParameterspublic static final MetricID METRIC_ID
public void initialize(Root gastModel, SoMoXConfiguration somoxConfiguration, java.util.Map<MetricID,IMetric> allMetrics, <any> accessGraph, ComponentToImplementingClassesHelper componentToImplementingClassesHelper)
IMetricinitialize in interface IMetricinitialize in class AbstractMetricgastModel - 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 IMetricisCommutative in class AbstractMetricpublic MetricTab getLaunchConfigurationTab()
getLaunchConfigurationTab in interface IMetricgetLaunchConfigurationTab in class AbstractMetricpublic MetricID getMID()
public boolean isNormalised()