From dc4bc3ba0b9de022e2962a3bb76da4f7865f2322 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Sun, 14 Mar 2021 15:15:14 +0100
Subject: [PATCH] [MaL] MathTools; remove scalarProduct.

Scalar product was substituted everywhere with Eigen's
dot() function.
---
 MathLib/MathTools.h | 47 ---------------------------------------------
 1 file changed, 47 deletions(-)

diff --git a/MathLib/MathTools.h b/MathLib/MathTools.h
index a3277217d38..208d73d3362 100644
--- a/MathLib/MathTools.h
+++ b/MathLib/MathTools.h
@@ -9,60 +9,13 @@
 
 #pragma once
 
-#include <Eigen/Eigen>
 #include <cstddef>
 
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-
 namespace MathLib
 {
 template <typename T, std::size_t DIM> class TemplatePoint;
 using Point3d = MathLib::TemplatePoint<double, 3>;
 
-/**
- * standard inner product in R^N
- * \param v0 array of type T representing the vector
- * \param v1 array of type T representing the vector
- * */
-template<typename T, int N> inline
-T scalarProduct(T const * const v0, T const * const v1)
-{
-    T res (v0[0] * v1[0]);
-
-#pragma omp parallel for reduction (+:res)
-    for (int k = 1; k < N; k++)
-    {
-        res += v0[k] * v1[k];
-    }
-    return res;
-}
-
-template <> inline
-double scalarProduct<double,3>(double const * const v0, double const * const v1)
-{
-    double res (v0[0] * v1[0]);
-    for (std::size_t k(1); k < 3; k++)
-    {
-        res += v0[k] * v1[k];
-    }
-    return res;
-}
-
-template <typename T>
-inline T scalarProduct(T const* const v0, T const* const v1, int const n)
-{
-    T res (v0[0] * v1[0]);
-
-#pragma omp parallel for reduction (+:res)
-    for (int k = 1; k < n; k++)
-    {
-        res += v0[k] * v1[k];
-    }
-    return res;
-}
-
 /**
  * calcProjPntToLineAndDists computes the orthogonal projection
  * of a point p to the line described by the points a and b,
-- 
GitLab