% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/flat_ridge.R
\name{update_flat_ridge_state}
\alias{update_flat_ridge_state}
\title{Update Flat-Ridge Detector State with One Iteration's Diagnostics}
\usage{
update_flat_ridge_state(state, sigma, rho, g_inf, lambda_min)
}
\arguments{
\item{state}{List returned by \code{\link{init_flat_ridge_state}}.}

\item{sigma}{Current regularization parameter.}

\item{rho}{Current step-acceptance ratio.}

\item{g_inf}{Current \code{||g||_inf}.}

\item{lambda_min}{Current smallest Hessian eigenvalue (may be negative
for indefinite Hessians; pass \code{NA_real_} if unavailable).}
}
\value{
The updated state list.
}
\description{
Pushes a new record onto the sliding window and trims the oldest entry
once the window is full.
}
\keyword{internal}
