% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/box_constraints.R
\name{apply_box_constraints}
\alias{apply_box_constraints}
\title{Apply Box Constraints to Step}
\usage{
apply_box_constraints(x_current, s, lower, upper)
}
\arguments{
\item{x_current}{Current iterate}

\item{s}{Proposed unconstrained step}

\item{lower}{Lower bounds (use -Inf for unbounded)}

\item{upper}{Upper bounds (use Inf for unbounded)}
}
\value{
List with components:
\item{s_bounded}{Truncated step that respects bounds}
\item{x_new}{New iterate projected to feasible region}
}
\description{
Truncates a proposed step to ensure the new iterate stays within box
constraints, then projects for numerical safety.
}
\details{
This implements Algorithm 7a from the design specification. The approach:
\enumerate{
\item Compute maximum feasible step length alpha_max
\item Truncate step: s_bounded = alpha_max * s
\item Project x_k + s_bounded to box for numerical safety
}
}
\keyword{internal}
