Figured it out, Orthotpe
is essentially a multi-dimensional generalization of AbstractRange
types.
julia> dump(0:1)
UnitRange{Int64}
start: Int64 0
stop: Int64 1
The base range objects are constructed with start
and stop
of elements that are Real
.
However, what’s really needed is a generalization of that for SVector
inputs.
(::Base.Colon)(min::SVector{N,T},max::SVector{N,T}) where {N,T} = Orthotope{N,T}(min,max)
In higher dimensions, what’s needed is simply an SVector
specifying the min and max range.
julia> SVector(0,0,0):SVector(1,1,1)
Orthotope{3,Int64}([0, 0, 0], [1, 1, 1])
So why don’t we have that in Julia yet? Should it be in the base language maybe?
SVector(0,0,0):SVector(0.1,0.1,0.1):SVector(1,1,1)
Also, having a 3 argument version would specify the number of grid points or interval lengths.
Either, this needs to be added to StaticArrays
package to define the :
constructor method without type piracy, or I need to add it to Grassmann
and use my own vector input types for it.
Most likely, I’ll just add it to Grassmann
since that has the least friction workflow for me, but if anyone else is interested, I can consider making a pull request to StaticArrays
package.