Skip to content
Snippets Groups Projects
Commit 7611fb23 authored by Richard Jiang's avatar Richard Jiang
Browse files

Added MinFourHeaPComparableTests

parent f6682fcb
No related branches found
No related tags found
No related merge requests found
Pipeline #367602 failed with stage
in 53 seconds
......@@ -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) {
......
......@@ -10,7 +10,8 @@ import org.junit.runners.Suite;
@Suite.SuiteClasses({
MinFourHeapComparable.class,
MoveToFrontListTests.class,
CircularArrayComparatorTests.class
CircularArrayComparatorTests.class,
MinFourHeapComparableTests.class
})
public class Ckpt1Tests {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment