code: public static void rank1Update(double gamma,
                                     DMatrixRMaj A ,
                                     DMatrixRMaj u , DMatrixRMaj w ,
                                     DMatrixRMaj B )
      {
          int n = u.getNumElements();
  
          int matrixIndex = 0;
          for( int i = 0; i < n; i++ ) {
              double elementU = u.data[i];
  
              for( int j = 0; j < n; j++ , matrixIndex++) {
                  B.data[matrixIndex] = A.data[matrixIndex] + gamma*elementU*w.data[j];
              }
          }
      }
docs: <p>
  Performs a rank one update on matrix A using vectors u and w.  The results are stored in B.<br>
  <br>
  B = A + &gamma; u w<sup>T</sup><br>
  </p>
  <p>
  This is called a rank1 update because the matrix u w<sup>T</sup> has a rank of 1.  Both A and B
  can be the same matrix instance, but there is a special rank1Update for that.
  </p>
  
  @param gamma A scalar.
  @param A A m by m matrix. Not modified.
  @param u A vector with m elements.  Not modified.
  @param w A vector with m elements.  Not modified.
  @param B A m by m matrix where the results are stored. Modified.