New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cofactor and first_minor methods for the Matrix class #568

Closed
wants to merge 9 commits into
base: trunk
from

improve cofactor's comment

  • Loading branch information...
gogotanaka committed Mar 17, 2014
commit e4529b5beb65c61f31f3a6e246c6113efeb055f8
View
@@ -621,7 +621,8 @@ def first_minor(row, column)
end
#
# Returns a (row, column) cofactor which is obtained by multiplying the first minor by (-1)**(row + column).
# Returns the (row, column) cofactor which is obtained by multiplying
# the first minor by (-1)**(row + column).
#
# Matrix.diagonal(9, 5, -3, 4).cofactor(1, 1)
# => -108
ProTip! Use n and p to navigate between commits in a pull request.