|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.hankcs.hanlp.collection.dartsclone.DoubleArray
public class DoubleArray
双数组DAWG
| 构造方法摘要 | |
|---|---|
DoubleArray()
|
|
| 方法摘要 | |
|---|---|
void |
build(byte[][] keys,
int[] values)
构建 |
void |
build(List<String> keys,
int[] values)
|
List<Pair<Integer,Integer>> |
commonPrefixSearch(byte[] key,
int offset,
int maxResults)
Returns the keys that begins with the given key and its corresponding values. |
int |
exactMatchSearch(byte[] key)
Returns the corresponding value if the key is found. |
int |
exactMatchSearch(String key)
Returns the corresponding value if the key is found. |
void |
open(InputStream stream)
Read from a stream. |
void |
save(OutputStream stream)
Saves the trie data into a stream. |
int |
size()
大小 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public DoubleArray()
| 方法详细信息 |
|---|
public void build(byte[][] keys,
int[] values)
keys - 字节形式的键values - 值
public void build(List<String> keys,
int[] values)
public void open(InputStream stream)
throws IOException
stream -
IOException
public void save(OutputStream stream)
throws IOException
stream -
IOExceptionpublic int exactMatchSearch(String key)
key - search key
public int exactMatchSearch(byte[] key)
key - search key
public List<Pair<Integer,Integer>> commonPrefixSearch(byte[] key,
int offset,
int maxResults)
key - offset - maxResults -
public int size()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||