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:
Luc Maisonobe 2014-02-18 14:33:20 +00:00
parent 46b2ce2ee0
commit c12ae52424
4 changed files with 4 additions and 7 deletions

View File

@ -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();
}
/**

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}