R/RcppExports.R

Defines functions wrap_powerset .powerset make_sets matrix_to_network_cpp induced_submat_cpp exact_hessian_cpp get_boundaries exact_gradient_cpp exact_loglik_cpp new_ergmito_ptr_cpp geodesic_cpp count_stats_cpp count_available

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

count_available <- function(i = 0L) {
    .Call(`_ergmito_count_available`, i)
}

count_stats_cpp <- function(X, terms, A) {
    .Call(`_ergmito_count_stats`, X, terms, A)
}

geodesic_cpp <- function(X, force = FALSE) {
    .Call(`_ergmito_geodesic`, X, force)
}

new_ergmito_ptr_cpp <- function(target_stats, stats_weights, stats_statmat, target_offset, stats_offset) {
    .Call(`_ergmito_new_ergmito_ptr`, target_stats, stats_weights, stats_statmat, target_offset, stats_offset)
}

#' Vectorized version of log-likelihood function
#' 
#' @param x Matrix of statistic. `nnets * nstats`.
#' @param params Vector of coefficients.
#' @param weights A list of weights matrices (for `statmat`).
#' @param statmat A list of matrices with statistics for each row in `x`.
#' @noRd
exact_loglik_cpp <- function(ptr, params, as_prob = FALSE) {
    .Call(`_ergmito_exact_loglik`, ptr, params, as_prob)
}

#' Vectorized version of log-likelihood function
#' 
#' @param x Matrix of statistic. `nnets * nstats`.
#' @param params Vector of coefficients.
#' @param weights A list of weights matrices (for `statmat`).
#' @param statmat A list of matrices with statistics for each row in `x`.
#' @noRd
exact_gradient_cpp <- function(ptr, params, as_prob = FALSE) {
    .Call(`_ergmito_exact_gradient`, ptr, params, as_prob)
}

get_boundaries <- function(ptr) {
    .Call(`_ergmito_get_boundaries`, ptr)
}

#' Vectorized version of gradient function
#' 
#' @param params Vector of coefficients.
#' @param weights A list of weights matrices (for `statmat`).
#' @param statmat A list of matrices with statistics for each row in `x`.
#' @noRd
exact_hessian_cpp <- function(params, stats_weights, stats_statmat, stats_offset) {
    .Call(`_ergmito_exact_hessian`, params, stats_weights, stats_statmat, stats_offset)
}

induced_submat_cpp <- function(nets, vs) {
    .Call(`_ergmito_induced_submat`, nets, vs)
}

matrix_to_network_cpp <- function(x, directed, hyper, loops, multiple, bipartite) {
    .Call(`_ergmito_matrix_to_network`, x, directed, hyper, loops, multiple, bipartite)
}

make_sets <- function(n, directed = TRUE) {
    .Call(`_ergmito_make_sets`, n, directed)
}

.powerset <- function(n, force = FALSE, directed = TRUE) {
    .Call(`_ergmito_powerset`, n, force, directed)
}

wrap_powerset <- function(sets, from, to, n) {
    .Call(`_ergmito_wrap_powerset`, sets, from, to, n)
}

Try the ergmito package in your browser

Any scripts or data that you put into this service are public.

ergmito documentation built on July 9, 2023, 7:09 p.m.