private void findOptimalNodeOrder ( final int block_size ) { final Node < K , V > leaf = createLeafNode ( ) ; final Node < K , V > internal = createInternalNode ( ) ; // Get Maximal Size final int nodeSize = Math . max ( leaf . getStructEstimateSize ( MIN_B_ORDER ) , internal . getStructEstimateSize ( MIN_B_ORDER ) ) ; // Find minimal blockSize blockSize = ( ( nodeSize > block_size ) ? roundBlockSize ( nodeSize , block_size ) : block_size ) ; // Find b-order for Leaf Nodes b_order_leaf = findOptimalNodeOrder ( leaf ) ; // Find b-order for Internal Nodes b_order_internal = findOptimalNodeOrder ( internal ) ; }
Calculate optimal values for b - order to fit in a block of block_size