% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aaa_utils.R
\name{validate_terminal_nodes}
\alias{validate_terminal_nodes}
\title{Validate the output of \code{extract_terminal_nodes()}}
\usage{
validate_terminal_nodes(nodes, data, backend = NA_character_)
}
\description{
Boosting backends store their tree structures in opaque containers; a tiny
API change can silently produce a malformed leaf matrix (e.g. all zeros),
yielding a degenerate dissimilarity matrix without raising any error.
This function asserts the shape and type contract so problems surface
immediately at extraction time rather than much later, after the C++
co-occurrence call has already produced nonsense.
}
\details{
Contract: \code{nodes} must be a \code{data.frame} with \code{nrow(data)}
rows and at least one column; every column must be coercible to integer;
at least one column must contain more than one distinct value.
}
\keyword{internal}
