HPPERM(3)

SYNOPSIS
SUBROUTINE HPPERM (HX, N, IPERM, WORK, IER)

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

LIBRARY
SLATEC

CATEGORY
N8

TYPE
CHARACTER (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
HPPERM rearranges the data vector HX according to the permutation IPERM: HX(I) <--- HX(IPERM(I)). IPERM could come from one of the sorting routines IPSORT, SPSORT, DPSORT or HPSORT. Description of Parameters HX - input/output -- character array of values to be rearranged. N - input -- number of values in character array HX. IPERM - input -- permutation vector. WORK - character variable which must have a length specification at least as great as that of HX. IER - output -- error indicator: = 0 if no error, = 1 if N is zero or negative, = 2 if work array is not long enough, = 3 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 and to add check for length of work array.