A package to compute distances between curves.
Project description
FrechetLib
A library for computing Frechet distances between curves, and other associated quantities. This is a Python version of the FrechetDist julia package.
Development Status
This library is in an alpha state. Most functions have some degree of testing, but not extensively.
Examples
import time
from frechetlib.continuous_frechet import frechet_c_approx
from frechetlib.data import FrechetDownloader
downloader = FrechetDownloader()
big_curve_1 = downloader.get_curve("11/poly_a.txt")
big_curve_2 = downloader.get_curve("11/poly_b.txt")
print(big_curve_1.shape)
print(big_curve_2.shape)
# NOTE Run twice to factor out the compilation time from the timing.
frechet_c_approx(big_curve_1, big_curve_2, 1.01)
print("Starting")
start = time.perf_counter()
res, morphing = frechet_c_approx(big_curve_1, big_curve_2, 1.01)
end = time.perf_counter()
print("Approximated Frechet distance: ", morphing.dist)
print("Time taken (s): ", end - start)
API
The package API is currently minimal and undocumented for now. See the test cases for usage examples. This will be filled out more later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
frechetlib-0.1.1.tar.gz
(17.7 kB
view hashes)
Built Distribution
frechetlib-0.1.1-py3-none-any.whl
(19.0 kB
view hashes)
Close
Hashes for frechetlib-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e11846572de4f8c131f4357e3b65ec016a45a3401590a930878b722bdfe4b641 |
|
MD5 | 6895daec23dd4e6b35b45eb4340ab54b |
|
BLAKE2b-256 | 50dc70e847f19d86d67f1b563780c43a0fb31d8a787989c31052a3b0bfe15781 |