diff options
Diffstat (limited to 'model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/FunctionalRelationView.java')
-rw-r--r-- | model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/FunctionalRelationView.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/FunctionalRelationView.java b/model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/FunctionalRelationView.java index b8d0ef72..71759bc5 100644 --- a/model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/FunctionalRelationView.java +++ b/model-data/src/main/java/org/eclipse/viatra/solver/data/query/view/FunctionalRelationView.java | |||
@@ -8,7 +8,7 @@ import org.eclipse.viatra.solver.data.model.representation.Relation; | |||
8 | public class FunctionalRelationView<D> extends RelationView<D> { | 8 | public class FunctionalRelationView<D> extends RelationView<D> { |
9 | 9 | ||
10 | public FunctionalRelationView(Model model, Relation<D> representation) { | 10 | public FunctionalRelationView(Model model, Relation<D> representation) { |
11 | super(model, representation); | 11 | super(representation); |
12 | } | 12 | } |
13 | 13 | ||
14 | @Override | 14 | @Override |
@@ -22,7 +22,7 @@ public class FunctionalRelationView<D> extends RelationView<D> { | |||
22 | } | 22 | } |
23 | 23 | ||
24 | @Override | 24 | @Override |
25 | public boolean get(Object[] tuple) { | 25 | public boolean get(Model model, Object[] tuple) { |
26 | int[] content = new int[tuple.length-1]; | 26 | int[] content = new int[tuple.length-1]; |
27 | for(int i = 0; i<tuple.length-1; i++) { | 27 | for(int i = 0; i<tuple.length-1; i++) { |
28 | content[i] =((Tuple1)tuple[i]).get(0); | 28 | content[i] =((Tuple1)tuple[i]).get(0); |
@@ -30,7 +30,7 @@ public class FunctionalRelationView<D> extends RelationView<D> { | |||
30 | Tuple key = Tuple.of(content); | 30 | Tuple key = Tuple.of(content); |
31 | @SuppressWarnings("unchecked") | 31 | @SuppressWarnings("unchecked") |
32 | D valueInTuple = (D) tuple[tuple.length-1]; | 32 | D valueInTuple = (D) tuple[tuple.length-1]; |
33 | D valueInMap = this.model.get(representation, key); | 33 | D valueInMap = model.get(representation, key); |
34 | return valueInTuple.equals(valueInMap); | 34 | return valueInTuple.equals(valueInMap); |
35 | } | 35 | } |
36 | 36 | ||