Re: A Matrix collection class
Re: A Matrix collection class
- Subject: Re: A Matrix collection class
- From: Ondra Cada <email@hidden>
- Date: Wed, 8 May 2002 13:53:18 +0200
On Wednesday, May 8, 2002, at 08:44 , Chris Purcell wrote:
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.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.