blob: bb0e3ffb40782f132bc7e11c93419056787438d3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
package ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.app;
import java.util.HashMap;
@SuppressWarnings("all")
public class MetricDistanceGroup {
private double mpcDistance;
private double naDistance;
private double outDegreeDistance;
private double nodeTypeDistance;
protected HashMap<String, Double> nodeTypeInfo;
public MetricDistanceGroup(final double mpcDistance, final double naDistance, final double outDegreeDistance, final double nodeTypeDistance) {
this.mpcDistance = mpcDistance;
this.naDistance = naDistance;
this.outDegreeDistance = outDegreeDistance;
this.nodeTypeDistance = nodeTypeDistance;
}
public MetricDistanceGroup(final double mpcDistance, final double naDistance, final double outDegreeDistance) {
this.mpcDistance = mpcDistance;
this.naDistance = naDistance;
this.outDegreeDistance = outDegreeDistance;
}
public double getNodeTypeDistance() {
return this.nodeTypeDistance;
}
public double getMPCDistance() {
return this.mpcDistance;
}
public double getNADistance() {
return this.naDistance;
}
public double getOutDegreeDistance() {
return this.outDegreeDistance;
}
public double getNodeTypePercentage(final String typeName) {
return (this.nodeTypeInfo.getOrDefault(typeName, Double.valueOf(0.0))).doubleValue();
}
}
|