#include "slepcds.h" PetscErrorCode DSSort(DS ds,PetscScalar *eigr,PetscScalar *eigi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)Logically Collective
|ds||- the direct solver context|
|rr||- (optional) array containing auxiliary values (real part)|
|ri||- (optional) array containing auxiliary values (imaginary part)|
|eigr||- array containing the computed eigenvalues (real part)|
|eigi||- array containing the computed eigenvalues (imaginary part)|
|k||- (optional) number of elements in the leading group|
If arrays rr and ri are provided, then a (partial) reordering based on these values rather than on the eigenvalues is performed. In symmetric problems a total order is obtained (parameter k is ignored), but otherwise the result is sorted only partially. In this latter case, it is only guaranteed that all the first k elements satisfy the comparison with any of the last n-k elements. The output value of parameter k is the final number of elements in the first set.