fix(opat): added min tolerance for epsilon in case where there are shared indeices

This commit is contained in:
2025-03-22 14:26:08 -04:00
parent 5a8c50d376
commit f6f35996cc

View File

@@ -171,9 +171,13 @@ void OpatIO::LookupEpsilon() {
for (int j = 1; j < static_cast<int>(header.numTables); j++) {
epsilon = std::min(epsilon, std::fabs(tableIDToIndex.at(j).at(i) - tableIDToIndex.at(j-1).at(i)));
}
if (epsilon < 1e-8) {
indexEpsilon.at(i) = 1e-8;
} else {
indexEpsilon.at(i) = epsilon * 0.1;
}
}
}
int OpatIO::lookupTableID(std::vector<double> index) {
std::vector<bool> IndexOkay;