code: public static void solveL( double L[] , double []b , int n )
      {
  //        for( int i = 0; i < n; i++ ) {
  //            double sum = b[i];
  //            for( int k=0; k<i; k++ ) {
  //                sum -= L[i*n+k]* b[k];
  //            }
  //            b[i] = sum / L[i*n+i];
  //        }
          for( int i = 0; i < n; i++ ) {
              double sum = b[i];
              int indexL = i*n;
              for( int k=0; k<i; k++ ) {
                  sum -= L[indexL++]* b[k];
              }
              b[i] = sum / L[indexL];
          }
      }
docs: <p>
  Solves for non-singular lower triangular matrices using forward substitution.
  <br>
  b = L<sup>-1</sup>b<br>
  <br>
  where b is a vector, L is an n by n matrix.<br>
  </p>
  
  @param L An n by n non-singular lower triangular matrix. Not modified.
  @param b A vector of length n. Modified.
  @param n The size of the matrices.