MCPcopy Create free account
hub / github.com/E869120/math-algorithm-book / copyMatrix

Method copyMatrix

editorial/chap4-7/prob4-7-3.java:19–28  ·  view source on GitHub ↗
(long[][] A)

Source from the content-addressed store, hash-verified

17 }
18 static final int MOD = 1000000007;
19 static long[][] copyMatrix(long[][] A) {
20 // 行列のコピー(そのまま「M = A;」とコピーすると、参照がコピーされるだけなので注意)
21 long[][] M = new long[3][3];
22 for (int i = 0; i < 3; i++) {
23 for (int j = 0; j < 3; j++) {
24 M[i][j] = A[i][j];
25 }
26 }
27 return M;
28 }
29 static long[][] multiplication(long[][] A, long[][] B) {
30 // 2×2 行列 A, B の積を返す関数
31 long[][] C = new long[3][3];

Callers 2

mainMethod · 0.95
powerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected