This is the mail archive of the gsl-discuss@sourceware.cygnus.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: suggest to add 'heapsort'.


Interesting, but I guess other types of sorts fall outside the domain
of GSL (perhaps there should be a GNU Sorting Library too...  ).
It seems reasonable to provide one sort in case the system qsort()
does not work properly though.

Regarding containers, the plan for GSL is to stick with C arrays
wrapped with simple structs -- quite low-level, for simplicity. Users
needing more complicated data-structures would then use GLIB, etc, to
build on top of that.

Klaus Schilling writes:
 > Brian Gough writes:
 >  > Thanks. A heapsort would be useful as an alternative to qsort(). If
 >  > you put the source somewhere and send the url to the list then we can
 >  > download it from there. GSL uses size_t for indices, unsigned.
 >  > 
 > Would mergesort also be an alternative? It seems to be the only stable
 > O(n * log n ) sorting algorithm, though space intensive in turn.
 > Would it also be useful to consider container structures different
 > from static C arrays, such as lists or btrees? There are some
 > good GPL compatible libraries for container data structures now,
 > such as avltree, glib or libretto, which could be borrowed from.
 > 
 > Klaus Schilling

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]