用4行代码快速遛你的青蛙
Walking Your Frog Fast in 4 LoC
AI总结:
针对离散 Fréchet 距离递归算法不适合现代硬件的问题,提出无递归、线性内存开销的 Fast Fréchet Distance 算法,仅4行代码即可实现,并在 CPU 和 GPGPU 上验证其高效性能。
摘要:
给定两条多边形曲线,有许多方法可以定义它们之间的相似性概念。一种流行的度量是 Fréchet 距离,它具有许多理想特性,但众所周知计算成本高昂,尤其是对于非平凡度量而言。1994年,Eiter 和 Mannila 提出了离散 Fréchet 距离,它更易于实现,并以二次运行时间开销逼近连续 Fréchet 距离。然而,该算法依赖递归,不太适合现代硬件。为此,我们提出 Fast Fréchet Distance 算法,这是一种无递归算法,以线性内存开销计算离散 Fréchet 距离,并能更有效地利用现代硬件。我们展示了一个仅需四行代码的实现,并给出了该算法在现代 CPU 和 GPGPU 上高速运行的基准测试。
英文摘要:
Given two polygonal curves, there are many ways to define a notion of similarity between them. One popular measure is the Fréchet distance which has many desirable properties but is notoriously expensive to calculate, especially for non-trivial metrics. In 1994, Eiter and Mannila introduced the discrete Fréchet distance which is much easier to implement and approximates the continuous Fréchet distance with a quadratic runtime overhead. However, this algorithm relies on recursions and is not well suited for modern hardware. To that end, we introduce the Fast Fréchet Distance algorithm, a recursion-free algorithm that calculates the discrete Fréchet distance with a linear memory overhead and that can utilize modern hardware more effectively. We showcase an implementation with only four lines of code and present benchmarks of our algorithm running fast on modern CPUs and GPGPUs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。