Skip to content

Commit

Permalink
Sonar fix: Rename variable to not match restricted identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
aherbert committed Jul 1, 2024
1 parent e85a6ca commit d8c648d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ private static void assertSamples(double... alpha) {
final double[][] covars = getCovariance(samples);
final double denom = alpha0 * alpha0 * (alpha0 + 1);
for (int i = 0; i < k; i++) {
final double var = alpha[i] * (alpha0 - alpha[i]) / denom;
Assertions.assertEquals(var, covars[i][i], var * relativeTolerance, "Variance");
final double variance = alpha[i] * (alpha0 - alpha[i]) / denom;
Assertions.assertEquals(variance, covars[i][i], variance * relativeTolerance, "Variance");
for (int j = i + 1; j < k; j++) {
final double covar = -alpha[i] * alpha[j] / denom;
Assertions.assertEquals(covar, covars[i][j], Math.abs(covar) * relativeTolerance, "Covariance");
Expand Down

0 comments on commit d8c648d

Please sign in to comment.