SPPERM(3)

SYNOPSIS
SUBROUTINE SPPERM (X, N, IPERM, IER)

NAME
spperm - Rearrange a given array according to a prescribed permutation vector.

LIBRARY
SLATEC

CATEGORY
N8

TYPE
SINGLE PRECISION (SPPERM-S, DPPERM-D, IPPERM-I, HPPERM-H)

KEYWORDS
APPLICATION OF PERMUTATION TO DATA VECTOR

AUTHOR
McClain, M. A., (NIST) Rhoads, G. S., (NBS)

DESCRIPTION
SPPERM rearranges the data vector X according to the permutation IPERM: X(I) <--- X(IPERM(I)). IPERM could come from one of the sorting routines IPSORT, SPSORT, DPSORT or HPSORT. Description of Parameters X - input/output -- real array of values to be rearranged. N - input -- number of values in real array X. IPERM - input -- permutation vector. IER - output -- error indicator: = 0 if no error, = 1 if N is zero or negative, = 2 if IPERM is not a valid permutation.

REFERENCES
(NONE)

ROUTINES CALLED
XERMSG

REVISION HISTORY (YYMMDD)
901004 DATE WRITTEN
920507 Modified by M. McClain to revise prologue text.