private void init(Func<double[], double> func, int variables,
int order, double stepSize)
{
this.Function = func;
this.parameters = variables;
this.stepSizes = new double[variables];
this.orders = new int[variables];
this.pointCount = 3;
this.coefficients = CreateCoefficients(3);
for (int i = 0; i < stepSizes.Length; i++)
stepSizes[i] = stepSize;
for (int i = 0; i < orders.Length; i++)
orders[i] = order;
}