next up previous 196
Next: PDA_RNEXP - Returns pseudo-random numbers from an exponential distribution
Up: User-callable routines
Previous: PDA_RFFTI - Initialize PDA_RFFTF and PDA_RFFTB.


PDA_RINP[x] - Reorder an array in place using a permutation index

Description:
This routine reorders an array (in place) using an permutation vector. This is most likely the output from one of the sorting routines PDA_QSI[A|D][x]

Invocation:
CALL PDA_RINP[x]( PERM, N, X, IFAIL )

Arguments:

PERM( N ) = INTEGER (Given and Returned)
The index vector. Note this is modified but should be returned in the same state as when input. Indices may not be negative.
N = INTEGER (Given)
Number of elements.
X( N ) = ? (Given and Returned)
The array to reorder.
IFAIL = INTEGER (Returned)
Status flag. Set 0 for success, otherwise the permutation isn't correct.

Notes:

Timing
Proportional to N.


next up previous 196
Next: PDA_RNEXP - Returns pseudo-random numbers from an exponential distribution
Up: User-callable routines
Previous: PDA_RFFTI - Initialize PDA_RFFTF and PDA_RFFTB.

PDA [1ex
Starlink User Note 194
H. Meyerdierks, D. Berry, P. W. Draper, G. Privett, M. Currie
12th October 2005
E-mail:ussc@star.rl.ac.uk

Copyright © 2011 Science and Technology Facilities Council