EasyRanges.CartesianBox
— TypeEasyRanges.CartesianBox{N}
is an alias for CartesianIndices{N}
but restricted to have contiguous Cartesian indices. Since Julia 1.6, CartesianIndices
may have non-unit step, hence non-contiguous indices.
EasyRanges.ContiguousRange
— TypeEasyRanges.ContiguousRange
is an alias for AbstractUnitRange{Int}
, the type of ranges in an [EasyRanges.CartesianBox
][(@ref).
EasyRanges.ShrinkBy
— TypeEasyRanges.ShrinkBy(δ) -> obj
yields a callable object obj
such that obj(x)
yields x
shrinked by offset δ
.
EasyRanges.StretchBy
— TypeEasyRanges.StretchBy(δ) -> obj
yields a callable object obj
such that obj(x)
yields x
stretched by offset δ
.
EasyRanges.backward
— MethodEasyRanges.backward(R)
yields an object which constains the same (Cartesian) indices as R
but with negative step(s) and Int
-valued. Arguments of other types are returned unchanged.
EasyRanges.cap
— MethodEasyRanges.cap(a...)
yields the result of expression a ∩ b
in @range
macro.
EasyRanges.first_last
— MethodEasyRanges.first_last(x) -> (first_x, last_x)
yields the 2-tuple (first(x), last(x))
converted to be Int
-valued.
EasyRanges.first_step_last
— MethodEasyRanges.first_step_last(x) -> (first_x, step_x, last_x)
yields the 3-tuple (first(x), step(x), last(x))
converted to be Int
-valued.
EasyRanges.forward
— MethodEasyRanges.forward(R)
yields an object which contains the same (Cartesian) indices as R
but with positive step(s) and Int
-valued. Arguments of other types are returned unchanged.
EasyRanges.minus
— FunctionEasyRanges.minus(a...)
yields the result of expression -a
and a - b
in @range
macro.
EasyRanges.plus
— FunctionEasyRanges.plus(a...)
yields the result of expression +a
, a + b
, a + b + c...
in @range
macro.
EasyRanges.ranges
— MethodEasyRanges.ranges(R)
yields the list of ranges in Cartesian indices R
.
EasyRanges.shrink
— MethodEasyRanges.shrink(a, b)
yields the result of shrinking a
by amount b
. This is equivalent to the expression a ∓ b
in @range
macro.
EasyRanges.stretch
— MethodEasyRanges.stretch(a, b)
yields the result of stretching a
by amount b
. This is equivalent to the expression a ± b
in @range
macro.
EasyRanges.to_int
— MethodEasyRanges.to_int(x)
yields an Int
-valued equivalent of x
.
EasyRanges.to_type
— MethodEasyRanges.to_type(T, x)
yields x
surely converted to type T
.
EasyRanges.@range
— Macro@range expr
rewrites range expression expr
with extended syntax. The result is an Int
-valued index range (possibly Cartesian) where indices are running in the forward direction (with a positive step).
EasyRanges.@reverse_range
— Macro@reverse_range expr
rewrites range expression expr
with extended syntax. The result is an Int
-valued index range (possibly Cartesian) where indices are running in the reverse direction (with a negative step).