bartlett static method

Float64List bartlett(
  1. int size
)

Returns a Bartlett window.

This is essentially just a triangular window. w[i] = 1 - |2i / (size - 1) - 1|

Implementation

static Float64List bartlett(int size) {
  final offset = (size - 1) / 2;
  return _makeWindow(size, (i) => 1 - (i / offset - 1).abs());
}