toMutableSet

fun <T, D : Dimension> MultiArray<T, D>.toMutableSet(): MutableSet<T>

Returns a mutable set containing all distinct elements from the given collection.

The returned set preserves the element iteration order of the original collection.