clvcooke / MatrixMath

A from scratch implementation of basic matrix manipulation and operations in C++
0 stars 2 forks source link

Cofactor matrix impl #4

Open clvcooke opened 9 years ago

clvcooke commented 9 years ago

Add a function to the Matrix class which returns its cofactor Matrix for a given row or column. Assume that if the function is called with invalid parameters than the Zero Matrix is returned instead.

ericye16 commented 9 years ago

Should this and determinant be combined maybe? It'd be easy/interesting/nice?? to implement them recursively calling each other.

RowanFerrabee commented 9 years ago

I just finished writing the cofactor matrix function. It employs the determinant matrix of course but it's not recursive

clvcooke commented 9 years ago

It probably is recursive if its working, just not directly (more like cof calls det calls cof calls det....), as you need the determinant to get a cofactor matrix, and the cofactor matrix to get a determinant.