public InvertibleMatrix inverse() throws MatrixException
    {
        InvertibleMatrix inverse  = new InvertibleMatrix(nRows);
        IdentityMatrix   identity = new IdentityMatrix(nRows);

        // Compute each column of the inverse matrix
        // using columns of the identity matrix.
        for (int c = 0; c < nCols; ++c) {
            ColumnVector col = solve(identity.getColumn(c), true);
            inverse.setColumn(col, c);
        }

        return inverse;
    }
public InvertibleMatrix inverse ( ) throws MatrixException { InvertibleMatrix inverse = new InvertibleMatrix ( nRows ) ; IdentityMatrix identity = new IdentityMatrix ( nRows ) ; for ( int c = 0 ; c < nCols ; ++ c ) { ColumnVector col = solve ( identity . getColumn ( c ) , true ) ; inverse . setColumn ( col , c ) ; } return inverse ; }
Compute the inverse of this matrix.
@return the inverse matrix
@throws matrix.MatrixException if an error occurred