Closed jafingerhut closed 2 years ago
Should say, "so that they have ROUGHLY the same average node size." I didn't do a study or read about this in a paper. I just got a gut feeling that this was a good way to pick min and max node sizes to average about the same as the strict-node-length and the MAX needed to be exactly double the MIN (I think so that splitting a MAX could always yield two valid MIN and joining two min would always yield a valid MAX). I think I calculated this as MIN_NODE_LENGTH ~= STRICT_NODE_LENGTH 2/3 and MAX ~= STRICT_NODE_LENGTH 4/3. Figuring they would average to about 3/3 or STRICT_NODE_LENGTH.
I added the word, "Roughly" and am closing this bug. Thanks for reporting it!
This comment in the source file RrbTree.java:
confuses me. The values I see for these constants are:
Thus
(MIN_NODE_LENGTH + MAX_NODE_LENGTH) / 2
is equal to (22 + 44) / 2 = 33, 1 more than STRICT_NODE_LENGTH. Perhaps this is just an out of date comment? i.e. maybe off by one is acceptable for the implementation?