This commit is contained in:
eugenefischer
2022-09-26 23:17:18 -05:00
parent 077af3b46e
commit 70fec95a00

View File

@@ -221,7 +221,7 @@ public class Plate {
if (rand.nextDouble() <= readErrorProb) { if (rand.nextDouble() <= readErrorProb) {
readError = true; readError = true;
StringBuilder spurious = new StringBuilder(cell[sIndex]); StringBuilder spurious = new StringBuilder(cell[sIndex]);
if (rand.nextDouble() > errorCollisionProb) { if (!distinctMisreadCounts.containsKey(cell[sIndex]) || rand.nextDouble() > errorCollisionProb) {
distinctMisreadCounts.merge(cell[sIndex], 1, (oldValue, newValue) -> oldValue + newValue); distinctMisreadCounts.merge(cell[sIndex], 1, (oldValue, newValue) -> oldValue + newValue);
for (int j = 0; j < distinctMisreadCounts.get(cell[sIndex]); j++) { for (int j = 0; j < distinctMisreadCounts.get(cell[sIndex]); j++) {
spurious.append("*"); spurious.append("*");