average

fun <T> Space<T>.average(data: Iterable<T>): T

Returns an average value of elements in the iterable in this Space.

Return

the average value.

Author

Iaroslav Postovalov

Parameters

<receiver>

the algebra that provides addition and division.

data

the iterable to find average.

fun <T> Space<T>.average(data: Sequence<T>): T

Returns an average value of elements in the sequence in this Space.

Return

the average value.

Author

Iaroslav Postovalov

Parameters

<receiver>

the algebra that provides addition and division.

data

the sequence to find average.