* @return value of the fitted parameters
*/
public LeastSquareResults solve(final DoubleMatrix1D observedValues, final Function1D<DoubleMatrix1D, DoubleMatrix1D> func, final DoubleMatrix1D startPos, final DoubleMatrix2D penalty) {
final int n = observedValues.getNumberOfElements();
final VectorFieldFirstOrderDifferentiator jac = new VectorFieldFirstOrderDifferentiator();
return solve(observedValues, new DoubleMatrix1D(n, 1.0), func, jac.differentiate(func), startPos, penalty);
}
/**
* Use this when the model is given as a function of its parameters only (i.e. a function that takes a set of parameters and return a set of model values,
* so the measurement points are already known to the function), and analytic parameter sensitivity is not available