Skip to content
Snippets Groups Projects
Commit e0e83fbc authored by Jeffery Tian's avatar Jeffery Tian
Browse files

Merge remote-tracking branch 'origin/master' into master

# Conflicts:
#	src/tests/gitlab/ckpt1/Ckpt1Tests.java
parents c34b6bc5 6498053c
No related branches found
No related tags found
2 merge requests!2Merge,!1message.json is switched to message_1.json
......@@ -3,7 +3,7 @@ package datastructures.dictionaries;
import java.util.Iterator;
import java.util.function.Supplier;
import cse332.datastructures.containers.*;
import cse332.datastructures.containers.Item;
import cse332.exceptions.NotYetImplementedException;
import cse332.interfaces.misc.DeletelessDictionary;
import cse332.interfaces.misc.Dictionary;
......
......@@ -2,7 +2,7 @@ package datastructures.dictionaries;
import java.util.Iterator;
import cse332.datastructures.containers.*;
import cse332.datastructures.containers.Item;
import cse332.exceptions.NotYetImplementedException;
import cse332.interfaces.misc.DeletelessDictionary;
......
......@@ -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) {
......
......@@ -8,9 +8,9 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
MinFourHeapComparableTests.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