• 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: BOOL array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BOOL array


  • Subject: Re: BOOL array
  • From: Joel Norvell <email@hidden>
  • Date: Wed, 10 Sep 2008 10:10:48 -0700 (PDT)

Yes, only storing "ones" would work well with NSMutableIndexSet's containsIndex method.  If you didn't get a "hit" you'd know that that position was a "zero."  I was incorrectly thinking of NSMutableIndexSet as an array.

--- On Wed, 9/10/08, Shawn Erickson <email@hidden> wrote:

> On Wed, Sep 10, 2008 at 9:18 AM, Joel Norvell wrote:

> > OK.  I think I've got it.  One could use an
> > increasing sequence of integers, letting evenness and
> > oddness determine the boolean state at any index.  That
> > would save a huge amount of "overhead" in this case!
>
> You only need to store the "index" of all the "ones" not need for
> even/odd business. You then walk the index set picking out the ones
> and marking down zeros for those indexes not in the set, etc.
>
> Of course the bit vector that someone suggested earlier is likely a
> better tool for this.
>





_______________________________________________

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

  • Follow-Ups:
    • Re: BOOL array
      • From: Scott Ribe <email@hidden>
References: 
 >Re: BOOL array (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: NSInvocation
  • Next by Date: Re: While we're on the subject of DMG's for software distribution...
  • Previous by thread: Re: BOOL array
  • Next by thread: Re: BOOL array
  • Index(es):
    • Date
    • Thread