Difference between revisions of "Bracketing.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Create documentation page from Spinach function header)
 
(sync with Spinach main f053e432: Parameters/Outputs blocks aligned with head header)
 
(4 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
                               gfx_0,data,spin_system)
 
                               gfx_0,data,spin_system)
  
−
==Arguments==
+
==Parameters==
  
−
        cost_function    - objective function handle
+
    cost_function    - objective function handle
−
        alpha            - initial trial step length
+
−
        dir              - search direction vector
+
    alpha            - initial trial step length
−
        x_0              - current optimisation vector
+
−
        fx_0              - objective value at x_0
+
    dir              - search direction vector
−
        gfx_0            - gradient at x_0
+
−
        data              - optimisation workspace structure
+
    x_0              - current optimisation vector
−
        spin_system      - Spinach data structure with
+
−
                            line search settings
+
    fx_0              - objective value at x_0
−
    Returns:
+
−
        A                - lower bracket point structure
+
    gfx_0            - gradient at x_0
−
        B                - upper bracket point structure
+
−
        alpha            - accepted step length when found
+
    data              - optimisation workspace structure
−
        fx                - objective value at accepted step
+
−
        gfx              - gradient at accepted step
+
    spin_system      - Spinach data structure with
−
        next_act          - continuation tag, either
+
                        line search settings
−
                            'sectioning' or 'none'
 
−
        data              - updated optimisation workspace
 
  
 
==Outputs==
 
==Outputs==
  
−
    this function produces output as described in source code
+
    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
  
 
==Examples==
 
==Examples==
Line 40: Line 51:
  
 
==See also==
 
==See also==
−
[[Main_Page]]
+
[[alpha_conds.m]], [[sectioning.m]], [[cubic_interp.m]], [[fmaxnewton.m]], [[bfgs.m]], [[bfgs_upd.m]], [[hessreg.m]], [[lbfgs.m]], [[Optimal_control_module]]
  
 
''Version 2.11, authors: David Goodwin, [[Ilya Kuprov]]''
 
''Version 2.11, authors: David Goodwin, [[Ilya Kuprov]]''

Latest revision as of 05:33, 30 August 2026

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)

Parameters

   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

Outputs

   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

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

alpha_conds.m, sectioning.m, cubic_interp.m, fmaxnewton.m, bfgs.m, bfgs_upd.m, hessreg.m, lbfgs.m, Optimal_control_module

Version 2.11, authors: David Goodwin, Ilya Kuprov