% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nnmaxheap.R
\name{nnmaxheap_C}
\alias{nnmaxheap_C}
\title{Project a Vector onto Non-Negative Non-Increasing Space}
\usage{
nnmaxheap_C(m)
}
\arguments{
\item{m}{A numeric vector to project.}
}
\value{
A numeric vector of the same length as \code{m}, projected
  onto the non-negative non-increasing constraint space.
}
\description{
Applies an isotonic regression-style projection to enforce that the
output vector is non-negative and non-increasing. Used internally
by \code{\link{predict.orthoMTL}} to ensure survival predictions
are monotonically decreasing across time thresholds.
}
\details{
This function implements a pool-adjacent-violators style algorithm.
It replaces the external \code{Iso} package dependency used in the
predecessor \code{orthopen} package.
}
\examples{
# Project a vector onto the non-negative non-increasing space
nnmaxheap_C(c(3, 1, 2, -1))

# Already valid input: returned unchanged
nnmaxheap_C(c(5, 3, 3, 1))
}
