Created
March 9, 2015 20:41
-
-
Save zmallen/89f3d26f72ed1e6b5700 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int determinant(int row, int col, int size) { | |
int sum = 0; | |
if(size == 1) { | |
return this.data[0][0]; | |
} | |
else if (size == 2) { | |
return (this.data[row][col] * this.data[row+1][col+1]) - (this.data[row][col+1] * this.data[row+1][col]); | |
} else { | |
return determinant(row+1,col+1,size); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment