quote:Original post by Anonymous Poster
Marek
PS If you have a parallel sorting algorithm that I can compare mine against. Send me an email: m.olszewski @ utoronto.ca.
Aha, I recognize that name This guy is continuing (in a rather different direction, apparently) on my (undergrad) thesis work, and knows what he''s talking about here.
(It''s worth noting that stablesort() will guarantee, well, a stable sort - i.e. if x comes before y in the original list, and x "equals" y according to the comparison function, then x will be before y in the sorted list. Removing this guarantee sometimes allows faster sorting, but when this property is needed, make sure you have it. )
To elaborate: for my thesis I tried to develop AI to optimize divide-and-conquer algorithms, by choosing the ''subalgorithm'' to use at each step. I happened to choose sorting as my "test problem", so it basically attempted to do what std::sort() does, except gathering a bunch of raw data in order to determine the cutoff points for switching the sorting method - and also not using very sophisticated sorting code, because I was writing it all myself :/ A fine example of how not to do real-world work, but it made for interesting study. (It was also my last - in the sense of most recent, but hopefully I won''t have to again! - attempt at using C++, which has never worked out very well for me. I figured I needed the template generics though. Oh well.)
BTW, the code I wrote is available at http://jove.prohosting.com/~zahlman/DaCAlOpE/DaCAlOpE.tar.gz.
You will need to download the "c4.5" decision tree code yourself, because of the author''s licensing terms.