public InvertibleMatrix inverse ( ) throws MatrixException { final InvertibleMatrix inverse = new InvertibleMatrix ( m_nRows ) ; final IdentityMatrix identity = new IdentityMatrix ( m_nRows ) ; // Compute each column of the inverse matrix // using columns of the identity matrix. for ( int c = 0 ; c < m_nCols ; ++ c ) { final ColumnVector col = solve ( identity . getColumn ( c ) , true ) ; inverse . setColumn ( col , c ) ; } return inverse ; }
Compute the inverse of this matrix .