diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-15 23:04:23 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-15 23:04:23 +0200 |
| commit | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (patch) | |
| tree | d702795f99ac38e0cc17e25f0f7e50fa3e05baf9 /lib/shell.f90 | |
| parent | 310d05acf2c9233f7e336ae7dd9ffb7b54ca4e62 (diff) | |
New upstream version 3.0.0~rc1+repackupstream/3.0.0_rc1+repack
Diffstat (limited to 'lib/shell.f90')
| -rwxr-xr-x | lib/shell.f90 | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/lib/shell.f90 b/lib/shell.f90 index d7365bfc..1e9b4488 100755 --- a/lib/shell.f90 +++ b/lib/shell.f90 @@ -1,27 +1,27 @@ -subroutine shell(n,a) - integer n - real a(n) - integer i,j,inc - real v - - inc=1 -1 inc=3*inc+1 - if(inc.le.n) go to 1 -2 inc=inc/3 - - do i=inc+1,n - v=a(i) - j=i -3 if(a(j-inc).gt.v) then - a(j)=a(j-inc) - j=j-inc - if(j.le.inc) go to 4 - go to 3 - endif -4 a(j)=v - enddo - - if(inc.gt.1) go to 2 - - return -end subroutine shell +subroutine shell(n,a)
+ integer n
+ real a(n)
+ integer i,j,inc
+ real v
+
+ inc=1
+1 inc=3*inc+1
+ if(inc.le.n) go to 1
+2 inc=inc/3
+
+ do i=inc+1,n
+ v=a(i)
+ j=i
+3 if(a(j-inc).gt.v) then
+ a(j)=a(j-inc)
+ j=j-inc
+ if(j.le.inc) go to 4
+ go to 3
+ endif
+4 a(j)=v
+ enddo
+
+ if(inc.gt.1) go to 2
+
+ return
+end subroutine shell
|
