Re: Optimizing basic operations
- Posted by jaygade Jul 31, 2013
- 6043 views
5) My data structure basically looks like this: { evaluation, {group 1 of integers}, {group 2 of integers} }. The evaluation starts out as a division / floating point, but I can convert it to an integer as approximate may be good enough. Group 1 and Group 2 always have the same length, so list could be made flat for sorting and re-grouped later. Only the evaluation needs to be sorted. The rest just come along for the ride. ASM shell sort sounds nice. How do I find this?
Which element are you sorting on? If you are sorting on one of the integer groups, how do you determine ordering? That is, whether one group is greater than, less than, or equal to another group?
Have you looked at the functions in std/sort.e? http://openeuphoria.org/docs/std_sort.html#_2964_sorting
Edit: Never mind, I see the answer in my quoted section above.
I'll come up with a code snippet later.