projects
/
unres.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
UNRES caly zmienione 21 na ntyp1
[unres.git]
/
source
/
wham
/
src-M
/
mysort.f
1
subroutine imysort(n, m, mm, x, y, z, z1, z2, z3, z4, z5, z6)
2
implicit none
3
integer n,m,mm
4
integer x(m,mm,n),y(n),z(n),z1(2,n),z6(n),xmin,xtemp
5
double precision z2(n),z3(n),z4(n),z5(n)
6
double precision xxtemp
7
integer i,j,k,imax
8
do i=1,n
9
xmin=x(1,1,i)
10
imax=i
11
do j=i+1,n
12
if (x(1,1,j).lt.xmin) then
13
imax=j
14
xmin=x(1,1,j)
15
endif
16
enddo
17
xxtemp=z2(imax)
18
z2(imax)=z2(i)
19
z2(i)=xxtemp
20
xxtemp=z3(imax)
21
z3(imax)=z3(i)
22
z3(i)=xxtemp
23
xxtemp=z4(imax)
24
z4(imax)=z4(i)
25
z4(i)=xxtemp
26
xxtemp=z5(imax)
27
z5(imax)=z5(i)
28
z5(i)=xxtemp
29
xtemp=y(imax)
30
y(imax)=y(i)
31
y(i)=xtemp
32
xtemp=z(imax)
33
z(imax)=z(i)
34
z(i)=xtemp
35
xtemp=z6(imax)
36
z6(imax)=z6(i)
37
z6(i)=xtemp
38
do j=1,2
39
xtemp=z1(j,imax)
40
z1(j,imax)=z1(j,i)
41
z1(j,i)=xtemp
42
enddo
43
do j=1,m
44
do k=1,mm
45
xtemp=x(j,k,imax)
46
x(j,k,imax)=x(j,k,i)
47
x(j,k,i)=xtemp
48
enddo
49
enddo
50
enddo
51
return
52
end