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

Re: NSIndexSet


  • Subject: Re: NSIndexSet
  • From: Jon Hull <email@hidden>
  • Date: Sat, 29 Nov 2003 19:32:59 -0800

On Nov 29, 2003, at 6:30 PM, Matthew Johnson wrote:

> I am implementing a category on NSIndexSet that includes a method -
> (BOOL)intersectsIndexes:(NSIndexSet *)indexSet. The implementation of
> this will have to loop through one of the index sets and check for
> intersection using containsIndex and intersectsIndexesInRange. I am
> wondering whether it would generally be quicker to loop through the
> smaller index set or perform the intersection tests on the smaller
> index set. Opinions?

Why not just use the methods firstIndex and lastIndex on the both sets
then use the larger firstIndex and smaller lastIndex to make an
NSRange, then return intersectsIndexesInRange?

Thanks,
Jon
_______________________________________________
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: NSIndexSet
      • From: Jon Hull <email@hidden>
References: 
 >NSIndexSet (From: Matthew Johnson <email@hidden>)

  • Prev by Date: NSIndexSet
  • Next by Date: Re: Getting NSTextField from NSWindow firstResponder
  • Previous by thread: NSIndexSet
  • Next by thread: Re: NSIndexSet
  • Index(es):
    • Date
    • Thread