You did not indicate where your vectors come from, nor what you will use mean
and median
. Here are some general notes. Limited ranges, error tolerances, and discrete values may allow a more efficient approach.
The distance mean
between the points M sounds quadratically, O (M ^ 2). But M / N is 10, quite small, and N is huge, so the data probably resembles a hairy sphere in a 1e3 space. Computing the centroid of points M, and then calculating the distances M to the centroid, can be useful in your problem area, it’s hard to say.
minimum
M . , 100, . (, , .) UB-tree, . N M x N, , min , , 1,0, .
UB-, , . . , . , , . , , PostGIS.
, (, , N = 1e3 ). , , . , , . , , , .
, . 2- , . , "" , - . N- .