averageWith

fun <T, S : Group<T>, ScaleOperations<T>> Iterable<T>.averageWith(space: S): T

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

Return

the average value.

Author

Iaroslav Postovalov

Parameters

<receiver>

the iterable to find average.

space

the algebra that provides addition and division.

fun <T, S : Group<T>, ScaleOperations<T>> Sequence<T>.averageWith(space: S): T

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

Return

the average value.

Author

Iaroslav Postovalov

Parameters

<receiver>

the sequence to find average.

space

the algebra that provides addition and division.