|
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.ethz.mxquery.sms.btree.Leaf
public class Leaf
Represents a b-tree leaf node.
Constructor Summary | |
---|---|
Leaf(int k_star)
|
|
Leaf(int k_star,
LeafArrayMap entries)
|
|
Leaf(int k_star,
LeafArrayMap entries,
InternalNode parent)
|
Method Summary | |
---|---|
SplitInfo |
add(DeweyIdentifier key,
LinguisticToken value,
DeweyIdentifier lowKey,
DeweyIdentifier highKey,
LeafCarrier leafCarrier)
Add (generally updates) is not supported in the BTree |
ObjectObjectPair |
bulkAdd(ObjectObjectPair data,
int k,
double F)
adds a data pair (key,value) if the leaf is full, create new leaf and return value and leaf else insert value into leaf |
BTreeNode |
get(DeweyIdentifier key)
|
BTreeNode |
getBTreeNode(DeweyIdentifier key)
Returns the internal node/ leaf that contains the key "key" |
void |
getFirstKeyAfter(DeweyIdentifier key,
Leaf[] inLeaf,
int[] atPos)
Creates pointers to the given key or if the key is not in the tree, to the smallest key larger than the given one that is in the tree. |
DeweyIdentifier |
getHighestKey()
|
void |
getLastKeyBefore(DeweyIdentifier key,
Leaf[] inLeaf,
int[] atPos)
Creates pointers to the given key or if the key is not in the tree, to the largest key smaller than the given one that is in the tree. |
DeweyIdentifier |
getLowestKey()
gets the lowest key recursively |
Leaf |
getNextLeaf()
|
Leaf |
getPrevLeaf()
|
BTreeNode |
getRoot()
To get the root of the btree this node is sitting in |
boolean |
isEmpty()
Indicates if this node is empty. |
boolean |
isEqual(Leaf leaf)
|
boolean |
isLeaf()
Indicates if this node is a leaf. |
void |
queryRange(DeweyIdentifier lowKey,
DeweyIdentifier highKey,
BtreePushOperator results)
Obtains all values mapped to the given key range (low and high, inclusive) |
void |
remove(DeweyIdentifier key,
LinguisticToken value,
DeweyIdentifier lowKey,
DeweyIdentifier highKey)
Remove (generally updates) is not supported in the BTree |
void |
removeValue(LinguisticToken value)
|
void |
setNextLeaf(Leaf nextLeaf)
|
void |
setParent(InternalNode parentNode)
sets the parentNode. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Leaf(int k_star, LeafArrayMap entries)
public Leaf(int k_star, LeafArrayMap entries, InternalNode parent)
public Leaf(int k_star)
Method Detail |
---|
public SplitInfo add(DeweyIdentifier key, LinguisticToken value, DeweyIdentifier lowKey, DeweyIdentifier highKey, LeafCarrier leafCarrier)
add
in interface BTreeNode
public void remove(DeweyIdentifier key, LinguisticToken value, DeweyIdentifier lowKey, DeweyIdentifier highKey)
remove
in interface BTreeNode
public java.lang.String toString()
toString
in class java.lang.Object
public BTreeNode get(DeweyIdentifier key)
public void queryRange(DeweyIdentifier lowKey, DeweyIdentifier highKey, BtreePushOperator results)
queryRange
in interface BTreeNode
lowKey
- highKey
- results
- public boolean isLeaf()
BTreeNode
isLeaf
in interface BTreeNode
public boolean isEmpty()
BTreeNode
isEmpty
in interface BTreeNode
public void removeValue(LinguisticToken value)
public ObjectObjectPair bulkAdd(ObjectObjectPair data, int k, double F)
bulkAdd
in interface BTreeNode
data
- k
- F
-
public BTreeNode getRoot()
BTreeNode
getRoot
in interface BTreeNode
public void setParent(InternalNode parentNode)
BTreeNode
setParent
in interface BTreeNode
public DeweyIdentifier getLowestKey()
BTreeNode
getLowestKey
in interface BTreeNode
public DeweyIdentifier getHighestKey()
public void setNextLeaf(Leaf nextLeaf)
public Leaf getNextLeaf()
public Leaf getPrevLeaf()
public boolean isEqual(Leaf leaf)
public void getFirstKeyAfter(DeweyIdentifier key, Leaf[] inLeaf, int[] atPos)
BTreeNode
getFirstKeyAfter
in interface BTreeNode
inLeaf
- points to the leaf where to get the keyatPos
- points to the position of the key inside the leafpublic void getLastKeyBefore(DeweyIdentifier key, Leaf[] inLeaf, int[] atPos)
BTreeNode
getLastKeyBefore
in interface BTreeNode
inLeaf
- points to the leaf where to get the keyatPos
- points to the position of the key inside the leafpublic BTreeNode getBTreeNode(DeweyIdentifier key)
BTreeNode
getBTreeNode
in interface BTreeNode
|
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |