Re: A Matrix collection class
Re: A Matrix collection class
- Subject: Re: A Matrix collection class
- From: email@hidden
- Date: Wed, 08 May 2002 13:46:09 +0100
My main problem with multidimensional arrays is figuring out how to convert
a straight void* to them - I can never persuade C to convert to
int[x][y][]... And while I know I can use my own index calculation, or an
NSDictionary, I was hoping (as I said) for something less ugly. An object
that does that for me, for example.
Kritter out
The problem with that approach is that it gets very memory and time
inefficient if you have several dimensions - need to set up an awful lot
of NSArrays. I was hoping for something a little less ugly.
Depends on how filled your array is. If it is well filled, it's not that
bad (compared with the actual array contents), but of course, always you
can consider using one big array and computing the index yourself
(i*SIZEI+ j*SIZEJ+k) or even using directly plain C multidimensional
array, which does exactly the same.
OTOH, if the array happens to be sparse, I guess NSDictionary is the best
approach. ---
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.