minMaxIndices static method

List<int> minMaxIndices(
  1. List<double> data,
  2. int threshold
)

Returns indices sampled with min/max bucket strategy.

Implementation

static List<int> minMaxIndices(List<double> data, int threshold) {
  final finiteView = _finiteDoubleView(data);
  if (finiteView != null) {
    final indices = _minMaxIndicesFinite(finiteView.values, threshold);
    return [for (final i in indices) finiteView.sourceIndices[i]];
  }
  return _minMaxIndicesFinite(data, threshold);
}