From a14470cc9750699ed54ddf2d864d36b2cef9f200 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 6 Oct 2024 22:16:56 +0200 Subject: [PATCH] geo_inner --- hyperpoint.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hyperpoint.cpp b/hyperpoint.cpp index d4b9ec4a..6cd6a419 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -451,6 +451,14 @@ EX bool zero_d(int d, hyperpoint h) { return true; } +/** inner product in the current geometry */ + +EX ld geo_inner(const hyperpoint &h1, const hyperpoint &h2) { + ld res = 0; + for(int i=0; i