groupBy

inline fun <K> ComplexFloatArray.groupBy(keySelector: (ComplexFloat) -> K): Map<K, List<ComplexFloat>>
inline fun <K> ComplexDoubleArray.groupBy(keySelector: (ComplexDouble) -> K): Map<K, List<ComplexDouble>>

Groups elements of the original array by the key returned by the given keySelector function applied to each element and returns a map where each group key is associated with a list of corresponding elements.

The returned map preserves the entry iteration order of the keys produced from the original array.


inline fun <K, V> ComplexFloatArray.groupBy(keySelector: (ComplexFloat) -> K, valueTransform: (ComplexFloat) -> V): Map<K, List<V>>
inline fun <K, V> ComplexDoubleArray.groupBy(keySelector: (ComplexDouble) -> K, valueTransform: (ComplexDouble) -> V): Map<K, List<V>>

Groups values returned by the valueTransform function applied to each element of the original array by the key returned by the given keySelector function applied to the element and returns a map where each group key is associated with a list of corresponding values.

The returned map preserves the entry iteration order of the keys produced from the original array.