[PD] list-sort

Frank Barknecht fbar at footils.org
Tue Dec 2 13:59:08 CET 2008


Hallo,

oh, and I also now committed two more abstractions that Matt Barber
sent me offlist, of which one is a sorting abstraction as well. Matt's
[list-shellsort] uses the Shell sorting algorithm:
http://en.wikipedia.org/wiki/Shell_sort which generally is a bit
faster than insertion sort, but I didn't benchmark the two Pd
implementations (the speed in Pd of course also depends on how much
element shuffling and list-dripping is needed)

Anyway, currently list-shellsort only does ascending sorting, so I
just decided to include both Michal's list-sort, which probably is
easier to understand, and Matt's list-shellsort in the current SVN's
[list]-abs collection. Choose your poison. ;)

Ciao
-- 
Frank

Michal Seta hat gesagt: // Michal Seta wrote:

> Hi all,
> 
> It is amazing how we take things for granted.  Most programming
> languages provide some sort of list sorting function/method.
> Surprisingly (or not) pd does not (or my search skills are null, or I
> am not bleeding edge enough).  I needed a solution that works with a
> vanilla pd.
> 
> I was almost going to do the academia move and announce a pd exam, and
> have little pd-bees come up with a solution but I needed it *now* else
> I would not sleep or have terrible nightmares.  So here it is.  Thank
> heavens (but give your offerings to fbar's footils shrine) for
> list-abs.
> 
> Busy pd-bees, should you care to improve on my solution, please be my
> guest, I am sure there are better ways of accomplishing this trivial
> task.  In any case, go forth and sort the world around (or within)
> you.
> 
> ./MiS



> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list


-- 
 Frank Barknecht            Do You RjDj.me?          _ ______footils.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: list-swap_and_list-shellsort.tgz
Type: application/x-gtar
Size: 2437 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20081202/85ee9316/attachment.tgz>


More information about the Pd-list mailing list