# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @export
GS_NTU <- function(U, V) {
    .Call('_rpm_GS_NTU', PACKAGE = 'rpm', U, V)
}

#' @export
GSi_NTU <- function(U, V, nmax) {
    .Call('_rpm_GSi_NTU', PACKAGE = 'rpm', U, V, nmax)
}

#' @export
GSi_NTU_O <- function(U, V, O, Ua, nmax) {
    .Call('_rpm_GSi_NTU_O', PACKAGE = 'rpm', U, V, O, Ua, nmax)
}

#' @export
PSeqcond <- function(beta, Gamma, S, X, Z, pmfW, pmfM, gw, gm) {
    .Call('_rpm_PSeqcond', PACKAGE = 'rpm', beta, Gamma, S, X, Z, pmfW, pmfM, gw, gm)
}

#' @export
PSgeqcond <- function(beta, Gamma, S, X, Z, pmfW, pmfM, gw, gm) {
    .Call('_rpm_PSgeqcond', PACKAGE = 'rpm', beta, Gamma, S, X, Z, pmfW, pmfM, gw, gm)
}

PropMax <- function(stat) {
    .Call('_rpm_PropMax', PACKAGE = 'rpm', stat)
}

#' @export
augpmf <- function(beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, gw, gm) {
    .Call('_rpm_augpmf', PACKAGE = 'rpm', beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, gw, gm)
}

#' @export
augpmfWM <- function(pmfW, pmfM, pmf, gw, gm, pmfW_N, pmfM_N, gwN, gmN) {
    .Call('_rpm_augpmfWM', PACKAGE = 'rpm', pmfW, pmfM, pmf, gw, gm, pmfW_N, pmfM_N, gwN, gmN)
}

#' @export
auxGamma <- function(beta, GammaW, GammaM, S, X, Z, pmfW, pmfM, gw, gm) {
    .Call('_rpm_auxGamma', PACKAGE = 'rpm', beta, GammaW, GammaM, S, X, Z, pmfW, pmfM, gw, gm)
}

#' @export
checkstable <- function(U, V, m, w) {
    .Call('_rpm_checkstable', PACKAGE = 'rpm', U, V, m, w)
}

colMax <- function(stat) {
    .Call('_rpm_colMax', PACKAGE = 'rpm', stat)
}

#' @export
eqcond <- function(beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm, constraints) {
    .Call('_rpm_eqcond', PACKAGE = 'rpm', beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm, constraints)
}

#' @export
gloglik <- function(beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm, constraints) {
    .Call('_rpm_gloglik', PACKAGE = 'rpm', beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm, constraints)
}

#' @export
hloglik <- function(beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm, constraints) {
    .Call('_rpm_hloglik', PACKAGE = 'rpm', beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm, constraints)
}

#' @export
jeqcond <- function(beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm, constraints) {
    .Call('_rpm_jeqcond', PACKAGE = 'rpm', beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm, constraints)
}

#' @export
loglik <- function(beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm, constraints) {
    .Call('_rpm_loglik', PACKAGE = 'rpm', beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm, constraints)
}

#' @export
logpmfest <- function(beta, GammaW, GammaM, S, X, Z, pmfW, pmfM, gw, gm) {
    .Call('_rpm_logpmfest', PACKAGE = 'rpm', beta, GammaW, GammaM, S, X, Z, pmfW, pmfM, gw, gm)
}

#' @export
probcounts <- function(beta, Gamma, S, X, Z, pmfW, pmfM, counts, gw, gm) {
    .Call('_rpm_probcounts', PACKAGE = 'rpm', beta, Gamma, S, X, Z, pmfW, pmfM, counts, gw, gm)
}

#' @export
qloglik <- function(beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm) {
    .Call('_rpm_qloglik', PACKAGE = 'rpm', beta, GammaW, GammaM, Sd, Xd, Zd, Sdim, Xdim, Zdim, pmfW, pmfM, pmf, counts, gw, gm)
}

rowMax <- function(stat) {
    .Call('_rpm_rowMax', PACKAGE = 'rpm', stat)
}

#' Row-wise argmax (0-based column indices)
#'
#' Returns the column index of the maximum element in each row of an integer matrix.
#' Uses Armadillo's `index_max()` to avoid deprecated `.max(uword&)`.
#'
#' @param A Integer matrix.
#' @return A row vector of 0-based column indices of the maxima.
#' @export
rowwise_imax_idx <- function(A) {
    .Call('_rpm_rowwise_imax_idx', PACKAGE = 'rpm', A)
}

#' Row-wise argmax (0-based column indices)
#'
#' Returns the column index of the maximum element in each row of A.
#' Uses Armadillo's `index_max()` to avoid deprecated `.max(uword&)`.
#'
#' @param A Numeric matrix.
#' @return A row vector of 0-based column indices of the maxima.
#' @export
rowwise_max_idx <- function(A) {
    .Call('_rpm_rowwise_max_idx', PACKAGE = 'rpm', A)
}

#' @export
stablearma <- function(U, V, m, w) {
    .Call('_rpm_stablearma', PACKAGE = 'rpm', U, V, m, w)
}

