Can I use arbitrary metrics to search KD-Trees?

后端 未结 2 942
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 23:44

I just finished implementing a kd-tree for doing fast nearest neighbor searches. I\'m interested in playing around with different distance metrics other than the Euclidean d

2条回答
  •  情歌与酒
    2020-12-09 00:28

    I don't think you're tied to euclidean distance - as j_random_hacker says, you can probably use Manhattan distance - but I'm pretty sure you're tied to geometries that can be represented in cartesian coordinates. So you couldn't use a kd-tree to index a metric space, for example.

提交回复
热议问题