• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A Matrix collection class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: A Matrix collection class
      • From: email@hidden
References: 
 >Re: A Matrix collection class (From: Chris Purcell <email@hidden>)

  • Prev by Date: Re: Making an NSTextView have a data source
  • Next by Date: Re: A Matrix collection class
  • Previous by thread: Re: A Matrix collection class
  • Next by thread: Re: A Matrix collection class
  • Index(es):
    • Date
    • Thread