public static NMatrix Cofactors(NMatrix matrix) { NMatrix minors = NMatrix.Minors(matrix); for (int i = 0; i < matrix.Rows; i++) { for (int j = 0; j < matrix.Columns; j++) { minors.Data[i, j] *= (Tools.Validators.IsEven(i + j)) ? 1 : -1; } } return(minors);// Now holds cofactors }
public IMatrix MinorsMatrix() { return(NMatrix.Minors(this)); }
public NMatrix Minors() { return(NMatrix.Minors(this)); }