From 78dad0a2ec0a46a0a71d55eb24f107913fc5662a Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Tue, 10 Oct 2023 15:50:25 +0200
Subject: [PATCH] rm 2 unused util fcts

---
 Base/Util/VectorUtil.cpp | 36 ------------------------------------
 Base/Util/VectorUtil.h   |  5 -----
 2 files changed, 41 deletions(-)

diff --git a/Base/Util/VectorUtil.cpp b/Base/Util/VectorUtil.cpp
index 4c46982a9cd..0998f73f394 100644
--- a/Base/Util/VectorUtil.cpp
+++ b/Base/Util/VectorUtil.cpp
@@ -13,42 +13,6 @@
 //  ************************************************************************************************
 
 #include "Base/Util/VectorUtil.h"
-#include <cmath>
-#include <stdexcept>
-
-bool VectorUtil::is_equidistant(const std::vector<double>& vec, double tol)
-{
-    double span = vec.back() - vec.front();
-    if (span == 0.) {
-        for (std::size_t i = 1; i < vec.size() - 1; ++i)
-            if (vec[i] != vec.front())
-                return false;
-        return true;
-    }
-
-    double step = span / vec.size();
-    for (std::size_t i = 1; i < vec.size() - 1; ++i)
-        if (fabs(vec[i]) - (vec.front() + i * step) > tol * step)
-            return false;
-    return true;
-}
-
-std::vector<double> VectorUtil::make_grid(std::size_t n, double first, double last)
-{
-    std::vector<double> result;
-    result.reserve(n);
-
-    if (n == 1) {
-        if (first != last)
-            throw std::runtime_error("Cannot make grid of size 1 unless first == last");
-        result.push_back(first);
-        return result;
-    }
-
-    for (std::size_t i = 0; i < n; ++i)
-        result.push_back(first + i * (last - first) / (n - 1));
-    return result;
-}
 
 std::vector<double> VectorUtil::real(const std::vector<complex_t>& v)
 {
diff --git a/Base/Util/VectorUtil.h b/Base/Util/VectorUtil.h
index 4d40c4e6f01..e2f51c6c1ec 100644
--- a/Base/Util/VectorUtil.h
+++ b/Base/Util/VectorUtil.h
@@ -20,11 +20,6 @@
 
 namespace VectorUtil {
 
-//! Returns true if vector is equidistant within tol * bin_width.
-bool is_equidistant(const std::vector<double>& vec, double tol);
-
-std::vector<double> make_grid(std::size_t n, double first, double last);
-
 //! Returns vector of real parts.
 std::vector<double> real(const std::vector<complex_t>& v);
 
-- 
GitLab