object
barzilai_borwein(Problem)
Problem- Problem object implementinglocal_optimization_problem_protocoland defininggradient/2.
Barzilai-Borwein (BB) gradient method with adaptive step sizes. Requires the problem to define gradient/2. Supports box constraints via projection, minimization and maximization, and BB1 / BB2 / alternating formulas.
logtalk_load(local_optimization(loader))static, context_switching_calls
Step formulas:
formula(bb1)usesalpha = (s*s)/(s*y)(long step).formula(bb2)usesalpha = (s*y)/(y*y)(short step).formula(alternate)(default) switches between BB1 and BB2 each iteration.Safeguards: When the denominator is near zero or the computed step is outside
[step_min, step_max], the previous accepted step (orstep_sizeon the first iteration) is reused.Line search: Optional non-monotone Armijo acceptance controlled by
line_search(none|armijo). The defaultnoneaccepts the pure BB step.Bounds: When the problem defines
position_bounds/1, trial points are projected onto the box after each step.
Public predicates
(no local declarations; see entity ancestors if any)
Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)