bracketing.m

From Spinach Documentation Wiki
Revision as of 21:03, 22 February 2026 by Kuprov (talk | contribs) (Create documentation page from Spinach function header)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Expands a trial step into a bracket that contains an acceptable line search point, or accepts the step directly if the Wolfe tests are met before sectioning becomes necessary.

Syntax

       [A,B,alpha,fx,gfx,next_act,data]=...
                   bracketing(cost_function,alpha,dir,x_0,fx_0,...
                              gfx_0,data,spin_system)

Arguments

       cost_function     - objective function handle
       alpha             - initial trial step length
       dir               - search direction vector
       x_0               - current optimisation vector
       fx_0              - objective value at x_0
       gfx_0             - gradient at x_0
       data              - optimisation workspace structure
       spin_system       - Spinach data structure with
                           line search settings
    Returns:
       A                 - lower bracket point structure
       B                 - upper bracket point structure
       alpha             - accepted step length when found
       fx                - objective value at accepted step
       gfx               - gradient at accepted step
       next_act          - continuation tag, either
                           'sectioning' or 'none'
       data              - updated optimisation workspace

Outputs

    this function produces output as described in source code

Examples

See examples in the Spinach distribution relevant to this function.

Notes

This page was generated from the function header in the Spinach repository.

See also

Main_Page

Version 2.11, authors: David Goodwin, Ilya Kuprov