• 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: Multidimensiaon Arrays in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multidimensiaon Arrays in Cocoa


  • Subject: Re: Multidimensiaon Arrays in Cocoa
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 23 Sep 2001 15:26:13 +0200

John,

>>>>>> John C. Randolph (JCR) wrote at Sun, 23 Sep 2001 05:52:41 -0700:
JCR> One trick that just occurred to me for storage of values of a sparse
JCR> array of any number of dimensions, is to keep the values in an
JCR> NSDictionary, where the key is the contatenation of the coordinates.

Actually, it is much cleaner to use an NSArray. Ie., instead of

// a contains the indices
[d setObject:value forKey:[a componentsJoinedByString:@":"]]

you would use directly

[d setObject:value forKey:a]
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: Multidimensiaon Arrays in Cocoa
      • From: "John C. Randolph" <email@hidden>
References: 
 >Re: Multidimensiaon Arrays in Cocoa (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: Multidimensiaon Arrays in Cocoa
  • Next by Date: What causes Finder 'Volume in use" alert?
  • Previous by thread: Re: Multidimensiaon Arrays in Cocoa
  • Next by thread: Re: Multidimensiaon Arrays in Cocoa
  • Index(es):
    • Date
    • Thread