行列式值计算
摘要:
int x, y; int exGCD(int a, int b) { if (0 == b) { x = 1; y = 0; return a; } int r = exGCD(b, a % b); int t = x; x = y; y = t - a / b * y; return r; } int det(int n) { // n: n行n列 int ans = 1; boolean flag = true; // 行交换次数奇偶 for (int i = 0, j, k; i < n; ++i) { if (0 == C[i][i]) { ... 阅读全文
posted @ 2013-04-01 18:56 Sure_Yi 阅读(302) 评论(0) 推荐(0) 编辑