code: public static void tridiagUpperRow( final int blockLength ,
                                          final DSubmatrixD1 A ,
                                          final double gammas[] ,
                                          final DSubmatrixD1 V )
      {
          int blockHeight = Math.min(blockLength,A.row1-A.row0);
          if( blockHeight <= 1 )
              return;
          int width = A.col1-A.col0;
          int num = Math.min(width-1,blockHeight);
          int applyIndex = Math.min(width,blockHeight);
  
          // step through rows in the block
          for( int i = 0; i < num; i++ ) {
              // compute the new reflector and save it in a row in 'A'
              computeHouseHolderRow(blockLength,A,gammas,i);
              double gamma = gammas[A.row0+i];
  
              // compute y
              computeY(blockLength,A,V,i,gamma);
  
              // compute v from y
              computeRowOfV(blockLength,A,V,i,gamma);
  
              // Apply the reflectors to the next row in 'A' only
              if( i+1 < applyIndex ) {
                  applyReflectorsToRow( blockLength , A , V , i+1 );
              }
          }
      }
docs: <p>
  Performs a tridiagonal decomposition on the upper row only.
  </p>
  
  <p>
  For each row 'a' in 'A':
  Compute 'u' the householder reflector.
  y(:) = A*u
  v(i) = y - (1/2)*(y^T*u)*u
  a(i+1) = a(i) - u*&gamma;*v^T - v*u^t
  </p>
  
  @param blockLength Size of a block
  @param A is the row block being decomposed.  Modified.
  @param gammas Householder gammas.
  @param V Where computed 'v' are stored in a row block.  Modified.