Commit de0b4f62 authored by Manuel Günther's avatar Manuel Günther

Fixed negative index

parent 6aadf2d1
......@@ -120,7 +120,7 @@ double bob::measure::farThreshold(const blitz::Array<double, 1> &negatives,
// compute position of the threshold
double crr = 1. - far_value; // (Correct Rejection Rate; = 1 - FAR)
double crr_index = crr * neg.extent(0) - 1.;
double crr_index = std::max(crr * neg.extent(0) - 1., 0.);
// compute the index above the current CRR value
int index = std::min((int)std::ceil(crr_index), neg.extent(0)-1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment