% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qn_updates.R
\name{update_sr1}
\alias{update_sr1}
\title{SR1 (Symmetric Rank-1) Hessian Update}
\usage{
update_sr1(b, s, y, skip_tol = 1e-08, skip_count = 0L, restart_threshold = 5L)
}
\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{skip_tol}{Tolerance for skip test (default: 1e-8). Update is skipped
if |r'*s| < skip_tol * ||r|| * ||s||.}

\item{skip_count}{Current count of consecutive skipped updates.}

\item{restart_threshold}{Number of consecutive skips before restart
(default: 5).}
}
\value{
A list with components:
\item{b}{Updated Hessian approximation (n x n matrix).}
\item{skipped}{Logical indicating if update was skipped.}
\item{skip_count}{Updated skip counter (reset to 0 if update applied or
restart triggered).}
\item{restarted}{Logical indicating if b was reset to scaled identity.}
}
\description{
Updates the Hessian approximation using the SR1 formula. Unlike BFGS,
SR1 can represent indefinite matrices, making it ideal for ARC which
naturally handles negative curvature.
}
\details{
The SR1 update formula is:
\deqn{B_{k+1} = B_k + \frac{r r^T}{r^T s}}
where \eqn{r = y - B_k s}.

The update is skipped when the denominator is too small relative to the
norms of r and s, which prevents numerical instability. After too many
consecutive skips, the approximation is reset using Barzilai-Borwein
scaling.
}
\references{
Algorithm 4a in design/pseudocode.qmd

Conn, A. R., Gould, N. I., & Toint, P. L. (1991). Convergence of
quasi-Newton matrices generated by the symmetric rank one update.
Mathematical Programming, 50(1-3), 177-195.
}
\keyword{internal}
