Algorithm DT(f) of Felzenszwalb and Huttenlocher (2004), augmented to compute the index i of the nearest sample. @param s the distance between two adjacent samples. @param f input array of accumulated distances squared. @param d output array of distances squared to nearest samples. @param i output a
(float s, float[] f, float[] d, short[] i)