So, I’ve found that in several separate packages I need something like an Orthotope
type
struct Orthotope{N,T}
min::SVector{N,T}
max::SVector{N,T}
end
Or in other words, a hyper-rectangle, specified by minimum and maximum bounds.
struct Orthogrid{N,T}
x::Orthotope{N,T}
n::SVector{N,Int}
end
In addition to that, I need to specify a number of grid points in each dimension. That’s what the second wrapping type is for, thus Orthogrid
contains the grid sizes and the Orthotope
value.
However, I’m really not sure where to put this type. I’m planning to use it in various ways in multiple different packages. All the packages that I need this for are built on my Grassmann.jl package, so I am considering just adding it into that package. However, it doesn’t quite make sense to put it in there contextually I think, but I also don’t necessarily want to make a separate package for it.
I’m not really sure how to organize this type yet. It could go into GeometryBasics
but I don’t want to load that as a dependency in my packages (only as an optional dependency).
It’s kind of like a generalization of an AbstractRange
but for more than 1 dimension.