weightedMovingAverage function

List<num> weightedMovingAverage (
  1. List<num> data,
  2. int size,
  3. {bool includePartial: false}
)

Implementation

List<num> weightedMovingAverage(List<num> data, int size,
    {bool includePartial = false}) {
  return window(data, size, includePartial: includePartial)
      .map((List<num> values) {
    return weightedMean(values);
  }).toList();
}