Fixed errors introduced by few previous API changes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569358 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46b2ce2ee0
commit
c12ae52424
|
@ -61,7 +61,7 @@ public abstract class AbstractCurveFitter {
|
|||
*/
|
||||
public double[] fit(Collection<WeightedObservedPoint> points) {
|
||||
// Perform the fit.
|
||||
return getOptimizer().optimize(getProblem(points)).getPoint();
|
||||
return getOptimizer().optimize(getProblem(points)).getPoint().toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -178,8 +178,7 @@ public class GaussianCurveFitter extends AbstractCurveFitter
|
|||
start(startPoint).
|
||||
target(target).
|
||||
weight(new DiagonalMatrix(weights)).
|
||||
model(model.getModelFunction()).
|
||||
jacobian(model.getModelFunctionJacobian()).
|
||||
model(model.getModelFunction(), model.getModelFunctionJacobian()).
|
||||
build();
|
||||
|
||||
}
|
||||
|
|
|
@ -131,8 +131,7 @@ public class HarmonicCurveFitter extends AbstractCurveFitter
|
|||
start(startPoint).
|
||||
target(target).
|
||||
weight(new DiagonalMatrix(weights)).
|
||||
model(model.getModelFunction()).
|
||||
jacobian(model.getModelFunctionJacobian()).
|
||||
model(model.getModelFunction(), model.getModelFunctionJacobian()).
|
||||
build();
|
||||
|
||||
}
|
||||
|
|
|
@ -120,8 +120,7 @@ public class PolynomialCurveFitter extends AbstractCurveFitter
|
|||
start(initialGuess).
|
||||
target(target).
|
||||
weight(new DiagonalMatrix(weights)).
|
||||
model(model.getModelFunction()).
|
||||
jacobian(model.getModelFunctionJacobian()).
|
||||
model(model.getModelFunction(), model.getModelFunctionJacobian()).
|
||||
build();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue