code: private ColumnVector forwardSubstitution(ColumnVector b)
          throws MatrixException
      {
          ColumnVector y = new ColumnVector(nRows);
  
          // Do forward substitution.
          for (int r = 0; r < nRows; ++r) {
              int   pr  = permutation[r];     // permuted row index
              double dot = 0;
              for (int c = 0; c < r; ++c) {
                  dot += LU.at(pr, c)*y.at(c);
              }
              y.set(r, b.at(pr) - dot);
          }
  
          return y;
      }
docs: Solve Ly = b for y by forward substitution.
  @param b the column vector b
  @return the column vector y
  @throws matrix.MatrixException if an error occurred