Skip to content

AliShaikh94/3D_BinarySearchTree_SML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

3D_BinarySearchTree_SML

##About
3 dimensional k-d tree in SML

The following methods are provided as easy access to the tree.
All of them(except DELETE) take paramters as follows: "ADD 45 6 7 mainTree". The code is written in a strictly pattern matching/curryied style.

##Command Examples ###GENERATE Will generate a 3DBinode 10 deep to any valid Btree; ###ADD oneD twoD threeD bTree Will add a node(s) at the desired location, givng the full path ###DELETE dimList bTree Will delete a node(s). Must use following format: "DELETE [45,6,7] mainTree" ###PRINT bTree = PrintTree [] bTree; Will print the tree. ###SEARCH oneD twoD threeD bTree Will search the tree to check if item exists, with the full path ###val myBTree = ADD/DELETE/SEARCH/GENERATE To assign the output of any function, use the above format with the respective parameters ###val mynewBTree = Empty | Node(VALUE: int, left: BTree, right: BTree, down: BTree) ##Variables ###val mainTree = GENERATE(Empty, 10); An initially generated tree, with 10 randomly generated items.

About

3 dimensional k-d tree in SML

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published