/***************************************************************************/ /* */ /* Algorithm 51: ADJUST INVERSE OF A MATRIX WHEN AN ELEMENT IS DISTURBED */ /* */ /* John R. Herndon, Stanford Research Institute, Menlo Park, California. */ /* */ /***************************************************************************/ /* Translated to PL/I by R. Vowels. 4 February 2006. */ /* If the n x n matrix A = M**-1 and a change, d, is made */ /* in the i, j-th element of M, this procedure will calculate the */ /* corrected matrix for M**-1 by adjusting matrix A. The adjusted */ /* matrix is stored in B. */ ADJUST: procedure (d, i, j, A, B) options(reorder); declare (i, j) fixed binary, (d, A(*,*), B(*,*)) float (18); declare (r, s) fixed binary, t float (18); t = d/(A(i,j)*d+1); do r = lbound(A,1) to hbound(A,1); do s = lbound(A,1) to hbound(A,1); B(r,s) = A(r,s) - t * A(r,i)*A(j,s); end; end; end ADJUST;