Example #1
0
        public IObjectiveFunction ToObjectiveFunction()
        {
            (double, Vector <double>, Matrix <double>) Function(Vector <double> point)
            {
                EvaluateAt(point);
                return(Value, Gradient, Hessian);
            }

            var objective = new GradientHessianObjectiveFunction(Function);

            return(objective);
        }
Example #2
0
        public IObjectiveFunction ToObjectiveFunction()
        {
            Func <Vector <double>, Tuple <double, Vector <double>, Matrix <double> > > function = (Vector <double> point) =>
            {
                EvaluateAt(point);

                return(new Tuple <double, Vector <double>, Matrix <double> >(Value, Gradient, Hessian));
            };

            var objective = new GradientHessianObjectiveFunction(function);

            return(objective);
        }