reduce Right Indexed
inline fun ComplexFloatArray.reduceRightIndexed(operation: (index: Int, ComplexFloat, acc: ComplexFloat) -> ComplexFloat): ComplexFloat
Content copied to clipboard
inline fun ComplexDoubleArray.reduceRightIndexed(operation: (index: Int, ComplexDouble, acc: ComplexDouble) -> ComplexDouble): ComplexDouble
Content copied to clipboard
Accumulates value starting with the last element and applying operation from right to left to each element with its index in the original array and current accumulator value.
Throws an exception if this array is empty. If the array can be empty in an expected way, please use reduceRightIndexedOrNull instead. It returns null
when its receiver is empty.
Parameters
operation
function that takes the index of an element, the element itself and current accumulator value, and calculates the next accumulator value.