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

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

    return x;
  }
private ColumnVector _backSubstitution (final ColumnVector y) throws MatrixException
  {
    final ColumnVector x = new ColumnVector (m_nRows);

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

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

@param y
the column vector y
@return the solution column vector x
@throws MatrixException
if an error occurred
Solve Ux = y for x by back substitution .