{"title":"在 4 LoC 中快速遛青蛙","authors":"Nis Meinert","doi":"arxiv-2404.05708","DOIUrl":null,"url":null,"abstract":"Given two polygonal curves, there are many ways to define a notion of\nsimilarity between them. One popular measure is the Fr\\'echet distance which\nhas many desirable properties but is notoriously expensive to calculate,\nespecially for non-trivial metrics. In 1994, Eiter and Mannila introduced the\ndiscrete Fr\\'echet distance which is much easier to implement and approximates\nthe continuous Fr\\'echet distance with a quadratic runtime overhead. However,\nthis algorithm relies on recursions and is not well suited for modern hardware.\nTo that end, we introduce the Fast Fr\\'echet Distance algorithm, a\nrecursion-free algorithm that calculates the discrete Fr\\'echet distance with a\nlinear memory overhead and that can utilize modern hardware more effectively.\nWe showcase an implementation with only four lines of code and present\nbenchmarks of our algorithm running fast on modern CPUs and GPGPUs.","PeriodicalId":501570,"journal":{"name":"arXiv - CS - Computational Geometry","volume":"76 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-04-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Walking Your Frog Fast in 4 LoC\",\"authors\":\"Nis Meinert\",\"doi\":\"arxiv-2404.05708\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Given two polygonal curves, there are many ways to define a notion of\\nsimilarity between them. One popular measure is the Fr\\\\'echet distance which\\nhas many desirable properties but is notoriously expensive to calculate,\\nespecially for non-trivial metrics. In 1994, Eiter and Mannila introduced the\\ndiscrete Fr\\\\'echet distance which is much easier to implement and approximates\\nthe continuous Fr\\\\'echet distance with a quadratic runtime overhead. However,\\nthis algorithm relies on recursions and is not well suited for modern hardware.\\nTo that end, we introduce the Fast Fr\\\\'echet Distance algorithm, a\\nrecursion-free algorithm that calculates the discrete Fr\\\\'echet distance with a\\nlinear memory overhead and that can utilize modern hardware more effectively.\\nWe showcase an implementation with only four lines of code and present\\nbenchmarks of our algorithm running fast on modern CPUs and GPGPUs.\",\"PeriodicalId\":501570,\"journal\":{\"name\":\"arXiv - CS - Computational Geometry\",\"volume\":\"76 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-04-08\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Computational Geometry\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2404.05708\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Computational Geometry","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2404.05708","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Given two polygonal curves, there are many ways to define a notion of
similarity between them. One popular measure is the Fr\'echet 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\'echet distance which is much easier to implement and approximates
the continuous Fr\'echet 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\'echet Distance algorithm, a
recursion-free algorithm that calculates the discrete Fr\'echet 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.