diff --git a/test/sampling_correlation_matrices_test.cpp b/test/sampling_correlation_matrices_test.cpp index a17c36ce6..a009175db 100644 --- a/test/sampling_correlation_matrices_test.cpp +++ b/test/sampling_correlation_matrices_test.cpp @@ -38,17 +38,17 @@ MT rebuildMatrix(const VT &xvector, const unsigned int n){ template Eigen::Matrix getCoefficientsFromMatrix(const MT& mat) { - int n = mat.rows(); - int d = n * (n - 1) / 2; - Eigen::Matrix coeffs(d); - int k = 0; - for (int i = 0; i < n; ++i) { - for (int j = 0; j < i; ++j) { - coeffs(k) = mat(i, j); - ++k; + int n = mat.rows(); + int d = n * (n - 1) / 2; + Eigen::Matrix coeffs(d); + int k = 0; + for (int i = 0; i < n; ++i) { + for (int j = 0; j < i; ++j) { + coeffs(k) = mat(i, j); + ++k; } - } - return coeffs; + } + return coeffs; } template