slepc-3.18.1 2022-11-02
Report Typos and Errors

# SlepcSCCompare

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

### Synopsis

    #include "slepcsys.h"
    PetscErrorCode SlepcSCCompare(SlepcSC sc,PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res)

Not Collective

### Input Parameters

| sc | - the sorting criterion context
| ar | - real part of the 1st value
| ai | - imaginary part of the 1st value
| br | - real part of the 2nd value
| bi | - imaginary part of the 2nd value

### Output Parameter

| res | - result of comparison

### Notes

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

### See Also

SlepcSortEigenvalues(), SlepcSC

### Level

developer

### Location

src/sys/slepcsc.c
Index of all sys routines
Table of Contents for all manual pages
Index of all manual pages