Current Node Layout: Tree[RootInstance,Left] - The left child of the current node Tree[RootInstance,Right] - The right child of the current node Tree[RootInstance,Val] - The value stored at this node Tree[RootInstance,All] - The number of instances stored at this node and its successors Tree[RootInstance,Here] - The number of instances stored at this node Tree[RootInstance,"h" SUBSEP Classes[M]] - The current class count for class M Tree[RootInstance,"a" SUBSEP Classes[M]] - The sum of class counts for class M at this node and those below it Tree[RootInstance, Sum] - The sum of the scores of the instances in this node (to implement) Tree[RootInstance, SumSq] - The squared sum of the scores of the instances at this node (to implement) Tree[RootInstace, Score] - Variable to store a heuristic score for future reference (to implement) Purpose: Insert the new node as a root node at the current level by rotating others around it accordingly function insertR(RootInstance, Tree, Value, Attr, Rec, Class, Classes) Purpose: Rotate a node by swapping it with a node to its left or right to rebalance the tree. Substitute/recalculate all values accordingly function rotateR(RootInstance, Tree, temp) function rotateL(RootInstance, Tree, temp) Purpose: Instantiate a new node for the tree, setting up each of its values function newtree(RootInstance, Tree, Value, Class, Classes) Purpose: Print the current state of the tree function printtree(RootInstance, Tree, b4, indent, Classes, x, allclasses) Purpose: Allow a node to be inserted into the current tree. Determine if new node should be root of the current tree (and use insertR to do so) or whether it should just be inserted as a regular node function rbstinsert(RootInstance, Tree, Value, Attr, Rec, Class, Classes) Purpose: Determines which discrete value to substitute in the discretized file for Value function subwith(minSize, Value, Tree, RootInstance) Purpose: Obtain a listing of the nodes that would qualify to be a discretized class function discClasses(Tree, RootInstance, minSize, myClasses) Purpose: Classify a node according to some method (not fully implemented) function classify(Tree,RootInstance,minSize,Class) Purpose: Garbage collect a tree according to some method (not fully implemented) function garbageCollect(Tree, RootInstance, others)