diff --git a/src/main/java/org/apache/commons/math3/analysis/differentiation/SparseGradient.java b/src/main/java/org/apache/commons/math3/analysis/differentiation/SparseGradient.java index 645884aad..ccffe46ab 100644 --- a/src/main/java/org/apache/commons/math3/analysis/differentiation/SparseGradient.java +++ b/src/main/java/org/apache/commons/math3/analysis/differentiation/SparseGradient.java @@ -235,7 +235,7 @@ public class SparseGradient implements RealFieldElement, Seriali *

* @param a instance to multiply */ - public void multInPlace(final SparseGradient a) { + public void multiplyInPlace(final SparseGradient a) { // Derivatives. for (Map.Entry entry : derivatives.entrySet()) { derivatives.put(entry.getKey(), a.value * entry.getValue()); @@ -872,7 +872,7 @@ public class SparseGradient implements RealFieldElement, Seriali */ @Override public int hashCode() { - return 743 + 809 * + 233 * MathUtils.hash(value) + 167 * derivatives.hashCode(); + return 743 + 809 * MathUtils.hash(value) + 167 * derivatives.hashCode(); } } diff --git a/src/test/java/org/apache/commons/math3/analysis/differentiation/SparseGradientTest.java b/src/test/java/org/apache/commons/math3/analysis/differentiation/SparseGradientTest.java index 8fa168330..559da879f 100644 --- a/src/test/java/org/apache/commons/math3/analysis/differentiation/SparseGradientTest.java +++ b/src/test/java/org/apache/commons/math3/analysis/differentiation/SparseGradientTest.java @@ -126,7 +126,7 @@ public class SparseGradientTest extends ExtendedFieldElementAbstractTest