private static SymmetricMatrix <T> GenerateSymmetric <T>(Matrix <T> matrix1, Matrix <T> matrix2) { var matrix = new List <T>(); int count = 1; for (int k = 0; k < matrix1.Size; k++) { for (int m = 0; m < count; m++) { dynamic temp1 = matrix1[k, m], temp2 = matrix2[k, m]; matrix.Add(temp1 + temp2); } count++; } var symmetric = new SymmetricMatrix <T>(matrix1.Size); symmetric.AddCustomMatrix(matrix.ToArray()); return(symmetric); }