gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
shiftb.f
Go to the documentation of this file.
1  subroutine shiftb ( ai, ipivot, nrowi, ncoli, last,
2  & ai1, nrowi1, ncoli1 )
3 
4 c*********************************************************************72
5 c
6 cc SHIFTB shifts the rows in the current block.
7 c
8 c shifts the rows in current block, ai, not used as pivot rows, if
9 c any, i.e., rows ipivot(last+1),...,ipivot(nrowi), onto the first
10 c mmax = nrow-last rows of the next block, ai1, with column last+j of
11 c ai going to column j , j=1,...,jmax=ncoli-last. the remaining col-
12 c umns of these rows of ai1 are zeroed out.
13 c
14 c picture
15 c
16 c original situation after results in a new block i+1
17 c last = 2 columns have been created and ready to be
18 c done in factrb (assuming no factored by next factrb call.
19 c interchanges of rows)
20 c 1
21 c x x 1x x x x x x x x
22 c 1
23 c 0 x 1x x x 0 x x x x
24 c block i 1 ---------------
25 c nrowi = 4 0 0 1x x x 0 0 1x x x 0 01
26 c ncoli = 5 1 1 1
27 c last = 2 0 0 1x x x 0 0 1x x x 0 01
28 c ------------------------------- 1 1 new
29 c 1x x x x x 1x x x x x1 block
30 c 1 1 1 i+1
31 c block i+1 1x x x x x 1x x x x x1
32 c nrowi1= 5 1 1 1
33 c ncoli1= 5 1x x x x x 1x x x x x1
34 c ------------------------------- 1-------------1
35 c 1
36 c
37  implicit none
38 
39  integer ncoli
40  integer ncoli1
41  integer nrowi
42  integer nrowi1
43 
44  integer ipivot(nrowi),last, ip,j,jmax,jmaxp1,m,mmax
45  double precision ai(nrowi,ncoli),ai1(nrowi1,ncoli1)
46 
47  mmax = nrowi - last
48  jmax = ncoli - last
49  if (mmax .lt. 1 .or. jmax .lt. 1) return
50 c put the remainder of block i into ai1
51  do 10 m=1,mmax
52  ip = ipivot(last+m)
53  do 10 j=1,jmax
54  10 ai1(m,j) = ai(ip,last+j)
55  if (jmax .eq. ncoli1) return
56 c zero out the upper right corner of ai1
57  jmaxp1 = jmax + 1
58  do 20 j=jmaxp1,ncoli1
59  do 20 m=1,mmax
60  20 ai1(m,j) = 0.0d+00
61  return
62  end
subroutine shiftb(ai, ipivot, nrowi, ncoli, last, ai1, nrowi1, ncoli1)
Definition: shiftb.f:3
gtkIOStream: /tmp/gtkiostream/src/deBoor/shiftb.f Source File
GTK+ IOStream  Beta