code: public static void solveU( double U[] , double []b ,
                                 int m , int n ,
                                 int strideU , int offsetU , int offsetB )
      {
          for( int j = 0; j < n; j++ ) {
              for( int i = m-1; i >= 0; i-- ) {
                  double sum = b[offsetB + i*n+j];
                  for( int k=i+1; k<m; k++ ) {
                      sum -= U[offsetU + i*strideU+k]* b[offsetB + k*n+j];
                  }
                  b[offsetB + i*n+j] = sum / U[offsetU + i*strideU+i];
              }
          }
      }
docs: <p>
  Solves for non-singular upper triangular matrices using backwards substitution.
  <br>
  B = U<sup>-1</sup>B<br>
  <br>
  where B (m by n) is a matrix, U is a (m by m ) upper triangular matrix.<br>
  </p>
  
  @param U An m by m non-singular upper triangular matrix. Not modified.
  @param b An m by n matrix. Modified.
  @param m size of the L matrix
  @param n number of columns in the B matrix.
  @param offsetU initial index in L where the matrix starts
  @param offsetB initial index in B where the matrix starts