Helper function to find the next essential dimension in a cycle.
| 39 | |
| 40 | // Helper function to find the next essential dimension in a cycle. |
| 41 | static int NextLevel(KDTREE *tree, int level) { |
| 42 | do { |
| 43 | ++level; |
| 44 | if (level >= tree->KeySize) |
| 45 | level = 0; |
| 46 | } while (tree->KeyDesc[level].NonEssential); |
| 47 | return level; |
| 48 | } |
| 49 | |
| 50 | //----------------------------------------------------------------------------- |
| 51 | /** Store the k smallest-keyed key-value pairs. */ |