Re: sort and sweep / sweep and prune and just touching objects

Jon Watte <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
[email protected] wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>   
>> In a stable sort, you generally have a tie breaker, such as the "this" 
>> pointer of the value in question, in the case of a tie.
>>     
>
> Hmmm, wouldn't that mean i'd need to do the expensive value vs value test 
> anyway first?
>   

If the problem is that the same value maps to multiple indices, then I 
don't see why -- you get a stable sort by checking index (as long as the 
index relates to the value).

If the problem is that the same index maps to multiple values, then yes, 
you need to check values.

If the problem is that you have non-unique values, which map to 
non-unique indices, but you want an ordering between separate values 
with the same value/index, then using a tie-breaker is one solution.

Sincerely,

jw


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.