GNU Octave
6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
genprm.f
Go to the documentation of this file.
1
SUBROUTINE
genprm
(iarray,larray)
2
C**********************************************************************
3
C
4
C SUBROUTINE GENPRM( IARRAY, LARRAY )
5
C GENerate random PeRMutation of iarray
6
C
7
C
8
C Arguments
9
C
10
C
11
C IARRAY <--> On output IARRAY is a random permutation of its
12
C value on input
13
C INTEGER IARRAY( LARRAY )
14
C
15
C LARRAY <--> Length of IARRAY
16
C INTEGER LARRAY
17
C
18
C**********************************************************************
19
C .. Scalar Arguments ..
20
INTEGER*4
larray
21
C ..
22
C .. Array Arguments ..
23
INTEGER*4
iarray(larray)
24
C ..
25
C .. Local Scalars ..
26
INTEGER*4
i,itmp,iwhich
27
C ..
28
C .. External Functions ..
29
INTEGER*4
ignuin
30
EXTERNAL
ignuin
31
C ..
32
C .. Executable Statements ..
33
DO
10,i = 1,larray
34
iwhich = ignuin(i,larray)
35
itmp = iarray(iwhich)
36
iarray(iwhich) = iarray(i)
37
iarray(i) = itmp
38
10
CONTINUE
39
RETURN
40
41
END
genprm
subroutine genprm(iarray, larray)
Definition:
genprm.f:2
liboctave
external
ranlib
genprm.f
Generated on Tue Apr 13 2021 15:27:50 for GNU Octave by
1.9.1