• 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: Mutually exclusive item filtering-comparing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mutually exclusive item filtering-comparing


  • Subject: Re: Mutually exclusive item filtering-comparing
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 05 Nov 2013 15:00:47 -0800

On Nov 5, 2013, at 2:47 PM, Chris Paveglio <email@hidden> wrote:

> Could you expand on that a bit or maybe send me a link for more info? My ID numbers aren't sequential from 0 to 100. They are somewhat random (457, 853, 1587, etc). An example would be {item1ID: 234, itemID2: 3987, exclusive:yes}. From  your explanation, would a bitmap index work? Adding my item# together and multiply n wouldn't give a real offset to a bit in a bitmap.

If the item numbers are too large to practically use a bitmap, you can use a hashtable instead. In Cocoa terms, create an NSMutableSet whose keys are pairs of itemIDs. The simplest key type would be an NSArray of two NSNumbers, but it’s cheaper to combine the two numbers into one object, for instance by packing them into the upper and lower halves of a 64-bit integer.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Mutually exclusive item filtering-comparing (From: Chris Paveglio <email@hidden>)
 >Re: Mutually exclusive item filtering-comparing (From: Jens Alfke <email@hidden>)
 >Re: Mutually exclusive item filtering-comparing (From: Chris Paveglio <email@hidden>)

  • Prev by Date: Re: Mutually exclusive item filtering-comparing
  • Next by Date: SKIndexAddDocument crashing
  • Previous by thread: Re: Mutually exclusive item filtering-comparing
  • Next by thread: Re: Mutually exclusive item filtering-comparing
  • Index(es):
    • Date
    • Thread