help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Sorting using "_index" version


From: Vicent
Subject: [Help-gsl] Sorting using "_index" version
Date: Tue, 22 Jun 2010 18:35:25 +0200

Hello to all.

I have to sort several arrays of double data, but I am thinking about using
the "_index" version of the functions in the GSL, because I want to keep the
original array unchanged.

In the documentation of GSL it is said the following when speaking about the
"gsl_heapsort" function:

"""The following function provides a simple alternative to the standard
library function qsort.
It is intended for systems lacking qsort, not as a replacement for it. The
function qsort
should be used whenever possible, as it will be faster and can provide
stable ordering of
equal elements. Documentation for qsort is available in the GNU C Library
Reference
Manual."""

I have also found "qsort_s" in C++ (an enhanced or more secure version of
"qsort").

Anyway, my question is: Is there any "standard" function in C++ similar to
those "_index" sorting functions in GSL?? I mean, a sorting function that
gives a permutation as a result, but keeps the original vector or array
unchanged.

I think I am going to use "gsl_sort_index", but I want to be sure first,
because of the warning about "gsl_heapsort" I talked about.

Thank you in advance for your help, your answers and your patience!

--
Vicent


reply via email to

[Prev in Thread] Current Thread [Next in Thread]