Skip to content

Commit

Permalink
MATH-1382: Unnecessary copying.
Browse files Browse the repository at this point in the history
Thanks to Stefan Bunk for the report and fix.
Closes #42
  • Loading branch information
Gilles committed May 1, 2017
1 parent b645f5d commit dff1a09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/changes/changes.xml
Expand Up @@ -54,6 +54,10 @@ If the output is not quite correct, check for invisible trailing spaces!
</release>

<release version="4.0" date="XXXX-XX-XX" description="">
<action dev="erans" type="fix" issue="MATH-1382" due-to="Stefan Bunk">
"MultivariateNormalDistribution": performance improvement (by
removing unnecessary copying).
</action>
<action dev="erans" type="fix" issue="MATH-1405" due-to="Daniil Finkel">
"KolmogorovSmirnovTest": bug in "fixTies".
</action>
Expand Down
Expand Up @@ -211,7 +211,7 @@ public double[] sample() {
private double getExponentTerm(final double[] values) {
final double[] centered = new double[values.length];
for (int i = 0; i < centered.length; i++) {
centered[i] = values[i] - getMeans()[i];
centered[i] = values[i] - means[i];
}
final double[] preMultiplied = covarianceMatrixInverse.preMultiply(centered);
double sum = 0;
Expand Down

0 comments on commit dff1a09

Please sign in to comment.