buildKDTree
Builds a KD-Tree from a mutable list of items, using a mapper function to extract coordinate values for the specified dimensions.
Return
The root node of the constructed KD-Tree.
Parameters
A mutable list of items to be included in the KD-Tree.
The number of dimensions to consider in the KD-Tree.
A function that maps an item and a dimension index to a coordinate value.
Builds a KD-Tree from a mutable list of items, using a mapper function to extract coordinate values for the specified dimensions.
Return
The root node of the constructed KD-Tree.
Parameters
A mutable list of items to be included in the KD-Tree.
The number of dimensions to consider in the KD-Tree.
A function that maps an item and a dimension index to a coordinate value.
Builds a KD-Tree from a mutable list of items, using a mapper function to extract coordinate values for the specified dimensions.
Return
The root node of the constructed KD-Tree.
Parameters
A mutable list of items to be included in the KD-Tree.
The number of dimensions to consider in the KD-Tree.
A function that maps an item and a dimension index to a coordinate value.