moving_average 0.1.0-alpha copy "moving_average: ^0.1.0-alpha" to clipboard
moving_average: ^0.1.0-alpha copied to clipboard

outdated

A starting point for Dart libraries or applications.

A library for the calculation of moving averages.

Usage #

A simple usage example:

import 'package:moving_average/moving_average.dart';

main() {
  final values = [1, 2, 3, 4, 5];
  print("Values = $values");
  // Values = [1, 2, 3, 4, 5]

  final movingAverage3 = movingAverage(values, 3, includePartial: true);
  print("Moving Average, size 3, partial = $movingAverage3");
  // Moving Average, size 3, partial = [1.0, 1.5, 2.0, 3.0, 4.0]

  final weightedAverage3 = weightedMovingAverage(values, 3);
  print("Weighted Moving Average, size 3 = $weightedAverage3");
  // Weighted Moving Average, size 3 = [2.3333333333333335, 3.3333333333333335, 4.333333333333333]
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

8
likes
0
pub points
79%
popularity

Publisher

verified publisherpeterscully.name

A starting point for Dart libraries or applications.

Repository (GitLab)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on moving_average