I'm working on some algorithms that operate on a point set in N dimensions, 
and I'm most interested in small N.

My first thought was to represent the points by a 1D array of some kind of 
Point type, with Point just being a type alias of NTuple{N, T}, or 
something morally equivalent. But now that I'm writing the code, it seems 
like it is currently a lot easier express simple computations (e.g. finding 
the bounding box) with a plain old 2D array. I looked around at what other 
people are doing, and noticed that Distance at least uses an Nxm array to 
represent m points in N dimensions.

I see that Base "graphics.jl" defines Vec2 and a Point type for 2D 
geometry, with a bounding box method and rotations, but the machinery there 
isn't developed very far yet, and doesn't try to extend to 3D or higher at 
all.

So I guess I'm wondering if Nxm arrays are the obvious right way to go, or 
if there's something to be gained from a Point type and it's just that no 
one has put together the relevant machinery yet.

Reply via email to