Skip to main content

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


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 details)

Uploaded Source

Built Distribution

frechetlib-0.1.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file frechetlib-0.1.1.tar.gz.

File metadata

  • Download URL: frechetlib-0.1.1.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.0 Linux/6.5.0-1016-azure

File hashes

Hashes for frechetlib-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a8f01851a129698ed8b63a9d16b5a25717a4981a49498bf5dc6618c56ae64aba
MD5 f567bf46902b3195001be3d55079a612
BLAKE2b-256 e182c06158ecc5f9a2fa9359a5376a6fd78605dd3698514b91845e64281ade18

See more details on using hashes here.

File details

Details for the file frechetlib-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: frechetlib-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.0 Linux/6.5.0-1016-azure

File hashes

Hashes for frechetlib-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e11846572de4f8c131f4357e3b65ec016a45a3401590a930878b722bdfe4b641
MD5 6895daec23dd4e6b35b45eb4340ab54b
BLAKE2b-256 50dc70e847f19d86d67f1b563780c43a0fb31d8a787989c31052a3b0bfe15781

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page