PetscSortIntWithPermutation

Computes the permutation of values that gives a sorted sequence.

Synopsis

#include "petsc.h"  
#include "petscsys.h"    
int PetscSortIntWithPermutation(int n,const int i[],int idx[])
Not Collective

Input Parameters

n - number of values to sort
i - values to sort
idx - permutation array. Must be initialized to 0:n-1 on input.

Notes

i is unchanged on output.

See Also

PetscSortInt(), PetscSortRealWithPermutation()

Level:intermediate
Location:
src/sys/src/utils/sortip.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages