// Scale each eigenvector by the square root of its eigenvalue.
for (int row = 0; row < dim; row++) {
final double factor = FastMath.sqrt(covMatEigenvalues[row]);
for (int col = 0; col < dim; col++) {
tmpMatrix.multiplyEntry(row, col, factor);
}
}
samplingMatrix = covMatEigenvectors.multiply(tmpMatrix);
}