% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/healthy_basin.R
\name{update_healthy_basin_state}
\alias{update_healthy_basin_state}
\title{Update Healthy-Basin Detector State with One Iteration's Diagnostics}
\usage{
update_healthy_basin_state(state, used_newton, rho, lambda_min, g_inf)
}
\arguments{
\item{state}{List returned by \code{\link{init_healthy_basin_state}}.}

\item{used_newton}{Logical; \code{TRUE} if the current iteration
accepted a Newton step (i.e., \code{step_type == "newton"}).}

\item{rho}{Current step-acceptance ratio (NA if step was rejected).}

\item{lambda_min}{Current smallest Hessian eigenvalue.}

\item{g_inf}{Current \code{||g||_inf}.}
}
\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}
