Orthogonal Arrays

bmeck bmeck at stedwards.edu
Mon Nov 3 19:27:26 PST 2008


I've been wondering how other people deal with this. Arrays that are distinct and separate but related. I've heard people say why aren't you using a structure of some kind, but in reality sometimes this is just not practical to restructure lots and lots of data and the way to get to data can be messy. For example, images can have multiple color planes (essentially a color plane can be considered a nth dimensional array which is generally byte[][3] for 256 colors with 1 byte each representing a pixel), because of having multiple of these planes is possible it could take a lot of moving to make a structure out of every color plane's pixel array and combine it will all the others.

I was hoping someone out there could point me at a way to treat multiple orthogonal arrays as a single structure (ie. if you have 2 arrays $A with [name] and $B [with r,b,and g] members you could do $X = orthogonal!(A,B) then use X[i].name and also X[i].r) without restructuring things in memory.



More information about the Digitalmars-d mailing list