/// <summary>Initializes a new instance of the <see cref="MultivariateFunction"/> class. /// </summary> /// <param name="functionDescriptor">The function descriptor, i.e. the <see cref="QuadraticProgramFunctionFactory"/> object that served as factory for the current object.</param> /// <param name="dimension">The dimension of the feasible region.</param> /// <param name="codomainDimension">The dimension of the codomain, i.e. the objective function is taking values in a subset of R^k where k is the dimension of the codomain.</param> /// <param name="objectiveFunction">The objective function, where the first argument is the point where to evalute, the second argument contains the Jacobian matrix and /// the last argument is the value of the function at the first argument.</param> public MultivariateFunction(MultivariateFunctionFactory functionDescriptor, int dimension, int codomainDimension, Action <double[], double[], double[]> objectiveFunction) { m_Factory = functionDescriptor; Dimension = dimension; CodomainDimension = codomainDimension; m_ObjectiveFunction = objectiveFunction; }
/// <summary>Initializes a new instance of the <see cref="LevenbergMarquardtOptimizer"/> class. /// </summary> /// <param name="abortCondition">The abort (stopping) condition for the Simulated Annealing optimizer.</param> public LevenbergMarquardtOptimizer(LevenbergMarquardtAbortCondition abortCondition) { AbortCondition = abortCondition ?? throw new ArgumentNullException(nameof(abortCondition)); m_Name = new IdentifierString("Levenberg-Marquardt"); m_FunctionDescriptor = new MultivariateFunctionFactory(); m_ConstraintDescriptor = new MultiDimOptimizerConstraintFactory(MultiDimOptimizerConstraintFactory.ConstraintType.Box | MultiDimOptimizerConstraintFactory.ConstraintType.LinearEquation | MultiDimOptimizerConstraintFactory.ConstraintType.LinearInEquation | MultiDimOptimizerConstraintFactory.ConstraintType.None); }