From f6f35996ccad1f4a0066e82ad9f176ee347b9560 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Sat, 22 Mar 2025 14:26:08 -0400 Subject: [PATCH] fix(opat): added min tolerance for epsilon in case where there are shared indeices --- src/opatIO/private/opatIO.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/opatIO/private/opatIO.cpp b/src/opatIO/private/opatIO.cpp index bdbf45b..cfc648a 100644 --- a/src/opatIO/private/opatIO.cpp +++ b/src/opatIO/private/opatIO.cpp @@ -171,7 +171,11 @@ void OpatIO::LookupEpsilon() { for (int j = 1; j < static_cast(header.numTables); j++) { epsilon = std::min(epsilon, std::fabs(tableIDToIndex.at(j).at(i) - tableIDToIndex.at(j-1).at(i))); } - indexEpsilon.at(i) = epsilon * 0.1; + if (epsilon < 1e-8) { + indexEpsilon.at(i) = 1e-8; + } else { + indexEpsilon.at(i) = epsilon * 0.1; + } } }