Method: Matrix#inverse
- Defined in:
- lib/matrix.rb
#inverse ⇒ Object Also known as: inv
Returns the inverse of the matrix.
Matrix[[-1, -1], [0, -1]].inverse
# => -1 1
# 0 -1
1177 1178 1179 1180 |
# File 'lib/matrix.rb', line 1177 def inverse raise ErrDimensionMismatch unless square? self.class.I(row_count).send(:inverse_from, self) end |