% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{maxent_featured_space_from_callback}
\alias{maxent_featured_space_from_callback}
\title{Create a FeaturedSpace from a streaming background provider}
\usage{
maxent_featured_space_from_callback(
  num_points,
  num_layers,
  layer_names,
  sample_indices,
  feature_types,
  n_thresholds,
  n_hinges,
  next_tile_fn,
  reset_fn,
  use_cache = TRUE
)
}
\arguments{
\item{num_points}{Integer: total number of finite background points
the provider will emit (sum of \code{nrow()} across tiles).}

\item{num_layers}{Integer: number of environmental variables / raster
layers per tile row.}

\item{layer_names}{Character vector of length \code{num_layers}
giving the name for each layer / column (used when generating feature
names such as \code{bio1^2}, \code{bio1*bio2}).}

\item{sample_indices}{Integer vector: 0-based indices of occurrence
samples in the concatenated background stream.}

\item{feature_types}{Character vector of feature types to generate.
See \code{\link{maxent_generate_features}}.}

\item{n_thresholds}{Number of threshold knots per variable.}

\item{n_hinges}{Number of hinge knots per variable.}

\item{next_tile_fn}{R function returning the next tile as a numeric
matrix (nrow x num_layers), or a 0-row matrix / \code{NULL} when the
stream is exhausted. The function is responsible for filtering out
rows containing NAs.}

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

\item{use_cache}{Logical; wrap the callback stream in
\code{CachingBackgroundProvider}.}
}
\value{
External pointer to a \code{FeaturedSpace} object.
}
\description{
Builds a \code{FeaturedSpace} by draining a callback-style background
provider (typically backed by a \code{terra::SpatRaster} block loop)
one tile at a time, then constructing features from the concatenated
\code{(num_points x num_layers)} matrix via \code{\link{generate_features}}.
}
\details{
This is the C++ entry point used by
\code{\link{maxent_featured_space_from_rast}}; end users should prefer
that R-level wrapper.
}
