From d48f623281e3ecb37c8a68aa226e5c9f65fc78d8 Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Fri, 17 Aug 2012 07:15:05 +0000 Subject: [PATCH] Changed parameters name for consistency with getters and DSCompiler. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1374161 13f79535-47bb-0310-9956-ffa450edef68 --- .../differentiation/DerivativeStructure.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java b/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java index d11543bf1..c7023dafb 100644 --- a/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java +++ b/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java @@ -70,21 +70,22 @@ public class DerivativeStructure implements FieldElement, S } /** Build an instance with all values and derivatives set to 0. - * @param variables number of variables + * @param parameters number of free parameters * @param order derivation order */ - public DerivativeStructure(final int variables, final int order) { - this(DSCompiler.getCompiler(variables, order)); + public DerivativeStructure(final int parameters, final int order) { + this(DSCompiler.getCompiler(parameters, order)); } /** Build an instance representing a constant value. - * @param variables number of variables + * @param parameters number of free parameters + * @param parameters number of variables * @param order derivation order * @param value value of the constant * @see #DerivativeStructure(int, int, int, double) */ - public DerivativeStructure(final int variables, final int order, final double value) { - this(variables, order); + public DerivativeStructure(final int parameters, final int order, final double value) { + this(parameters, order); this.data[0] = value; } @@ -93,20 +94,20 @@ public class DerivativeStructure implements FieldElement, S * to be the free variables with respect to which differentials * are computed. As such, their differential with respect to * themselves is +1.

- * @param variables number of variables + * @param parameters number of free parameters * @param order derivation order * @param index index of the variable (from 0 to {@code variables - 1}) * @param value value of the variable * @exception NumberIsTooLargeException if index is equal to variables or larger * @see #DerivativeStructure(int, int, double) */ - public DerivativeStructure(final int variables, final int order, + public DerivativeStructure(final int parameters, final int order, final int index, final double value) throws NumberIsTooLargeException { - this(variables, order, value); + this(parameters, order, value); - if (index >= variables) { - throw new NumberIsTooLargeException(index, variables, false); + if (index >= parameters) { + throw new NumberIsTooLargeException(index, parameters, false); } if (order > 0) {