onlyByValue

Returns unsorted forward range of values.

onlyByValue
(
T
size_t N
)
(
Slice!(FieldIterator!(SparseField!T), N) slice
)

Parameters

slice Slice!(FieldIterator!(SparseField!T), N)

sparse slice with pure structure. Any operations on structure of a slice are not allowed.

Examples

import mir.array.allocation: array;
import mir.ndslice.sorting: sort;

auto slice = sparse!double(3, 3);
slice[] = [[0, 2, 1], [0, 0, 4], [6, 7, 0]];
assert(slice.onlyByValue.array.sort() == [1, 2, 4, 6, 7]);

Meta