public void 転置チェックランダム版() { int row = 4; int col = 8; var mat = new MatrixLib.Matrix(row, col); var rand = new Random(); for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { mat[i, j] = rand.Next(0, 20); } } var denseMat = new DenseMatrix(row, col); for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { denseMat[i, j] = mat[i, j]; } } Console.WriteLine(mat * mat.Transpose()); Console.WriteLine(denseMat * denseMat.Transpose()); }