groupByTo

inline fun <K, M : MutableMap<in K, MutableList<ComplexFloat>>> ComplexFloatArray.groupByTo(destination: M, keySelector: (ComplexFloat) -> K): M
inline fun <K, M : MutableMap<in K, MutableList<ComplexDouble>>> ComplexDoubleArray.groupByTo(destination: M, keySelector: (ComplexDouble) -> K): M

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

Return

The destination map.


inline fun <K, V, M : MutableMap<in K, MutableList<V>>> ComplexFloatArray.groupByTo(    destination: M,     keySelector: (ComplexFloat) -> K,     valueTransform: (ComplexFloat) -> V): M
inline fun <K, V, M : MutableMap<in K, MutableList<V>>> ComplexDoubleArray.groupByTo(    destination: M,     keySelector: (ComplexDouble) -> K,     valueTransform: (ComplexDouble) -> V): M

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 puts to the destination map each group key associated with a list of corresponding values.

Return

The destination map.