MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / get_cofactor

Method get_cofactor

matrix/matrix_class.py:190–193  ·  view source on GitHub ↗
(self, row: int, column: int)

Source from the content-addressed store, hash-verified

188 return Matrix(values).determinant()
189
190 def get_cofactor(self, row: int, column: int) -> int:
191 if (row + column) % 2 == 0:
192 return self.get_minor(row, column)
193 return -1 * self.get_minor(row, column)
194
195 def minors(self) -> Matrix:
196 return Matrix(

Callers

nothing calls this directly

Calls 1

get_minorMethod · 0.95

Tested by

no test coverage detected