$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Martin Wille (mw8329_at_[hidden])
Date: 2007-03-17 06:29:09
Sam Schetterer wrote:
> Would users care if I took quicksort and merge sort out of the library? They
> are already implemented by the stl.
I think you meant "standard library" when you wrote "stl".
Your statement isn't correct. Neither "quicksort" (there's a qsort 
function that got inherited from C. That function neither needs to 
implement quicksort nor does it fit very well into the C++ standard 
library) nor "mergesort" are mentioned at any point in the C++ standard 
(there are merge operations, though. However, they aren't a complete 
sorting algorithm). Do not confuse the specific C++ implementation you 
are using with requirements from the standard.
However, adding another quicksort imlpementation doesn't make much sense 
if it doesn't cover anything that isn't already covered by the 
specification of std::sort, std::stable_sort etc.
Mergesort, OTOH, could be very interesting to have. Mergesort is a good 
choice for sorting large amounts of data on external storage. Among the 
parameters for that algorithm could be the point of a strategy switch, 
e.g. number of data elements that get sorted in memory (similar to 
switching from QS to some other algorihm for smaller sets.)
Regards,
m
Send instant messages to your online friends http://au.messenger.yahoo.com