ph-math/src/main/java/com/helger/numbercruncher/matrix/InvertibleMatrix.java
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;
  }
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;
  }
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.

@return the inverse matrix
@throws MatrixException
if an error occurred
Compute the inverse of this matrix .