/* Assorted matrix functions. */ /* Multiply r (rows) by c (columns) matrix A on the left * by column vector V of dimension c on the right * to produce a (column) vector Y output of dimension r. */ void mvmpy( r, c, A, V, Y ) int r, c; double *A, *V, *Y; { register double s; double *pA, *pV, *pY; int i, j; pA = A; pY = Y; for( i=0; i e ) e = x; } } return( e ); } /* Unpack symmetric matrix T stored in lower triangular form * into a symmetric n by n square matrix S. */ void tritosquare( n, T, S ) int n; double T[], S[]; { double *pT; int i, j, ni, nj; /* offset to (i,j) element is (j*j+j)/2 + i */ pT = T; ni = 0; for( i=0; i