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:
parent
06d490a4bd
commit
4158f97463
|
@ -43,13 +43,13 @@ public class LeastSquaresFactory {
|
||||||
final int maxEvaluations,
|
final int maxEvaluations,
|
||||||
final int maxIterations) {
|
final int maxIterations) {
|
||||||
return new LeastSquaresProblemImpl(
|
return new LeastSquaresProblemImpl(
|
||||||
maxEvaluations,
|
|
||||||
maxIterations,
|
|
||||||
checker,
|
|
||||||
observed,
|
|
||||||
model,
|
model,
|
||||||
jacobian,
|
jacobian,
|
||||||
start
|
observed,
|
||||||
|
start,
|
||||||
|
checker,
|
||||||
|
maxEvaluations,
|
||||||
|
maxIterations
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,13 +45,13 @@ class LeastSquaresProblemImpl
|
||||||
/** Initial guess. */
|
/** Initial guess. */
|
||||||
private double[] start;
|
private double[] start;
|
||||||
|
|
||||||
LeastSquaresProblemImpl(final int maxEvaluations,
|
LeastSquaresProblemImpl(final MultivariateVectorFunction model,
|
||||||
final int maxIterations,
|
|
||||||
final ConvergenceChecker<PointVectorValuePair> checker,
|
|
||||||
final double[] target,
|
|
||||||
final MultivariateVectorFunction model,
|
|
||||||
final MultivariateMatrixFunction jacobian,
|
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);
|
super(maxEvaluations, maxIterations, checker);
|
||||||
this.target = target;
|
this.target = target;
|
||||||
this.model = model;
|
this.model = model;
|
||||||
|
@ -67,15 +67,6 @@ class LeastSquaresProblemImpl
|
||||||
return start.length;
|
return start.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the target values.
|
|
||||||
*
|
|
||||||
* @return the target values.
|
|
||||||
*/
|
|
||||||
public double[] getTarget() {
|
|
||||||
return target == null ? null : target.clone();
|
|
||||||
}
|
|
||||||
|
|
||||||
public double[] getStart() {
|
public double[] getStart() {
|
||||||
return start == null ? null : start.clone();
|
return start == null ? null : start.clone();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue