% tinyrox says don't edit this manually, but it can't stop you!
\name{flowmatch_scheduler_step}
\alias{flowmatch_scheduler_step}
\title{Perform a FlowMatch scheduler step}
\usage{
flowmatch_scheduler_step(model_output, timestep, sample, schedule,
                         generator = NULL)
}
\arguments{
\item{model_output}{torch tensor. The output from the diffusion model
(velocity prediction).}

\item{timestep}{Numeric. The current timestep.}

\item{sample}{torch tensor. The current noisy sample.}

\item{schedule}{List. The FlowMatch scheduler object.}

\item{generator}{torch generator or NULL. Random generator for reproducibility.}
}
\value{
A list containing:
  \describe{
    \item{prev_sample}{The denoised sample at the previous timestep}
    \item{schedule}{The updated scheduler with incremented step_index}
  }
}
\description{
Performs a single denoising step using Euler integration. This is the
core sampling function for FlowMatch models.
}
\details{
The FlowMatch Euler step is remarkably simple:
\code{prev_sample = sample + dt * model_output}
where \code{dt = sigma_next - sigma_current}.

This implements the Euler method for solving the probability flow ODE
in continuous normalizing flows.
}
