Fast weighted euclidean distance between points in arrays

后端 未结 4 1009
清歌不尽
清歌不尽 2020-12-19 14:54

I need to efficiently calculate the euclidean weighted distances for every x,y point in a given array to every other x,y point in another

4条回答
  •  悲&欢浪女
    2020-12-19 15:12

    You could try removing the square root, since if a>b, it follows that a squared > b squared... and computers are REALLY slow at square roots normally.

提交回复
热议问题