AcceleratedArrays.IntervalType
Interval(start, stop)

Construct a closed interval, which is a collection which contains (via in) elements between start and stop (inclusive) according to isless. The collection is abstract in nature and doesn't support iteration, indexing, etc.

Can be constructed via the .. function, e.g. 1..3 === Interval(1, 3).

Examples

julia julia> 2 in Interval(1, 3) true

julia> 3 in Interval(1, 3) true

julia> 4 in Interval(1, 3) false

AcceleratedArrays.:..Method
..(start, stop)
start..stop

Constructs an Interval(start, stop), which represents the closed interval between start and stop. Intervals are abstract collections which support in but not iteration, indexing, etc.

The interval includes both the start and stop poitns. To exclude the start or stop from the Interval, use the greaterthan or lessthan function.

Examples

julia julia> 2 in 1..3 true

julia> 3 in 1..3 true

julia> 4 in 1..3 false

julia> 1 in greaterthan(1)..3 false

julia> 3 in 1..lessthan(3) false

AcceleratedArrays.accelerate!Method
accelerate!(a, IndexType)

Return an AcceleratedArray wrapping a using the acceleration index of type T.

Depending on the index type, this operation may also modify a. For example a SortIndex will sort! the array a to maximize cache efficiency. The acceleration index will be invalidated (and become unsafe to use) if a is modified directly after the index is constructed. (See also accelerate).

AcceleratedArrays.accelerateMethod
accelerate(a, IndexType)

Return an AcceleratedArray wrapping a using the acceleration index of type T.

This operation will not modify a but the acceleration index will be invalidated (and become unsafe to use) if a is modified directly after the index is constructed. (See also accelerate!).

AcceleratedArrays.greaterthanMethod
greaterthan(x)

Return a value which is immediately larger than x. Than value is almost, but not quite, equal to x - there should be no other values (of any type) in between x and greaterthan(x) according to Julia's isless and isequal canonical total ordering.

Amongst other uses, this may be used to create Intervals that exclude the starting point.

See also lessthan.

Examples

julia> isequal(10, greaterthan(10))
false

julia> isless(10, greaterthan(10))
true

julia> 0 ∈ 0..10
true

julia> 0 ∈ greaterthan(0)..10
false
AcceleratedArrays.lessthanMethod
lessthan(x)

Return a value which is immediately smaller than x. Than value is almost, but not quite, equal to x - there should be no other values (of any type) in between x and lessthan(x) according to Julia's isless and isequal canonical total ordering.

Amongst other uses, this may be used to create Intervals that exclude the end point.

See also greaterthan.

Examples

julia> isequal(lessthan(10), 10)
false

julia> isless(lessthan(10), 10)
true

julia> 10 ∈ 0..10
true

julia> 10 ∈ 0..lessthan(10)
false