associateBy

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

Returns a Map containing the elements from the given array indexed by the key returned from keySelector function applied to each element.

If any two elements would have the same key returned by keySelector the last one gets added to the map.

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


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

Returns a Map containing the values provided by valueTransform and indexed by keySelector functions applied to elements of the given array.

If any two elements would have the same key returned by keySelector the last one gets added to the map.

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