public static void matrix_setRowVec(KrdLab.clapack.Complex[,] matA, int row, KrdLab.clapack.Complex[] rowVec) { System.Diagnostics.Debug.Assert(matA.GetLength(1) == rowVec.Length); for (int j = 0; j < matA.GetLength(1); j++) { matA[row, j] = rowVec[j]; } }
// 行列の行ベクトルを抜き出す public static KrdLab.clapack.Complex[] matrix_GetRowVec(KrdLab.clapack.Complex[,] matA, int row) { KrdLab.clapack.Complex[] rowVec = new KrdLab.clapack.Complex[matA.GetLength(1)]; for (int j = 0; j < matA.GetLength(1); j++) { rowVec[j] = matA[row, j]; } return rowVec; }