slicedField

Creates an n-dimensional slice-shell over a field.

  1. Slice!(FieldIterator!Field, N) slicedField(Field field, size_t[N] lengths)
  2. auto slicedField(Field field)
    slicedField
    (
    Field
    )
    (
    Field field
    )
    if (
    hasLength!Field
    )

Parameters

field Field

A field. The length of the array should be equal to or less then the product of lengths.

Return Value

Type: auto

n-dimensional slice

Examples

Creates an 1-dimensional slice over a field, array, or random access range.

import mir.ndslice.topology : iota;
auto slice = 10.iota.slicedField;
assert(slice.length == 10);

Meta