Skip navigation links
finMath lib documentation

Package net.finmath.optimizer

This package provides classes with numerical algorithm for optimization of an objective function and a factory to easy construction of the optimizers.

See: Description

Package net.finmath.optimizer Description

This package provides classes with numerical algorithm for optimization of an objective function and a factory to easy construction of the optimizers.

Why a package for optimization algorithms?

Given that there are a variety of numerical libraries featuring optimization algorithms (e.g., Apache Commons Math), why do we provide a package inside finmath lib? This packages provides a unified interface for passing optimizers to other classes via an OptimizationFactoryInterface and an OptimizerInterface and an OptimizerInterface.ObjectiveFunction. This allows use of different optimization frameworks without bothering with the framework specific constructors and framework specific definitions of objective functions.

A class implementing the OptimizationFactoryInterface allows the specification of parameters specific to the optimizer, but leave the specification of the initial values and the objective function still open. It provides a factory method which takes the objective function and initial values as parameters and constructs the specific optimizer by returning an object implementing OptimizerInterface.

Example

The following code is an example of an optimization problem using an OptimizerFactoryInterface as argument.

        public void testOptimizerWithRosenbrockFunction(OptimizerFactoryInterface optimizerFactory) throws SolverException {
                OptimizerInterface.ObjectiveFunction objectiveFunction = new OptimizerInterface.ObjectiveFunction() {
Skip navigation links
Copyright © 2017 Christian P. Fries.

Copyright © 2017. All rights reserved.