reactor-kotlin-extensions / reactor.kotlin.extra.math / reactor.core.publisher.Flux / averageAsBigInt

averageAsBigInt

fun <T : Number> Flux<T>.averageAsBigInt(): Mono<BigInteger>

Extension to compute the BigInteger average of all values emitted by a Flux of Number and return it as a Mono of BigInteger.

Note that the result will be mapped to BigInteger and is likely to lose precision during the calculation of the average

Author
Mark Pruden

Since
1.1.5