Description
gsort currently implements quicksort. It could be enriched by adding sorting methods such as Heapsort, Mergesort, Introsort, ...
Not to reinvent the wheel, external sorting libraries could be integrated in Scilab.
An investigation on what is implemented in other software (Matlab, Python, Octave, Julia, STL...) would be useful for decision-making.
New syntax
The current syntax could be kept:
- [B [,k]] = gsort(A, option, direction)
option could take new values "h", "hr", "hc", "m", "mr", "mc" to specify the method.
Integration
As usual, a documentation should be written, comparing algorithms notably about speed, stability and memory usage (numerical aspects).
Current tests would be extended to the new features.