Re: question about sequence sorting
>I have a sequence of x length, of sequences of 4 atoms.
>e.g.
>sequence snafu
>snafu =3D {{1,3,5,8},{1,2,3,4}, ..... ,{1,3,5,7}}
>
>My question is, What would be the most efficient/(any) way of sorting=20
>the sequences(of four) into ascending order (fourth atom in the sequence
>being the one to sort by).
>
Colin, in the euphoria home base archive there is a section called db or
data bases. One of the files therein is called
enhanced database by Art Adamson
It contains techniques for sorting a simple multifield data base,
patterned after the Craig example, but modified so it can sort on the
first, second, third, or whatever field you want.
The technique should be easily modified to do your job. The file is
6x12.zip meaning 6 fields 12 characters each. this can be modified to use
your 4x4 data. It may not be the fastest however. Let me know if you think
I can help you.
I can probably mail you a copy of 6x12.zip if necessary but I would
prefer
that yu download it from Bob Craig.
Bye, Art Adamson
Art Adamson, The Cincinnati Engine Man, euclid2 at email.com
|
Not Categorized, Please Help
|
|