17 matrix =
new double *[n];
19 for (i = 0; i < n; i++)
21 matrix[i] =
new double[n];
24 for (i = 0; i < n; i++)
26 for (j = 0; j < n; j++)
28 matrix[i][j] = in_matrix[i][j];
32 for (k = 0; k < n; k++)
34 if (matrix[k][k] == 0)
38 for (j = k; j < n; j++)
40 if (matrix[j][k] != 0)
48 for (i = k; i < n; i++)
50 std::swap (matrix[i][j], matrix[i][k]);
60 for (i = k+1; i < n; i++)
62 for (j = k+1; j < n; j++)
64 matrix[i][j] = matrix[i][j] - matrix[i][k]*matrix[k][j]/matrix[k][k];
double determinant(double **in_matrix, int n)