From d02fe67962c8002ddc6e0d6569128ae2645ea7fc Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 24 Jul 2023 16:49:21 -0400 Subject: VPTree: fixed knn query --- include/framework/RecordInterface.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/framework') diff --git a/include/framework/RecordInterface.h b/include/framework/RecordInterface.h index 85a0794..cea9fbe 100644 --- a/include/framework/RecordInterface.h +++ b/include/framework/RecordInterface.h @@ -49,6 +49,7 @@ concept WrappedInterface = RecordInterface && requires(R r, R s, bool b) { {r.set_tombstone(b)}; {r.is_tombstone()} -> std::convertible_to; {r < s} -> std::convertible_to; + {r == s} ->std::convertible_to; }; template @@ -79,6 +80,11 @@ struct Wrapped { inline bool operator<(const Wrapped& other) const { return rec < other.rec || (rec == other.rec && header < other.header); } + + inline bool operator==(const Wrapped& other) const { + return rec == other.rec; + } + }; template @@ -185,10 +191,10 @@ struct EuclidPoint{ inline double calc_distance(const EuclidPoint& other) const { double dist = 0; for (size_t i=0; i