Clean up LeastSquaresProblemImpl

Reorder constructor parameters to match LeastSquaresFactory and remove an unused
method.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569345 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2014-02-18 14:31:59 +00:00
parent 06d490a4bd
commit 4158f97463
2 changed files with 11 additions and 20 deletions

View File

@ -43,13 +43,13 @@ public class LeastSquaresFactory {
final int maxEvaluations,
final int maxIterations) {
return new LeastSquaresProblemImpl(
maxEvaluations,
maxIterations,
checker,
observed,
model,
jacobian,
start
observed,
start,
checker,
maxEvaluations,
maxIterations
);
}

View File

@ -45,13 +45,13 @@ class LeastSquaresProblemImpl
/** Initial guess. */
private double[] start;
LeastSquaresProblemImpl(final int maxEvaluations,
final int maxIterations,
final ConvergenceChecker<PointVectorValuePair> checker,
final double[] target,
final MultivariateVectorFunction model,
LeastSquaresProblemImpl(final MultivariateVectorFunction model,
final MultivariateMatrixFunction jacobian,
final double[] start) {
final double[] target,
final double[] start,
final ConvergenceChecker<PointVectorValuePair> checker,
final int maxEvaluations,
final int maxIterations) {
super(maxEvaluations, maxIterations, checker);
this.target = target;
this.model = model;
@ -67,15 +67,6 @@ class LeastSquaresProblemImpl
return start.length;
}
/**
* Gets the target values.
*
* @return the target values.
*/
public double[] getTarget() {
return target == null ? null : target.clone();
}
public double[] getStart() {
return start == null ? null : start.clone();
}