From aca4265a0225b4cc686926452b02746bced1b218 Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Thu, 6 Dec 2018 11:38:07 +0100 Subject: [PATCH] fix an IOB when a timeseries value is exactly on the upper histogram boundary --- src/io.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io.rs b/src/io.rs index 5eb1cf7..d6d5e25 100644 --- a/src/io.rs +++ b/src/io.rs @@ -103,7 +103,7 @@ fn flat_index(indeces: &Vec, lengths: &Vec) -> usize { // returns true if the values are inside the histogram boundaries defined by cfg fn is_in_hist_boundaries(values: &[f64], cfg: &Config) -> bool { for dimen in 0..cfg.dimens { - if values[dimen] < cfg.hist_min[dimen] || values[dimen] > cfg.hist_max[dimen] { + if values[dimen] < cfg.hist_min[dimen] || values[dimen] >= cfg.hist_max[dimen] { return false } }