From ff196955e3ca5bdd671a44f852f42323d3828be2 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 23 Nov 2025 12:44:20 +0100 Subject: Adding comments --- src/mathfunc.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mathfunc.cpp') diff --git a/src/mathfunc.cpp b/src/mathfunc.cpp index 68d17a7..a1c6c29 100644 --- a/src/mathfunc.cpp +++ b/src/mathfunc.cpp @@ -494,6 +494,7 @@ void StandardizeVector(gsl_vector *y) { } // Calculate UtX (U gets transposed) +// CalcUtX transforms a genotype matrix into the eigenspace by computing U^T × X, where U contains the eigenvectors from the kinship matrix decomposition. This transformation diagonalizes the correlation structure induced by relatedness, making subsequent likelihood calculations tractable and efficient. The function overwrites its input with the transformed result, using a temporary copy to avoid data corruption. void CalcUtX(const gsl_matrix *U, gsl_matrix *UtX) { gsl_matrix *X = gsl_matrix_safe_alloc(UtX->size1, UtX->size2); gsl_matrix_safe_memcpy(X, UtX); -- cgit 1.4.1