Open ctrueden opened 5 years ago
The DefaultQuantile op copies the input Iterable into an ArrayList<Double> which is highly inefficient. At minimum, we should use an org.scijava.util.DoubleArray.
DefaultQuantile
Iterable
ArrayList<Double>
org.scijava.util.DoubleArray
As long as we are scrutinizing the performance of DefaultQuantile, let's consider using median of medians or introselect instead. One easy way to go might be to lean on Guava's com.google.common.math.Quantiles for this.
com.google.common.math.Quantiles
Any easy way to call Guava's Quantiles is via ImgLib2's net.imglib2.util.FlatCollections.
Quantiles
net.imglib2.util.FlatCollections
The
DefaultQuantile
op copies the inputIterable
into anArrayList<Double>
which is highly inefficient. At minimum, we should use anorg.scijava.util.DoubleArray
.As long as we are scrutinizing the performance of
DefaultQuantile
, let's consider using median of medians or introselect instead. One easy way to go might be to lean on Guava'scom.google.common.math.Quantiles
for this.