diff options
author | 2021-08-16 01:26:25 +0200 | |
---|---|---|
committer | 2021-08-16 01:26:25 +0200 | |
commit | de0fa4bd64f7c38ab2debd9a83affa29b9d42cd0 (patch) | |
tree | c5edf9cc3c26c4a20fd0d349187abb9b34fad3c5 /model-data | |
parent | Removed symbols as they were not on the right abstraction level (diff) | |
download | refinery-de0fa4bd64f7c38ab2debd9a83affa29b9d42cd0.tar.gz refinery-de0fa4bd64f7c38ab2debd9a83affa29b9d42cd0.tar.zst refinery-de0fa4bd64f7c38ab2debd9a83affa29b9d42cd0.zip |
Further renaming
Diffstat (limited to 'model-data')
-rw-r--r-- | model-data/src/main/java/org/eclipse/viatra/solver/data/model/ModelStoreImpl.java | 6 | ||||
-rw-r--r-- | model-data/src/main/java/org/eclipse/viatra/solver/data/model/internal/SimilarRelationEquivalenceClass.java (renamed from model-data/src/main/java/org/eclipse/viatra/solver/data/model/internal/SymbolRepresentationEquivalenceClass.java) | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/model-data/src/main/java/org/eclipse/viatra/solver/data/model/ModelStoreImpl.java b/model-data/src/main/java/org/eclipse/viatra/solver/data/model/ModelStoreImpl.java index 1ff26a5c..f5e3b141 100644 --- a/model-data/src/main/java/org/eclipse/viatra/solver/data/model/ModelStoreImpl.java +++ b/model-data/src/main/java/org/eclipse/viatra/solver/data/model/ModelStoreImpl.java | |||
@@ -14,7 +14,7 @@ import org.eclipse.viatra.solver.data.map.VersionedMap; | |||
14 | import org.eclipse.viatra.solver.data.map.VersionedMapStore; | 14 | import org.eclipse.viatra.solver.data.map.VersionedMapStore; |
15 | import org.eclipse.viatra.solver.data.map.VersionedMapStoreImpl; | 15 | import org.eclipse.viatra.solver.data.map.VersionedMapStoreImpl; |
16 | import org.eclipse.viatra.solver.data.model.internal.ModelImpl; | 16 | import org.eclipse.viatra.solver.data.model.internal.ModelImpl; |
17 | import org.eclipse.viatra.solver.data.model.internal.SymbolRepresentationEquivalenceClass; | 17 | import org.eclipse.viatra.solver.data.model.internal.SimilarRelationEquivalenceClass; |
18 | import org.eclipse.viatra.solver.data.model.representation.AuxilaryData; | 18 | import org.eclipse.viatra.solver.data.model.representation.AuxilaryData; |
19 | import org.eclipse.viatra.solver.data.model.representation.DataRepresentation; | 19 | import org.eclipse.viatra.solver.data.model.representation.DataRepresentation; |
20 | import org.eclipse.viatra.solver.data.model.representation.Relation; | 20 | import org.eclipse.viatra.solver.data.model.representation.Relation; |
@@ -31,13 +31,13 @@ public class ModelStoreImpl implements ModelStore { | |||
31 | Set<DataRepresentation<?, ?>> dataRepresentations) { | 31 | Set<DataRepresentation<?, ?>> dataRepresentations) { |
32 | Map<DataRepresentation<?, ?>, VersionedMapStore<?, ?>> result = new HashMap<>(); | 32 | Map<DataRepresentation<?, ?>, VersionedMapStore<?, ?>> result = new HashMap<>(); |
33 | 33 | ||
34 | Map<SymbolRepresentationEquivalenceClass, List<Relation<?>>> symbolRepresentationsPerHashPerArity = new HashMap<>(); | 34 | Map<SimilarRelationEquivalenceClass, List<Relation<?>>> symbolRepresentationsPerHashPerArity = new HashMap<>(); |
35 | 35 | ||
36 | for (DataRepresentation<?, ?> dataRepresentation : dataRepresentations) { | 36 | for (DataRepresentation<?, ?> dataRepresentation : dataRepresentations) { |
37 | if (dataRepresentation instanceof Relation<?>) { | 37 | if (dataRepresentation instanceof Relation<?>) { |
38 | Relation<?> symbolRepresentation = (Relation<?>) dataRepresentation; | 38 | Relation<?> symbolRepresentation = (Relation<?>) dataRepresentation; |
39 | addOrCreate(symbolRepresentationsPerHashPerArity, | 39 | addOrCreate(symbolRepresentationsPerHashPerArity, |
40 | new SymbolRepresentationEquivalenceClass(symbolRepresentation), symbolRepresentation); | 40 | new SimilarRelationEquivalenceClass(symbolRepresentation), symbolRepresentation); |
41 | } else if (dataRepresentation instanceof AuxilaryData<?, ?>) { | 41 | } else if (dataRepresentation instanceof AuxilaryData<?, ?>) { |
42 | VersionedMapStoreImpl<?, ?> store = new VersionedMapStoreImpl<>(dataRepresentation.getHashProvider(), | 42 | VersionedMapStoreImpl<?, ?> store = new VersionedMapStoreImpl<>(dataRepresentation.getHashProvider(), |
43 | dataRepresentation.getDefaultValue()); | 43 | dataRepresentation.getDefaultValue()); |
diff --git a/model-data/src/main/java/org/eclipse/viatra/solver/data/model/internal/SymbolRepresentationEquivalenceClass.java b/model-data/src/main/java/org/eclipse/viatra/solver/data/model/internal/SimilarRelationEquivalenceClass.java index dff464c2..dbe77662 100644 --- a/model-data/src/main/java/org/eclipse/viatra/solver/data/model/internal/SymbolRepresentationEquivalenceClass.java +++ b/model-data/src/main/java/org/eclipse/viatra/solver/data/model/internal/SimilarRelationEquivalenceClass.java | |||
@@ -6,16 +6,16 @@ import org.eclipse.viatra.solver.data.map.ContinousHashProvider; | |||
6 | import org.eclipse.viatra.solver.data.model.Tuple; | 6 | import org.eclipse.viatra.solver.data.model.Tuple; |
7 | import org.eclipse.viatra.solver.data.model.representation.Relation; | 7 | import org.eclipse.viatra.solver.data.model.representation.Relation; |
8 | 8 | ||
9 | public class SymbolRepresentationEquivalenceClass { | 9 | public class SimilarRelationEquivalenceClass { |
10 | final ContinousHashProvider<Tuple> hashProvider; | 10 | final ContinousHashProvider<Tuple> hashProvider; |
11 | final Class<?> domainClass; | 11 | final Class<?> domainClass; |
12 | final Object defaultValue; | 12 | final Object defaultValue; |
13 | final int arity; | 13 | final int arity; |
14 | public SymbolRepresentationEquivalenceClass(Relation<?> representation) { | 14 | public SimilarRelationEquivalenceClass(Relation<?> representation) { |
15 | this.hashProvider = representation.getHashProvider(); | 15 | this.hashProvider = representation.getHashProvider(); |
16 | this.domainClass = representation.getValueClass(); | 16 | this.domainClass = representation.getValueClass(); |
17 | this.defaultValue = representation.getDefaultValue(); | 17 | this.defaultValue = representation.getDefaultValue(); |
18 | this.arity = representation.getSymbol().getArity(); | 18 | this.arity = representation.getArity(); |
19 | } | 19 | } |
20 | @Override | 20 | @Override |
21 | public int hashCode() { | 21 | public int hashCode() { |
@@ -29,7 +29,7 @@ public class SymbolRepresentationEquivalenceClass { | |||
29 | return false; | 29 | return false; |
30 | if (getClass() != obj.getClass()) | 30 | if (getClass() != obj.getClass()) |
31 | return false; | 31 | return false; |
32 | SymbolRepresentationEquivalenceClass other = (SymbolRepresentationEquivalenceClass) obj; | 32 | SimilarRelationEquivalenceClass other = (SimilarRelationEquivalenceClass) obj; |
33 | return arity == other.arity && Objects.equals(defaultValue, other.defaultValue) | 33 | return arity == other.arity && Objects.equals(defaultValue, other.defaultValue) |
34 | && Objects.equals(domainClass, other.domainClass) && Objects.equals(hashProvider, other.hashProvider); | 34 | && Objects.equals(domainClass, other.domainClass) && Objects.equals(hashProvider, other.hashProvider); |
35 | } | 35 | } |