lttbIndices static method

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

LTTB on raw doubles. Returns indices of selected points.

Implementation

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