diff options
| author | Pjotr Prins | 2025-11-23 12:44:20 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2025-11-23 12:44:20 +0100 |
| commit | ff196955e3ca5bdd671a44f852f42323d3828be2 (patch) | |
| tree | 1a1a12dea794dff9df5f4ca991740cbaf48c992a /src/mathfunc.cpp | |
| parent | 663778957ad37d5c7806d4f17c1f2e77b2b268fa (diff) | |
| download | pangemma-ff196955e3ca5bdd671a44f852f42323d3828be2.tar.gz | |
Adding comments
Diffstat (limited to 'src/mathfunc.cpp')
| -rw-r--r-- | src/mathfunc.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); |
