% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gk_gamma_helpers.R
\name{.gk_gamma_from_tab}
\alias{.gk_gamma_from_tab}
\title{Compute Gamma from a Pre-built Contingency Table}
\usage{
.gk_gamma_from_tab(tab, nr, nc)
}
\arguments{
\item{tab}{Integer or numeric matrix (contingency table).}

\item{nr}{Number of rows.}

\item{nc}{Number of columns.}
}
\value{
A scalar: the gamma coefficient, or \code{NA_real_}.
}
\description{
Shared engine for \code{gk_gamma()} and \code{gk_gamma_vec()}.
Uses cumulative suffix sums and prefix column sums for
\eqn{O(nr \times nc)} concordant/discordant pair counting.
}
\keyword{internal}
