Re: Sort by numerical order
Re: Sort by numerical order
- Subject: Re: Sort by numerical order
- From: Emmanuel <email@hidden>
- Date: Sun, 13 Apr 2003 00:44:28 +0200
At 6:31 PM +0200 12/04/03, Thomas C. wrote:
Hi all, can someone show me a routine that would sort a list of
reals by numerical order ?
If you can download Smile X from
<
http://www.satimage-software.com/fr/softx.html#smile>, open its
"Class scripts" folder then its "Application" script and find there a
rather fast recursive "sort" handler and a rather fast non-recursive
"heapsort".
"heapsort" is a bit slower in average, but much less sensitive to the
initial order. "heapsort" won't meet a stack overflow limit.
"heapsort" can easily (by changing 1 character IIRC) be tweaked to
perform a partial - thus, faster - ordering (you only want the 3
largest numbers, e.g.).
Smile est fabriqui en France et localisi en Frangais.
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.