Closed vincefernando closed 10 years ago
Since 29e39c26428c578ed33623a3dd0ec88b889fec49 search_nn
and search_knn
take an optional dist
parameter. An argument for this parameter should be a distance function, taking two points and returning a distance value. The distance can be of any comparable type.
I'll release this change as version 0.10 soon.
It could be useful if other distance measures such the L_1 norm (Manhattan distance), L_inf norm (Chebyshev distance) and the the p-norm (Holder norm, where the entries are raised to the power of p, instead to 2 as in the case of the Eucliden norm) are included. [However, in the p-norm case, extreme values of p can lead to overflow/underflow problems]. A facility to include a user defined norm (or a semi norm) could be also desirable.