toSortedSet

fun <T : Number, D : Dimension> MultiArray<T, D>.toSortedSet(): SortedSet<T>

Returns a SortedSet of all elements.


fun <T, D : Dimension> MultiArray<T, D>.toSortedSet(comparator: Comparator<in T>): SortedSet<T>

Returns a SortedSet of all elements.

Elements in the set returned are sorted according to the given comparator.