|
private void buildDoubleArrayTrie(int keySize) |
|
{ |
|
progress = 0; |
|
this.keySize = keySize; |
|
resize(65536 * 32); // 32个双字节 |
|
|
|
base[0] = 1; |
|
nextCheckPos = 0; |
|
|
|
State root_node = this.rootState; |
|
|
|
List<Map.Entry<Integer, State>> siblings = new ArrayList<Map.Entry<Integer, State>>(root_node.getSuccess().entrySet().size()); |
|
fetch(root_node, siblings); |
|
insert(siblings); |
|
} |
#846 行,如果siblings是空列表,还有需要插入么,如果为空列表,则会导致insert 函数抛出IndexOutOfBoundsException
AhoCorasickDoubleArrayTrie/src/main/java/com/hankcs/algorithm/AhoCorasickDoubleArrayTrie.java
Lines 833 to 847 in 9552b2c
#846 行,如果siblings是空列表,还有需要插入么,如果为空列表,则会导致insert 函数抛出IndexOutOfBoundsException