IterableNumberExtension extension

Extensions that apply to iterables of numbers.

Specialized version of some extensions of IterableComparableExtension since doubles require special handling of double.nan.

on

Properties

average double

Available on Iterable<num>, provided by the IterableNumberExtension extension

The arithmetic mean of the elements of a non-empty iterable.
no setter
max num

Available on Iterable<num>, provided by the IterableNumberExtension extension

A maximal element of the iterable.
no setter
maxOrNull num?

Available on Iterable<num>, provided by the IterableNumberExtension extension

A maximal element of the iterable, or null if the iterable is empty.
no setter
min num

Available on Iterable<num>, provided by the IterableNumberExtension extension

A minimal element of the iterable.
no setter
minOrNull num?

Available on Iterable<num>, provided by the IterableNumberExtension extension

A minimal element of the iterable, or null it the iterable is empty.
no setter
sum num

Available on Iterable<num>, provided by the IterableNumberExtension extension

The sum of the elements.
no setter