Implementation of slices with non-1 increments.
Procs
func `[]`[I: Ordinal; T, U, V: SomeNumber](s: StridedSlice[T, U, V]; i: HSlice[BackwardsIndex, I]): auto {.inline.}
- Returns s[i.a] .. s[i.b]. Source Edit
func `[]`[I: Ordinal; T, U, V: SomeNumber](s: StridedSlice[T, U, V]; i: HSlice[I, BackwardsIndex]): auto {.inline.}
- Returns s[i.a] .. s[i.b]. Source Edit
func `[]`[I: Ordinal; T, U, V: SomeNumber](s: StridedSlice[T, U, V]; i: HSlice[I, I]): auto {.inline.}
- Returns s[i.a] .. s[i.b]. Source Edit
func `[]`[I: Ordinal; T, U, V: SomeNumber](s: StridedSlice[T, U, V]; i: I): auto {. inline.}
- Returns the number given at the i th iteration over s. Source Edit
func `[]`[T, U, V: SomeNumber](s: StridedSlice[T, U, V]; i: HSlice[BackwardsIndex, BackwardsIndex]): auto {. inline.}
- Returns s[i.a] .. s[i.b]. Source Edit
func `[]`[T, U, V: SomeNumber](s: StridedSlice[T, U, V]; i: BackwardsIndex): auto {. inline.}
- Returns the number given at the i th iteration starting from the end over s. Source Edit
func by[T, U, V: SomeNumber](s: HSlice[T, U]; step: U): StridedSlice[T, U, V] {. inline.}
- Initializes a stride with over the slice s with step step. Source Edit
func contains[T, U, V, W: SomeNumber](s: StridedSlice[T, U, V]; x: W): bool
- Returns true if x is a value given by iterating over s. Requires W - T -> X and X mod U -> Y: SomeNumber, meaning you need math.mod for floats. Source Edit
func len[T, U, V: SomeNumber](s: StridedSlice[T, U, V]): int {.inline.}
- Guess of number of iterations over s. Source Edit
Iterators
iterator items[T, U, V: SomeNumber](s: StridedSlice[T, U, V]): auto {. noSideEffect.}
- Iterates over s. Source Edit