Skip to content

rickdgit/BPlusTree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 

Repository files navigation

BPlusTree

B Plus Tree Data Structure

Usage

Target of this Repo is build a basic B Plus Tree data structure written by Java

Structure

###IntNode C4380/src/BPlusTreeNode/IntNode.java

Act as a special object that contains a searchKey(Option #2) with file reference.

###BPlusTreeNode C4380/src/BPlusTreeNode/BPlusTreeNode.java

Act as the main structure of BPlusTree's node #####Constructor

order - int - the order of BP tree

NodeNum - int - total number of elements or indexs inside of a BP tree

NodePosn - int - the position of current node in its parents's nextLevels BP Tree array

elements - IntNode[] - array that used for store all the elements in leaf

parents - BPlusTreeNode - reference to parents node

nextlevels - BPlusTreeNode[] - reference to its children

next - BPlusTreeNode - reference from a leaf node to the leaf node next to it

prev - BPlusTreeNode - reference from a leaf node to its prev leaf node

####Reasonable Methods ######overAllInsert Used for insert an IntNode object to a BP tree. Invoke and coordinate with several different insertion cases.

If this node is leaf node, insert directly otherwise use search method to locate the leaf node and start insert.

Return the root of a tree.

#####insert Used for insert an object to a node(leaf or non-leaf)leaf.

insert(IntNode obj) being used for leaf node insertion. Check if a leaf node has enough space - insert directly otherwise split the node and generated a non-leaf node.

insert(BPlusTreeNode obj) being used for non-leaf node insertion. Check if a non-leaf node has enough space - insert accodrly based on children's space otherwise split the node and generated a non-leaf node.

Return itself or the non-leaf node generated by insertion.

#####search Used for search the elements in BP tree.

Return the BP tree node that contains the search key.

#####Delete Used for delete the elements in BP Tree.

No returning value ##Environment Eclipse Luna Release (4.4.0)

Atom 1.5.4

Java Version 1.8.0_74

ToDo List

#####Use Binary Search instead of linear search in search element/index #####Re-organize variable/method's name #####Refactoring - Update Insertion Logic

About

B Plus Tree Data Structure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages