% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{maxent_featured_space_from_spatraster_callback}
\alias{maxent_featured_space_from_spatraster_callback}
\title{Create a FeaturedSpace from a terra SpatRaster callback stream}
\usage{
maxent_featured_space_from_spatraster_callback(
  preserved_rast,
  rast_xptr,
  num_points,
  num_layers,
  layer_names,
  sample_indices,
  feature_types,
  n_thresholds,
  n_hinges,
  next_tile_fn,
  reset_fn,
  enable_streaming_eval = TRUE,
  use_cache = TRUE
)
}
\arguments{
\item{preserved_rast}{A terra \code{SpatRaster} S4 object to preserve.}

\item{rast_xptr}{External pointer extracted from the raster object
(used for contract validation).}

\item{num_points}{Integer; total number of finite background points.}

\item{num_layers}{Integer; number of environmental variables per row.}

\item{layer_names}{Character vector of layer names (length num_layers).}

\item{sample_indices}{Integer vector; 0-based indices of presence samples.}

\item{feature_types}{Character vector of feature types to generate.}

\item{n_thresholds}{Integer; number of threshold knots per variable.}

\item{n_hinges}{Integer; number of hinge knots per variable.}

\item{next_tile_fn}{R function returning the next tile or NULL/0-row matrix.}

\item{reset_fn}{R function (no args) that rewinds the underlying stream.}

\item{enable_streaming_eval}{Logical; whether to enable streaming eval mode.}

\item{use_cache}{Logical; wrap the stream in \code{CachingBackgroundProvider}.}
}
\value{
External pointer to a FeaturedSpace object.
}
\description{
Same as \code{maxent_featured_space_from_callback()}, but also preserves
the source \code{SpatRaster} S4 object for provider lifetime safety and
can enable streaming-eval mode immediately.
}
\keyword{internal}
