Add some basic letsimp tests based on bug #3950
[maxima.git] / share / colnew / fortran / shiftb.f
blob7826c6e9f17eae1d62870fce8e529f8f59d32192
1 SUBROUTINE SHIFTB (AI, NROWI, NCOLI, LAST, AI1, NROWI1, NCOLI1)
3 C*********************************************************************
5 C shifts the rows in current block, ai, not used as pivot rows, if
6 C any, i.e., rows (last+1),..., (nrowi), onto the first mmax =
7 C = nrow-last rows of the next block, ai1, with column last+j of
8 C ai going to column j , j=1,...,jmax=ncoli-last. the remaining
9 C columns of these rows of ai1 are zeroed out.
11 C picture
13 C original situation after results in a new block i+1
14 C last = 2 columns have been created and ready to be
15 C done in factrb (assuming no factored by next factrb
16 C interchanges of rows) call.
17 C 1
18 C x x 1x x x x x x x x
19 C 1
20 C 0 x 1x x x 0 x x x x
21 C block i 1 ---------------
22 C nrowi = 4 0 0 1x x x 0 0 1x x x 0 01
23 C ncoli = 5 1 1 1
24 C last = 2 0 0 1x x x 0 0 1x x x 0 01
25 C ------------------------------- 1 1 new
26 C 1x x x x x 1x x x x x1 block
27 C 1 1 1 i+1
28 C block i+1 1x x x x x 1x x x x x1
29 C nrowi1= 5 1 1 1
30 C ncoli1= 5 1x x x x x 1x x x x x1
31 C ------------------------------- 1-------------1
32 C 1
34 C*********************************************************************
36 INTEGER LAST, J,JMAX,JMAXP1,M,MMAX
37 DOUBLE PRECISION AI(NROWI,NCOLI),AI1(NROWI1,NCOLI1)
38 MMAX = NROWI - LAST
39 JMAX = NCOLI - LAST
40 IF (MMAX .LT. 1 .OR. JMAX .LT. 1) RETURN
42 C... put the remainder of block i into ai1
44 DO 10 J=1,JMAX
45 DO 10 M=1,MMAX
46 10 AI1(M,J) = AI(LAST+M,LAST+J)
47 IF (JMAX .EQ. NCOLI1) RETURN
49 C... zero out the upper right corner of ai1
51 JMAXP1 = JMAX + 1
52 DO 20 J=JMAXP1,NCOLI1
53 DO 20 M=1,MMAX
54 20 AI1(M,J) = 0.D0
55 RETURN
56 END