SlideIterator

SlideIterator is used by diff and slide.

Members

Aliases

__map
alias __map(alias fun1) = SlideIterator__map!(Iterator, params, fun, pipe!(fun, fun1))

Functions

lightConst
auto lightConst()
lightImmutable
auto lightImmutable()
opIndex
auto ref opIndex(ptrdiff_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
auto ref opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_iterator
Iterator _iterator;

Examples

import mir.functional: naryFun;
auto data = [1, 3, 8, 18];
auto diff = SlideIterator!(int*, 2, naryFun!"b - a")(data.ptr);
assert(*diff == 2);
assert(diff[1] == 5);
assert(diff[2] == 10);

Meta