public static void rank1UpdateMultL(DMatrixRMaj A , double u[] ,
                                        double gamma ,
                                        int colA0,
                                        int w0 , int w1 )
    {
        for( int i = colA0; i < A.numRows; i++ ) {
            int startIndex = i*A.numCols+w0;
            double sum = 0;
            int rowIndex = startIndex;
            for( int j = w0; j < w1; j++ ) {
                sum += A.data[rowIndex++]*u[j];
            }
            sum = -gamma*sum;

            rowIndex = startIndex;
            for( int j = w0; j < w1; j++ ) {
                A.data[rowIndex++] += sum*u[j];
            }
        }
    }
public static void rank1UpdateMultL ( DMatrixRMaj A , double u [ ] , double gamma , int colA0 , int w0 , int w1 ) { for ( int i = colA0 ; i < A . numRows ; i ++ ) { int startIndex = i * A . numCols + w0 ; double sum = 0 ; int rowIndex = startIndex ; for ( int j = w0 ; j < w1 ; j ++ ) { sum += A . data [ rowIndex ++ ] * u [ j ] ; } sum = - gamma * sum ; rowIndex = startIndex ; for ( int j = w0 ; j < w1 ; j ++ ) { A . data [ rowIndex ++ ] += sum * u [ j ] ; } } }
<p>
Performs a rank-1 update operation on the submatrix specified by w with the multiply on the left.<br>
<br>
A = A(I - &gamma;*u*u<sup>T</sup>)<br>
</p>
<p>
The order that matrix multiplies are performed has been carefully selected
to minimize the number of operations.
</p>

<p>
Before this can become a truly generic operation the submatrix specification needs
to be made more generic.
</p>