public class LTrieST<E> extends TrieST
8+24+2*r(r为chars数组长度)=chars 8+[49+E(类型字节)+8*r+对齐填充]*n(n为元素个数)+8*r*n*w(w为键的平均长度)
B=48*(n+1)+[E+对齐填充]*n+8*r*n*(w+1)+8+(2*r+n+对齐填充)
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
LTrieST.Node<E>
8+E(类型字节)+25+8*r(r为数组长度)+对齐填充
B=49+E(类型字节)+8*r+对齐填充
若E为String,r=4(例如基因序列A,T,C,G),则B=49+64+2*n(n为字符串长度)+8*4=113+2*n+32=145+2*n+对齐填充
|
| 限定符 | 构造器和说明 |
|---|---|
protected |
LTrieST(char[] chars) |
| 限定符和类型 | 方法和说明 |
|---|---|
E |
get(char[] a) |
protected Iterable<E> |
get(LTrieST.Node<E> x) |
Iterable<E> |
getAll() |
Iterable<E> |
getByPrefix(char[] prefix) |
Iterable<char[]> |
getChars(Predicate<E> predicate,
int limit) |
static <E> LTrieST<E> |
of(char[] chars) |
void |
put(char[] a,
E val) |
Copyright © 2022. All rights reserved.