230 void Split()
override;
295 void Split()
override;
354 void Reset()
override;
404 return (
fItem[i].fNofKeysInTree +=
n);
409 return (
fItem[i].fNofKeysInTree -=
n);
#define ClassDefOverride(name, id)
const Bool_t kIterForward
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Int_t DecNofKeys(Int_t i, Int_t n=1)
void InformParent()
Tell the parent that we are full.
void ShiftLeft(Int_t cnt)
Shift to the left.
Int_t NofKeys() const override
Number of key.
void BalanceWithLeft(TBtInnerNode *l, Int_t idx)
THIS has more than LEFTSIB.
Int_t IncNofKeys(Int_t i, Int_t n=1)
void BalanceWithRight(TBtInnerNode *r, Int_t idx)
THIS has more than RIGHTSIB.
Int_t FindRankUp(const TBtNode *n) const
FindRankUp is FindRank in reverse.
void AppendFrom(TBtInnerNode *src, Int_t start, Int_t stop)
This should never create a full node that is, it is not used anywhere where THIS could possibly be ne...
void Append(TObject *obj, TBtNode *n)
Never called from anywhere where it might fill up THIS.
TBtItem & GetItem(Int_t i) const
void SetKey(Int_t i, TObject *obj)
Int_t GetNofKeys(Int_t i) const
void AddElt(TBtItem &itm, Int_t at)
Add one element.
Int_t IndexOf(const TBtNode *n) const
Returns a number in the range 0 to this->fLast 0 is returned if THAT == fTree[0].
Int_t FindRank(const TObject *obj) const override
Recursively look for WHAT starting in the current node.
void Add(const TObject *obj, Int_t idx) override
This is called only from TBtree::Add().
void MergeWithRight(TBtInnerNode *r, Int_t idx)
Merge the 2 part of the tree.
Int_t IsAlmostFull() const
void SetItem(Int_t i, TBtItem &itm)
void SetNofKeys(Int_t i, Int_t r)
void SetTree(Int_t i, TBtNode *node)
void PushLeft(Int_t cnt, TBtInnerNode *leftsib, Int_t parentIdx)
noFromThis==1 => moves the parent item into the leftsib, and the first item in this's array into the ...
void IncrNofKeys(TBtNode *np)
THAT is a child of THIS that has just grown by 1.
TObject * GetKey(Int_t i) const
void SetItem(Int_t i, TObject *obj, TBtNode *node)
void DecrNofKeys(TBtNode *np)
THAT is a child of THIS that has just shrunk by 1.
void Remove(Int_t idx) override
Remove an element.
~TBtInnerNode()
Constructor.
void BalanceWith(TBtInnerNode *n, int idx)
PINDX is the index of the parent item whose key will change when keys are shifted from one InnerNode ...
void Split() override
This function is called only when THIS is the only descendent of the root node, and THIS needs to be ...
void PushRight(Int_t cnt, TBtInnerNode *rightsib, Int_t parentIdx)
The operation is three steps:
TObject * operator[](Int_t i) const override
return an element.
TBtNode * GetTree(Int_t i) const
void SplitWith(TBtInnerNode *r, Int_t idx)
THIS and SIB are too full; create a NEWNODE, and balance the number of keys between the three of them...
void RemoveItem(Int_t idx)
Remove an item.
TBtLeafNode * FirstLeafNode() override
Return the first leaf node.
TObject * Found(const TObject *obj, TBtNode **which, Int_t *where) override
Recursively look for WHAT starting in the current node.
TBtLeafNode * LastLeafNode() override
Return the last leaf node.
Item stored in inner nodes of a TBtree.
~TBtItem()
Delete a tree item.
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.
TObject * operator[](Int_t i) const override
void BalanceWithRight(TBtLeafNode *r, Int_t idx)
THIS has more than RIGHTSIB; move some items from THIS to RIGHTSIB.
TObject * GetKey(Int_t idx)
void Split() override
This function is called only when THIS is the only descendent of the root node, and THIS needs to be ...
Int_t IsAlmostFull() const
void RemoveItem(Int_t idx)
void ShiftLeft(Int_t cnt)
Shift.
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 ...
void SplitWith(TBtLeafNode *r, Int_t idx)
Split.
TObject * Found(const TObject *obj, TBtNode **which, Int_t *where) override
WHAT was not in any inner node; it is either here, or it's not in the tree.
TBtLeafNode * FirstLeafNode() override
Return the first node.
void Remove(Int_t idx) override
Remove an element.
void BalanceWithLeft(TBtLeafNode *l, Int_t idx)
THIS has more than LEFTSIB; move some items from THIS to LEFTSIB.
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 ...
void Add(const TObject *obj, Int_t idx) override
Add the object OBJ to the leaf node, inserting it at location INDEX in the fItem array.
void MergeWithRight(TBtLeafNode *r, Int_t idx)
Merge.
~TBtLeafNode()
Destructor.
Int_t NofKeys() const override
Return the number of keys.
TBtLeafNode * LastLeafNode() override
return the last node.
void Append(TObject *obj)
Never called from anywhere where it might fill up THIS does NOT handle nofKeys.
Int_t FindRank(const TObject *obj) const override
WHAT was not in any inner node; it is either here, or it's not in the tree.
void SetKey(Int_t idx, TObject *obj)
Int_t IndexOf(const TObject *obj) const
Returns a number in the range 0 to MaxIndex().
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 SR...
Abstract base class (ABC) of a TBtree node.
virtual TObject * operator[](Int_t i) const =0
virtual void Add(const TObject *obj, Int_t index)=0
virtual TBtLeafNode * LastLeafNode()=0
virtual Int_t FindRank(const TObject *obj) const =0
virtual ~TBtNode()
Delete a B-tree node.
virtual Int_t NofKeys() const =0
friend class TBtInnerNode
virtual TBtree * GetParentTree() const
virtual void Remove(Int_t index)=0
virtual TBtLeafNode * FirstLeafNode()=0
virtual TObject * Found(const TObject *obj, TBtNode **which, Int_t *where)=0
std::bidirectional_iterator_tag iterator_category
const TCollection * GetCollection() const override
Bool_t operator!=(const TIterator &aIter) const override
This operator compares two TIterator objects.
TIterator & operator=(const TIterator &rhs) override
Overridden assignment operator.
std::ptrdiff_t difference_type
TObject * Next() override
Get next object from B-tree. Returns 0 when no more objects in tree.
void Reset() override
Reset the B-tree iterator.
TObject * operator*() const override
Return current object or nullptr.
Int_t IdxAdd(const TObject &obj)
Add object and return its index in the tree.
Int_t Rank(const TObject *obj) const
Returns the rank of the object in the tree.
void Delete(Option_t *option="") override
Remove all objects from B-tree AND delete all heap based objects.
virtual ~TBtree()
Delete B-tree.
void Init(Int_t i)
Initialize a B-tree.
TObject * Before(const TObject *obj) const override
May not use this method since B-tree decides order.
TObject * Remove(TObject *obj) override
Remove an object from the tree.
void RootIsFull()
The root of the tree is full.
TObject * First() const override
void AddAt(TObject *obj, Int_t) override
void Add(TObject *obj) override
Add object to B-tree.
void Clear(Option_t *option="") override
Remove all objects from B-tree.
TObject * Last() const override
TObject * After(const TObject *obj) const override
Cannot use this method since B-tree decides order.
void AddAfter(const TObject *, TObject *obj) override
void AddLast(TObject *obj) override
TObject ** GetObjectRef(const TObject *) const override
TIterator * MakeIterator(Bool_t dir=kIterForward) const override
Returns a B-tree iterator.
void RootIsEmpty()
If root is empty clean up its space.
void AddFirst(TObject *obj) override
void AddBefore(const TObject *, TObject *obj) override
TObject * At(Int_t idx) const override
TObject * FindObject(const char *name) const override
Find object using its name (see object's GetName()).
TObject * operator[](Int_t i) const
Collection abstract base class.
Iterator abstract base class.
Mother of all ROOT objects.
Sequenceable collection abstract base class.