StrideIterator

Iterates an iterator with a fixed strides.

StrideIterator is used by stride.

Members

Aliases

__map
alias __map(alias fun) = StrideIterator__map!(Iterator, _stride, fun)

Functions

lightConst
auto lightConst()
lightImmutable
auto lightImmutable()
opBinary
ptrdiff_t opBinary(typeof(this) right)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(ptrdiff_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
ptrdiff_t opCmp(typeof(this) right)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(this) right)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
auto ref opIndex(ptrdiff_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(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.
opUnary
void opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

_stride
enum _stride;

Variables

_iterator
Iterator _iterator;

Examples

IotaIterator!int iota;
StrideIterator!(IotaIterator!int, -3) stride;

iota -= stride._stride;
--stride;
assert(*stride == *iota);

iota += stride._stride;
++stride;
assert(*stride == *iota);

assert(stride[7] == iota[7 * stride._stride]);

iota -= 100 * stride._stride;
stride -= 100;
assert(*stride == *iota);

iota += 100 * stride._stride;
stride += 100;
assert(*stride == *iota);

assert(*(stride + 10) == *(iota + 10 * stride._stride));

assert(stride - 1 < stride);

assert((stride - 5) - stride == -5);

Meta