| 程序包 | 说明 |
|---|---|
| com.hankcs.hanlp.collection.trie.bintrie | |
| com.hankcs.hanlp.collection.trie.bintrie.util |
| 限定符和类型 | 类和说明 |
|---|---|
class |
BinTrie<V>
首字直接分配内存,之后二分动态数组的Trie树,能够平衡时间和空间
|
class |
Node<V>
深度大于等于2的子节点
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected BaseNode[] |
BaseNode.child
子节点
|
| 限定符和类型 | 方法和说明 |
|---|---|
BaseNode |
Node.getChild(char c) |
BaseNode |
BinTrie.getChild(char c) |
abstract BaseNode |
BaseNode.getChild(char c)
获取子节点
|
BaseNode<V> |
BaseNode.transition(char[] path,
int begin) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
Node.addChild(BaseNode node) |
protected boolean |
BinTrie.addChild(BaseNode node) |
protected abstract boolean |
BaseNode.addChild(BaseNode node)
添加子节点
|
int |
BaseNode.compareTo(BaseNode other) |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
ArrayTool.binarySearch(BaseNode[] branches,
BaseNode node)
二分查找
|
static int |
ArrayTool.binarySearch(BaseNode[] branches,
BaseNode node)
二分查找
|
static int |
ArrayTool.binarySearch(BaseNode[] branches,
char node) |
Copyright © 2014–2017 码农场. All rights reserved.