From 5e66493100d39f897fc232b80c51c57167fce96c Mon Sep 17 00:00:00 2001 From: Dennis Rohde Date: Tue, 22 Aug 2023 15:46:37 +0200 Subject: [PATCH] pybind update; small fix --- pybind11 | 2 +- setup.py | 2 +- src/simplification.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pybind11 b/pybind11 index 47dc0c4..b9359ce 160000 --- a/pybind11 +++ b/pybind11 @@ -1 +1 @@ -Subproject commit 47dc0c4bd16b7a97edb2072e93e6960647c3872f +Subproject commit b9359ceadbf4d4b22509b684eea107d055b77901 diff --git a/setup.py b/setup.py index 2df8252..000a9e7 100644 --- a/setup.py +++ b/setup.py @@ -80,7 +80,7 @@ def build_extension(self, ext): setup( name='Fred-Frechet', - version='1.14.3', + version='1.14.4', author='Dennis Rohde', author_email='dennis.rohde@tu-dortmund.de', description='A fast, scalable and light-weight C++ Fréchet and DTW distance library, exposed to python and focused on clustering of polygonal curves.', diff --git a/src/simplification.cpp b/src/simplification.cpp index b4828a5..be562a2 100644 --- a/src/simplification.cpp +++ b/src/simplification.cpp @@ -238,6 +238,8 @@ Curve approximate_minimum_error_simplification(const Curve &curve, const curve_s const auto infty = std::numeric_limits::infinity(); const curve_size_t n = curve.size(), m = n - 1; + if (ell >= m) return curve; + std::vector> d(n, std::vector(ell, infty)); std::vector> c(n, std::vector(ell, Points(curve.dimensions())));