| Modifier and Type | Class and Description |
|---|---|
static class |
CritBit.CheckEmptyWithMask |
static class |
CritBit.Entry<V> |
static class |
CritBit.FullIterator<V> |
static class |
CritBit.QueryIterator<V> |
static class |
CritBit.QueryIteratorKD<V> |
static class |
CritBit.QueryIteratorWithMask<V> |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkTree() |
boolean |
contains(long[] key)
Check whether a given key exists in the tree.
|
boolean |
containsKD(long[] key)
Check whether a given key exists in the tree.
|
static <V> CritBit1D<V> |
create1D(int width)
Create a 1D crit-bit tree with arbitrary key length.
|
static <V> CritBitKD<V> |
createKD(int width,
int dim)
Create a kD crit-bit tree with maximum 64bit key length.
|
V |
get(long[] key)
Get the value for a given key.
|
V |
getKD(long[] key)
Get the value for a given key.
|
CritBit.FullIterator<V> |
iterator()
Create an iterator over all values, keys or entries.
|
void |
printTree() |
V |
put(long[] key,
V val)
Add a key value pair to the tree or replace the value if the key already exists.
|
V |
putKD(long[] key,
V val)
Add a key value pair to the tree or replace the value if the key already exists.
|
CritBit.QueryIterator<V> |
query(long[] min,
long[] max) |
CritBit.QueryIteratorKD<V> |
queryKD(long[] min,
long[] max)
Performs a k-dimensional query.
|
protected static <T> void |
readInfix(org.tinspin.index.critbit.CritBit.Node<T> n,
long[] currentPrefix) |
V |
remove(long[] key)
Remove a key and its value
|
V |
removeKD(long[] key)
Remove a key and its value
|
int |
size()
Get the size of the tree.
|
String |
toString() |
public static <V> CritBit1D<V> create1D(int width)
V - value typewidth - The number of bits per valuepublic static <V> CritBitKD<V> createKD(int width, int dim)
V - value typewidth - The number of bits per valuedim - The number of dimensionspublic V put(long[] key, V val)
put in interface CritBit1D<V>key - keyval - valuenull if there was no previous valueput(long[], Object)public void printTree()
public boolean checkTree()
protected static <T> void readInfix(org.tinspin.index.critbit.CritBit.Node<T> n,
long[] currentPrefix)
T - value typen - nodecurrentPrefix - prefixpublic int size()
public boolean contains(long[] key)
contains in interface CritBit1D<V>key - keytrue if the key exists otherwise falsecontains(long[])public V get(long[] key)
get in interface CritBit1D<V>key - keykey or null if the key does not exist.get(long[])public V remove(long[] key)
remove in interface CritBit1D<V>key - keynull if the value was not found.remove(long[])public CritBit.FullIterator<V> iterator()
iterator in interface CritBit1D<V>iterator()public CritBit.QueryIterator<V> query(long[] min, long[] max)
query in interface CritBit1D<V>query(long[], long[])public V putKD(long[] key, V val)
putKD in interface CritBitKD<V>key - keyval - valuenull if there was no previous valueputKD(long[], Object)public boolean containsKD(long[] key)
containsKD in interface CritBitKD<V>key - keytrue if the key exists otherwise falsecontainsKD(long[])public V getKD(long[] key)
getKD in interface CritBitKD<V>key - keykey or null if the key does not exist.getKD(long[])public V removeKD(long[] key)
removeKD in interface CritBitKD<V>key - keynull if the value was not found.removeKD(long[])public CritBit.QueryIteratorKD<V> queryKD(long[] min, long[] max)
queryKD in interface CritBitKD<V>min - minimum keymax - maximum keyqueryKD(long[], long[])Copyright © 2017. All rights reserved.