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) {
|
public double[] fit(Collection<WeightedObservedPoint> points) {
|
||||||
// Perform the fit.
|
// 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).
|
start(startPoint).
|
||||||
target(target).
|
target(target).
|
||||||
weight(new DiagonalMatrix(weights)).
|
weight(new DiagonalMatrix(weights)).
|
||||||
model(model.getModelFunction()).
|
model(model.getModelFunction(), model.getModelFunctionJacobian()).
|
||||||
jacobian(model.getModelFunctionJacobian()).
|
|
||||||
build();
|
build();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,8 +131,7 @@ public class HarmonicCurveFitter extends AbstractCurveFitter
|
||||||
start(startPoint).
|
start(startPoint).
|
||||||
target(target).
|
target(target).
|
||||||
weight(new DiagonalMatrix(weights)).
|
weight(new DiagonalMatrix(weights)).
|
||||||
model(model.getModelFunction()).
|
model(model.getModelFunction(), model.getModelFunctionJacobian()).
|
||||||
jacobian(model.getModelFunctionJacobian()).
|
|
||||||
build();
|
build();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,8 +120,7 @@ public class PolynomialCurveFitter extends AbstractCurveFitter
|
||||||
start(initialGuess).
|
start(initialGuess).
|
||||||
target(target).
|
target(target).
|
||||||
weight(new DiagonalMatrix(weights)).
|
weight(new DiagonalMatrix(weights)).
|
||||||
model(model.getModelFunction()).
|
model(model.getModelFunction(), model.getModelFunctionJacobian()).
|
||||||
jacobian(model.getModelFunctionJacobian()).
|
|
||||||
build();
|
build();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue