diff --git a/src/datastructures/worklists/.gitkeep b/src/datastructures/worklists/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/p2/wordsuggestor/NGramToNextChoicesMap.java b/src/p2/wordsuggestor/NGramToNextChoicesMap.java index 74201965d0730b24468808c957aaa3904755e1eb..c038c93d342b5f2ec4b006aa6351aa8c0fc5bd1f 100644 --- a/src/p2/wordsuggestor/NGramToNextChoicesMap.java +++ b/src/p2/wordsuggestor/NGramToNextChoicesMap.java @@ -27,10 +27,10 @@ public class NGramToNextChoicesMap { * Increments the count of word after the particular NGram ngram. */ public void seenWordAfterNGram(NGram ngram, String word) { - Dictionary<AlphabeticString, Integer> counter = map.find((NGram) ngram); + Dictionary<AlphabeticString, Integer> counter = map.find(ngram); if (counter == null) { counter = newInner.get(); - map.insert((NGram) ngram, counter); + map.insert(ngram, counter); } Integer prev = counter.find(new AlphabeticString(word)); @@ -54,7 +54,7 @@ public class NGramToNextChoicesMap { if (ngram == null) { return (Item<String, Integer>[]) new Item[0]; } - Dictionary<AlphabeticString, Integer> counter = map.find((NGram) ngram); + Dictionary<AlphabeticString, Integer> counter = map.find(ngram); Item<String, Integer>[] result = (Item<String, Integer>[]) new Item[counter != null ? counter.size() : 0]; if (counter != null) { diff --git a/src/tests/gitlab/ckpt1/Ckpt1Tests.java b/src/tests/gitlab/ckpt1/Ckpt1Tests.java index 3e0cdbb84e86aa973ef5ebe00d373423f29905ed..c2ab67685e139ee3b46b2dab7efaca490876d746 100644 --- a/src/tests/gitlab/ckpt1/Ckpt1Tests.java +++ b/src/tests/gitlab/ckpt1/Ckpt1Tests.java @@ -10,7 +10,8 @@ import org.junit.runners.Suite; @Suite.SuiteClasses({ MinFourHeapComparable.class, MoveToFrontListTests.class, - CircularArrayComparatorTests.class + CircularArrayComparatorTests.class, + MinFourHeapComparableTests.class }) public class Ckpt1Tests {