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 .