diff options
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend')
1 files changed, 9 insertions, 1 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend index 5fb85b0c..65a8207e 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend | |||
@@ -30,6 +30,8 @@ import java.util.Set | |||
30 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | 30 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration |
31 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | 31 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration |
32 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2NeighbourhoodRepresentation | 32 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2NeighbourhoodRepresentation |
33 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation | ||
34 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation | ||
33 | 35 | ||
34 | class NeighbourhoodBasedStateCoderFactory implements IStateCoderFactory { | 36 | class NeighbourhoodBasedStateCoderFactory implements IStateCoderFactory { |
35 | val List<NeighbourhoodBasedPartialInterpretationStateCoder> statecoders = new LinkedList | 37 | val List<NeighbourhoodBasedPartialInterpretationStateCoder> statecoders = new LinkedList |
@@ -142,7 +144,13 @@ class NeighbourhoodBasedPartialInterpretationStateCoder implements IStateCoder{ | |||
142 | } else if(o instanceof PartialRelationInterpretation) { | 144 | } else if(o instanceof PartialRelationInterpretation) { |
143 | return o.interpretationOf.name | 145 | return o.interpretationOf.name |
144 | } else if(o instanceof PartialTypeInterpratation) { | 146 | } else if(o instanceof PartialTypeInterpratation) { |
145 | return o.interpretationOf.name | 147 | if(o instanceof PartialPrimitiveInterpretation) { |
148 | o.class.simpleName.hashCode | ||
149 | } else if (o instanceof PartialComplexTypeInterpretation){ | ||
150 | return o.interpretationOf.name.hashCode | ||
151 | } else { | ||
152 | throw new UnsupportedOperationException('''Unsupported type: «o.class.simpleName»''') | ||
153 | } | ||
146 | } else { | 154 | } else { |
147 | throw new UnsupportedOperationException('''Unsupported type: «o.class.simpleName»''') | 155 | throw new UnsupportedOperationException('''Unsupported type: «o.class.simpleName»''') |
148 | } | 156 | } |