public class DoubleArrayTrieInteger extends Object implements Serializable
Integer的DoubleArrayTrie,相当于DoubleArrayTrie<Integer>,但比后者省内存,所以保留两份代码| Constructor and Description |
|---|
DoubleArrayTrieInteger() |
| Modifier and Type | Method and Description |
|---|---|
int |
build(List<String> key) |
int |
build(List<String> _key,
int[] _length,
int[] _value,
int _keySize) |
List<Integer> |
commonPrefixSearch(String key) |
List<Integer> |
commonPrefixSearch(String key,
int pos,
int len,
int nodePos) |
void |
dump() |
int |
exactMatchSearch(String key) |
int |
exactMatchSearch(String key,
int pos,
int len,
int nodePos) |
int[] |
getBase() |
int[] |
getCheck() |
List<String> |
getKey() |
int[] |
getLength() |
int |
getNonzeroSize() |
int |
getSize() |
int |
getTotalSize() |
int |
getUnitSize() |
int[] |
getValue() |
void |
open(String fileName) |
void |
recoverKeyValue() |
void |
save(String fileName) |
void |
setBase(int[] base) |
void |
setCheck(int[] check) |
void |
setKey(List<String> key) |
void |
setLength(int[] length) |
void |
setSize(int size) |
void |
setValue(int[] value) |
public int getUnitSize()
public int getSize()
public int getTotalSize()
public int getNonzeroSize()
public void recoverKeyValue()
public void open(String fileName) throws IOException
IOExceptionpublic void save(String fileName) throws IOException
IOExceptionpublic int exactMatchSearch(String key)
public int exactMatchSearch(String key, int pos, int len, int nodePos)
public List<Integer> commonPrefixSearch(String key, int pos, int len, int nodePos)
public void dump()
public int[] getValue()
public void setValue(int[] value)
public int[] getCheck()
public void setCheck(int[] check)
public int[] getBase()
public void setBase(int[] base)
public int[] getLength()
public void setLength(int[] length)
public void setSize(int size)
Copyright © 2014–2021 码农场. All rights reserved.