OELineMinimize

Attention

This API is currently available in C++ and Python.

class OELineMinimize

The OELineMinimize class is a base class which defines the interface for line minimization used in different types of optimization.

The OELineMinimize class defines the following public methods:
The following classes derive from this class:

operator()

__call__(n: int, p: OEDoubleArray, d: OEDoubleArray,
         g: OEDoubleArray, k: OEDoubleArray, gmin: OEDoubleArray,
         alpha: OEDoubleArray, fun: OEFunc1) -> bool

Defines the interface for finding the step size alpha for the current optimizer iteration in the search direction determined by the vector d. n is the number of optimized variables, array p and g contain initial coordinates and gradients, while array k returns gradients for the coordinates determined by the returned step size alpha. gmin contains the initial function value and returns its optimized value, and fun is a reference to optimized function object. Operator returns true when a value lower than the initial function value is found, false otherwise.

SetMaxStep

SetMaxStep(arg2: int, arg3: OEDoubleArray) -> bool

Defines the interface for determination of the maximum step size. This method has a trivial implementation in the base class, and provides a way to determine the maximum step if the specific line optimization derived from OELineMinimize needs it.

CreateCopy

CreateCopy() -> OELineMinimize

Defines the interface for creating a copy of line minimization object.