diff options
author | 2019-10-19 22:17:48 +0200 | |
---|---|---|
committer | 2019-10-19 22:17:48 +0200 | |
commit | bdae1b59c53cd1743b8b2ad2cd1d3c3a51327e8b (patch) | |
tree | cf1189c94c10f20d3acbedf5ec52ad76804a5ea1 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf | |
parent | handler refactor (diff) | |
download | VIATRA-Generator-bdae1b59c53cd1743b8b2ad2cd1d3c3a51327e8b.tar.gz VIATRA-Generator-bdae1b59c53cd1743b8b2ad2cd1d3c3a51327e8b.tar.zst VIATRA-Generator-bdae1b59c53cd1743b8b2ad2cd1d3c3a51327e8b.zip |
fixing index out ot bound exceptions for state coders
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf')
1 files changed, 1 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 a86bcd1f..19c70574 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 | |||
@@ -133,11 +133,11 @@ class NeighbourhoodBasedPartialInterpretationStateCoder implements IStateCoder{ | |||
133 | 133 | ||
134 | while(index < size) { | 134 | while(index < size) { |
135 | res.add(getCode(match.get(index))) | 135 | res.add(getCode(match.get(index))) |
136 | index++ | ||
137 | for(var i = 0; i<index; i++) { | 136 | for(var i = 0; i<index; i++) { |
138 | val number = if(match.get(index) === match.get(i)){1}else{0} | 137 | val number = if(match.get(index) === match.get(i)){1}else{0} |
139 | equivalenceHash = prime * equivalenceHash + number | 138 | equivalenceHash = prime * equivalenceHash + number |
140 | } | 139 | } |
140 | index++ | ||
141 | } | 141 | } |
142 | 142 | ||
143 | statecoderRuntime += (System.nanoTime - startTime) | 143 | statecoderRuntime += (System.nanoTime - startTime) |