% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qn_updates.R
\name{update_bfgs_powell}
\alias{update_bfgs_powell}
\title{Powell-Damped BFGS Update}
\usage{
update_bfgs_powell(b, s, y, damping_threshold = 0.2)
}
\arguments{
\item{b}{Current Hessian approximation (n x n symmetric matrix).}

\item{s}{Step vector: s = x_new - x_old.}

\item{y}{Gradient difference: y = g_new - g_old.}

\item{damping_threshold}{Threshold for damping (default: 0.2).
Damping applied if y's < damping_threshold * s'Bs.}
}
\value{
A list with components:
\item{b}{Updated Hessian approximation (n x n matrix).}
\item{theta}{Damping parameter used (1.0 = no damping).}
\item{y_damped}{The damped y vector used in update.}
\item{skipped}{Logical indicating if update was skipped (only if s'Bs
is too small to apply damping).}
}
\description{
Applies Powell damping to ensure the curvature condition is satisfied,
then performs a BFGS update. This guarantees an update even when the
standard curvature condition y's > 0 fails.
}
\details{
Powell damping modifies y to y_damped = theta*y + (1-theta)*Bs such that
s'*y_damped >= damping_threshold * s'*Bs, ensuring positive curvature.

The formula for theta when y's < damping_threshold * s'Bs is:
theta = (1 - damping_threshold) * s'Bs / (s'Bs - y's)

This ensures s'*y_damped = damping_threshold * s'Bs exactly.
}
\references{
Powell, M. J. D. (1978). A fast algorithm for nonlinearly constrained
optimization calculations. Numerical Analysis, 144-157.

Algorithm 4a-hybrid in design/pseudocode.qmd
}
\keyword{internal}
