From 44e53bc8466bff4a2dd50cbe2b773fede5bc63ec Mon Sep 17 00:00:00 2001 From: Joseph Lizier Date: Thu, 29 Oct 2020 13:39:40 +1100 Subject: [PATCH] Updating error messages for kdTree --- java/source/infodynamics/utils/KdTree.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/source/infodynamics/utils/KdTree.java b/java/source/infodynamics/utils/KdTree.java index 8e5b6f6..a8c8f09 100755 --- a/java/source/infodynamics/utils/KdTree.java +++ b/java/source/infodynamics/utils/KdTree.java @@ -275,10 +275,10 @@ public class KdTree extends NearestNeighbourSearcher { // Could remove these since the code is now functional, // but may be better to leave them in just in case the code breaks: if (leftIndex > leftStart + leftNumPoints) { - throw new RuntimeException("Exceeded expected number of points on left"); + throw new RuntimeException("Exceeded expected number of points on left - likely had an NaN in the data"); } if (rightIndex > rightStart + rightNumPoints) { - throw new RuntimeException("Exceeded expected number of points on right"); + throw new RuntimeException("Exceeded expected number of points on right - likely had an NaN in the data"); } // Update the pointer for the sorted indices for this dimension, // and keep the new temporary array