ph-math/src/main/java/com/helger/numbercruncher/matrix/LinearSystem.java
private ColumnVector _forwardSubstitution (final ColumnVector b) throws MatrixException
  {
    final ColumnVector y = new ColumnVector (m_nRows);

    // Do forward substitution.
    for (int r = 0; r < m_nRows; ++r)
    {
      final int pr = m_aPermutation[r]; // permuted row index
      float dot = 0;
      for (int c = 0; c < r; ++c)
      {
        dot += m_aLU.at (pr, c) * y.at (c);
      }
      y.set (r, b.at (pr) - dot);
    }

    return y;
  }
private ColumnVector _forwardSubstitution (final ColumnVector b) throws MatrixException
  {
    final ColumnVector y = new ColumnVector (m_nRows);

    // Do forward substitution.
    for (int r = 0; r < m_nRows; ++r)
    {
      final int pr = m_aPermutation[r]; // permuted row index
      float dot = 0;
      for (int c = 0; c < r; ++c)
      {
        dot += m_aLU.at (pr, c) * y.at (c);
      }
      y.set (r, b.at (pr) - dot);
    }

    return y;
  }
private ColumnVector _forwardSubstitution ( final ColumnVector b ) throws MatrixException { final ColumnVector y = new ColumnVector ( m_nRows ) ; // Do forward substitution. for ( int r = 0 ; r < m_nRows ; ++ r ) { final int pr = m_aPermutation [ r ] ; // permuted row index float dot = 0 ; for ( int c = 0 ; c < r ; ++ c ) { dot += m_aLU . at ( pr , c ) * y . at ( c ) ; } y . set ( r , b . at ( pr ) - dot ) ; } return y ; }
Solve Ly = b for y by forward substitution.

@param b
the column vector b
@return the column vector y
@throws MatrixException
if an error occurred
Solve Ly = b for y by forward substitution .