GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
liboctave
cruft
ranlib
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
larray
21
C ..
22
C .. Array Arguments ..
23
INTEGER
iarray(larray)
24
C ..
25
C .. Local Scalars ..
26
INTEGER
i,itmp,iwhich
27
C ..
28
C .. External Functions ..
29
INTEGER
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:1
Generated on Thu Jun 4 2015 23:30:24 for GNU Octave by
1.8.8