# QEPCompareEigenvalues

Compares two (possibly complex) eigenvalues according to a certain criterion.

### Synopsis

    #include "slepcqep.h"
    PetscErrorCode QEPCompareEigenvalues(QEP qep,PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result)

Not Collective

### Input Parameters

| qep | - the quadratic eigensolver context
| ar | - real part of the 1st eigenvalue
| ai | - imaginary part of the 1st eigenvalue
| br | - real part of the 2nd eigenvalue
| bi | - imaginary part of the 2nd eigenvalue

### Output Parameter

res - result of comparison

### Notes

Returns an integer less than, equal to, or greater than zero if the first eigenvalue is considered to be respectively less than, equal to, or greater than the second one.

The criterion of comparison is related to the 'which' parameter set with QEPSetWhichEigenpairs().

### See Also

QEPSortEigenvalues(), QEPSetWhichEigenpairs()

Location: src/qep/interface/qepsolve.c
Index of all QEP routines
Table of Contents for all manual pages
Index of all manual pages