diff options
Diffstat (limited to 'Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/PartialInterpretationGraph.xtend')
-rw-r--r-- | Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/PartialInterpretationGraph.xtend | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/PartialInterpretationGraph.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/PartialInterpretationGraph.xtend index 91d7c5f9..bb679bf6 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/PartialInterpretationGraph.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/PartialInterpretationGraph.xtend | |||
@@ -19,7 +19,11 @@ class PartialInterpretationGraph extends Graph{ | |||
19 | //the edge types are defined in terms of RelationDeclaration | 19 | //the edge types are defined in terms of RelationDeclaration |
20 | partial.problem.relations.filter(RelationDeclaration).forEach[ | 20 | partial.problem.relations.filter(RelationDeclaration).forEach[ |
21 | //only need the name of the reference type (remove everything with and after "reference") | 21 | //only need the name of the reference type (remove everything with and after "reference") |
22 | this.statistic.addEdgeType(it.name.split(" ").get(0)); | 22 | var n = it.name.split(" ").get(0); |
23 | // TODO: Here is to only consider one part of opposite edges | ||
24 | //if(!n.equals('target') && !n.equals('source') /* && !n.equals('incomingTransitions')*/){ | ||
25 | this.statistic.addEdgeType(n); | ||
26 | //} | ||
23 | ] | 27 | ] |
24 | // add all elements | 28 | // add all elements |
25 | val typeInterpretations = getTypes(partial); | 29 | val typeInterpretations = getTypes(partial); |
@@ -33,9 +37,12 @@ class PartialInterpretationGraph extends Graph{ | |||
33 | for(relationInterpretation : partial.partialrelationinterpretation) { | 37 | for(relationInterpretation : partial.partialrelationinterpretation) { |
34 | //only need the name of the reference type (remove everything with and after "reference") | 38 | //only need the name of the reference type (remove everything with and after "reference") |
35 | val type = relationInterpretation.interpretationOf.name.split(" ").get(0); | 39 | val type = relationInterpretation.interpretationOf.name.split(" ").get(0); |
36 | for(edge : relationInterpretation.relationlinks.filter(BinaryElementRelationLink)){ | 40 | // TODO: Here is to only consider one part of opposite edges |
37 | statistic.addEdge(edge.param1, edge.param2, type); | 41 | //if(!type.equals('target') && !type.equals('source') /*&& !type.equals('incomingTransitions')*/){ |
38 | } | 42 | for(edge : relationInterpretation.relationlinks.filter(BinaryElementRelationLink)){ |
43 | statistic.addEdge(edge.param1, edge.param2, type); | ||
44 | } | ||
45 | //} | ||
39 | } | 46 | } |
40 | 47 | ||
41 | this.name = name; | 48 | this.name = name; |