[PD] Sort and init objects

Frank Barknecht fbar at footils.org
Sun Jun 12 18:59:50 CEST 2011


Hi,

On Sun, Jun 12, 2011 at 10:32:27AM +0200, cyrille henry wrote:
> there is a list-sort in footils list abstraction folder. and some
> list_quicksort where send to this list few years ago.

The rj library doesn't include a sorting abstraction, so indeed one should use
abstractions from elsewhere like those from list-abs, which should be no 
problem as they are all compatible with the vanilla-- object set available in RjDj.

Another option would be sorting with data structures, which I usually do today.
Attached is an example abstraction for data structure sorting (datasort.pd). It
seems to be much faster than list-quicksort from list-abs (the currently
fastest sorting in there), but only sorts in ascending order. See the bench.pd
benchmark for a comparison. 

You will probably want to modify datastort to suit your needs.

Ciao
-- 
 Frank Barknecht            Do You RjDj.me?          _ ______footils.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: list-quicksort.pd
Type: application/puredata
Size: 29439 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110612/a47c423a/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bench.pd
Type: application/puredata
Size: 2018 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110612/a47c423a/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ds.pd
Type: application/puredata
Size: 378 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110612/a47c423a/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qs.pd
Type: application/puredata
Size: 354 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110612/a47c423a/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: list-datasort.pd
Type: application/puredata
Size: 1370 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110612/a47c423a/attachment-0009.bin>


More information about the Pd-list mailing list