NumericIterableExtension<T> extension

Extension providing numeric operations on Iterables.

on

Methods

accumulate(T init, [T op(T, T)?]) → T

Available on Iterable<T>, provided by the NumericIterableExtension extension

Sums up or folds the elements in the range, starting with init.
adjacentDifference([T op(T, T)?]) List<T>

Available on Iterable<T>, provided by the NumericIterableExtension extension

Computes the differences between adjacent elements.
cppReduce([T op(T, T)?]) → T

Available on Iterable<T>, provided by the NumericIterableExtension extension

Computes a result using an operation over the elements.
innerProduct(Iterable<T> other, T init, {T op1(T, T)?, T op2(T, T)?}) → T

Available on Iterable<T>, provided by the NumericIterableExtension extension

Computes the inner product (dot product) of two ranges.
partialSum([T op(T, T)?]) List<T>

Available on Iterable<T>, provided by the NumericIterableExtension extension

Computes the prefix sums (partial sums).