ROOT
6.06/09
Reference Guide
|
Public Member Functions | |
TBtLeafNode (TBtInnerNode *p, const TObject *obj=0, TBtree *t=0) | |
Constructor. More... | |
~TBtLeafNode () | |
Destructor. More... | |
void | Add (const TObject *obj, Int_t idx) |
Add the object OBJ to the leaf node, inserting it at location INDEX in the fItem array. More... | |
void | Remove (Int_t idx) |
Remove an element. More... | |
void | RemoveItem (Int_t idx) |
TObject * | operator[] (Int_t i) const |
TObject * | Found (const TObject *obj, TBtNode **which, Int_t *where) |
WHAT was not in any inner node; it is either here, or it's not in the tree. More... | |
Int_t | NofKeys (Int_t i) const |
Return the number of keys. More... | |
Int_t | NofKeys () const |
Return the number of keys. More... | |
Int_t | FindRank (const TObject *obj) const |
WHAT was not in any inner node; it is either here, or it's not in the tree. More... | |
TObject * | GetKey (Int_t idx) |
void | SetKey (Int_t idx, TObject *obj) |
Int_t | IndexOf (const TObject *obj) const |
Returns a number in the range 0 to MaxIndex(). More... | |
TBtLeafNode * | FirstLeafNode () |
Return the first node. More... | |
TBtLeafNode * | LastLeafNode () |
return the last node. More... | |
void | Split () |
This function is called only when THIS is the only descendent of the root node, and THIS needs to be split. More... | |
void | SplitWith (TBtLeafNode *r, Int_t idx) |
Split. More... | |
void | MergeWithRight (TBtLeafNode *r, Int_t idx) |
Merge. More... | |
void | BalanceWithLeft (TBtLeafNode *l, Int_t idx) |
THIS has more than LEFTSIB; move some items from THIS to LEFTSIB. More... | |
void | BalanceWithRight (TBtLeafNode *r, Int_t idx) |
THIS has more than RIGHTSIB; move some items from THIS to RIGHTSIB. More... | |
void | BalanceWith (TBtLeafNode *n, Int_t idx) |
PITEM is the parent item whose key will change when keys are shifted from one LeafNode to the other. More... | |
void | PushLeft (Int_t cnt, TBtLeafNode *l, Int_t parentIndex) |
noFromThis==1 => moves the parent item into the leftsib, and the first item in this's array into the parent item. More... | |
void | PushRight (Int_t cnt, TBtLeafNode *r, Int_t parentIndex) |
noFromThis==1 => moves the parent item into the rightsib, and the last item in this's array into the parent item. More... | |
void | AppendFrom (TBtLeafNode *src, Int_t start, Int_t stop) |
A convenience function, does not worry about the element in the parent, simply moves elements from SRC[start] to SRC[stop] into the current array. More... | |
void | Append (TObject *obj) |
Never called from anywhere where it might fill up THIS does NOT handle nofKeys. More... | |
void | ShiftLeft (Int_t cnt) |
Shift. More... | |
Int_t | Psize () const |
Int_t | Vsize () const |
Int_t | MaxIndex () const |
Int_t | MaxPsize () const |
Int_t | IsFull () const |
Int_t | IsAlmostFull () const |
Int_t | IsLow () const |
Public Member Functions inherited from TBtNode | |
TBtNode (Int_t isleaf, TBtInnerNode *p, TBtree *t=0) | |
Create a B-tree node. More... | |
virtual | ~TBtNode () |
Delete a B-tree node. More... | |
virtual TBtree * | GetParentTree () const |
Private Attributes | |
TObject ** | fItem |
Friends | |
class | TBtInnerNode |
Additional Inherited Members | |
Protected Attributes inherited from TBtNode | |
Int_t | fLast |
TBtInnerNode * | fParent |
TBtree * | fTree |
Int_t | fIsLeaf |
#include <TBtree.h>
TBtLeafNode::TBtLeafNode | ( | TBtInnerNode * | p, |
const TObject * | obj = 0 , |
||
TBtree * | t = 0 |
||
) |
TBtLeafNode::~TBtLeafNode | ( | ) |
Destructor.
Definition at line 1372 of file TBtree.cxx.
Add the object OBJ to the leaf node, inserting it at location INDEX in the fItem array.
Implements TBtNode.
Definition at line 1381 of file TBtree.cxx.
Referenced by TBtInnerNode::Add().
Never called from anywhere where it might fill up THIS does NOT handle nofKeys.
Definition at line 1438 of file TBtree.cxx.
Referenced by MergeWithRight(), and PushLeft().
void TBtLeafNode::AppendFrom | ( | TBtLeafNode * | src, |
Int_t | start, | ||
Int_t | stop | ||
) |
A convenience function, does not worry about the element in the parent, simply moves elements from SRC[start] to SRC[stop] into the current array.
This should never create a full node. That is, it is not used anywhere where THIS could possibly be near full. Does NOT handle nofKeys.
Definition at line 1422 of file TBtree.cxx.
Referenced by PushLeft().
void TBtLeafNode::BalanceWith | ( | TBtLeafNode * | rightsib, |
Int_t | pidx | ||
) |
PITEM is the parent item whose key will change when keys are shifted from one LeafNode to the other.
Definition at line 1471 of file TBtree.cxx.
Referenced by TBtInnerNode::IsLow().
void TBtLeafNode::BalanceWithLeft | ( | TBtLeafNode * | l, |
Int_t | idx | ||
) |
THIS has more than LEFTSIB; move some items from THIS to LEFTSIB.
Definition at line 1448 of file TBtree.cxx.
Referenced by BalanceWith(), and TBtInnerNode::IsFull().
void TBtLeafNode::BalanceWithRight | ( | TBtLeafNode * | r, |
Int_t | idx | ||
) |
THIS has more than RIGHTSIB; move some items from THIS to RIGHTSIB.
Definition at line 1459 of file TBtree.cxx.
Referenced by BalanceWith(), TBtInnerNode::IsFull(), and Split().
WHAT was not in any inner node; it is either here, or it's not in the tree.
Implements TBtNode.
Definition at line 1483 of file TBtree.cxx.
|
virtual |
WHAT was not in any inner node; it is either here, or it's not in the tree.
Implements TBtNode.
Definition at line 1506 of file TBtree.cxx.
Returns a number in the range 0 to MaxIndex().
Definition at line 1529 of file TBtree.cxx.
|
inline |
Definition at line 324 of file TBtree.h.
Referenced by TBtInnerNode::IsFull().
|
inline |
|
inline |
|
virtual |
|
inline |
Definition at line 318 of file TBtree.h.
Referenced by Add(), Append(), AppendFrom(), IsAlmostFull(), IsFull(), and TBtLeafNode().
|
inline |
Definition at line 319 of file TBtree.h.
Referenced by TBtInnerNode::IsLow(), MergeWithRight(), PushLeft(), and PushRight().
void TBtLeafNode::MergeWithRight | ( | TBtLeafNode * | r, |
Int_t | idx | ||
) |
Return the number of keys.
Definition at line 1563 of file TBtree.cxx.
Referenced by PushLeft(), and PushRight().
|
virtual |
Return the number of keys.
Implements TBtNode.
Definition at line 1571 of file TBtree.cxx.
Referenced by MergeWithRight(), PushLeft(), and PushRight().
|
inline |
Definition at line 316 of file TBtree.h.
Referenced by BalanceWith(), BalanceWithLeft(), BalanceWithRight(), TBtInnerNode::IsLow(), MergeWithRight(), NofKeys(), PushLeft(), PushRight(), Remove(), TBtree::RootIsEmpty(), SplitWith(), and Vsize().
void TBtLeafNode::PushLeft | ( | Int_t | noFromThis, |
TBtLeafNode * | leftsib, | ||
Int_t | pidx | ||
) |
noFromThis==1 => moves the parent item into the leftsib, and the first item in this's array into the parent item.
Definition at line 1589 of file TBtree.cxx.
Referenced by BalanceWithLeft(), MergeWithRight(), and SplitWith().
void TBtLeafNode::PushRight | ( | Int_t | noFromThis, |
TBtLeafNode * | rightsib, | ||
Int_t | pidx | ||
) |
noFromThis==1 => moves the parent item into the rightsib, and the last item in this's array into the parent item.
Definition at line 1608 of file TBtree.cxx.
Referenced by BalanceWithRight(), and SplitWith().
Remove an element.
Implements TBtNode.
Definition at line 1652 of file TBtree.cxx.
Referenced by RemoveItem().
Definition at line 288 of file TBtree.h.
Referenced by TBtInnerNode::Remove().
|
virtual |
This function is called only when THIS is the only descendent of the root node, and THIS needs to be split.
Assumes that idx of THIS in Parent is 0.
Implements TBtNode.
Definition at line 1689 of file TBtree.cxx.
void TBtLeafNode::SplitWith | ( | TBtLeafNode * | r, |
Int_t | idx | ||
) |
|
inline |
Definition at line 434 of file TBtree.h.
Referenced by BalanceWith(), BalanceWithLeft(), BalanceWithRight(), TBtInnerNode::IsLow(), MergeWithRight(), and SplitWith().
|
friend |
|
private |
Definition at line 279 of file TBtree.h.
Referenced by Add(), Append(), AppendFrom(), FindRank(), Found(), IndexOf(), operator[](), PushLeft(), PushRight(), TBtInnerNode::Remove(), Remove(), ShiftLeft(), Split(), SplitWith(), TBtLeafNode(), and ~TBtLeafNode().