R/RcppExports.R

Defines functions triangular_index rcpp_get_wecoma_internal rcpp_get_wecoma rcpp_get_incove is_cross_mat rcpp_get_cocove rcpp_get_cove rcpp_get_wecove rcpp_get_vec rcpp_get_incoma_matrix_to_list rcpp_get_incoma_matrix rcpp_get_incoma_list rcpp_get_incoma rcpp_get_coma_internal rcpp_get_coma rcpp_get_cocoma_internal rcpp_get_cocoma rcpp_relmutinf rcpp_mutinf rcpp_condent rcpp_joinent rcpp_ent get_unique_values get_normalized rcpp_get_entropy create_neighborhood rcpp_cell_from_xy rcpp_xy_from_matrix

Documented in create_neighborhood rcpp_cell_from_xy rcpp_xy_from_matrix

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

#' Coordinates from a matrix
#'
#' This function gets coordinates (row and column numbers) of the matrix cells.
#'
#' @param x A matrix
#' @param cell A vector of cell number.
#' If NULL, the coordinates will be calculated for the whole matrix
#' @keywords internal
rcpp_xy_from_matrix <- function(x, cell = NULL) {
    .Call(`_comat_rcpp_xy_from_matrix`, x, cell)
}

#' Get cell number
#'
#' Get cell number(s) of a matrix from row and column numbers.
#' Cell numbers start at 0 in the upper left corner,
#' and increase from top to bottom, and then from left to right.
#'
#' @param x A matrix
#' @param y A matrix with two columns (row and column numbers)
#' @keywords internal
rcpp_cell_from_xy <- function(x, y) {
    .Call(`_comat_rcpp_cell_from_xy`, x, y)
}

#' Create neighborhood coordinates
#'
#' This function creates a neighborhood coordinates matrix based on the directions parameter.
#'
#' @param directions The number of directions in which cells should be connected:
#' 4 (rook's case), 8 (queen's case), or a neighbourhood matrix.
#' The neighbourhood matrix should have one cell with value 0 (the focal cell),
#' and at least one cell with value 1 (the adjacent cells).
#' Cells with other values (e.g. NA) are ignored.
#' @keywords internal
create_neighborhood <- function(directions) {
    .Call(`_comat_create_neighborhood`, directions)
}

rcpp_get_entropy <- function(x, base = "log2") {
    .Call(`_comat_rcpp_get_entropy`, x, base)
}

get_normalized <- function(x, normalization) {
    .Call(`_comat_get_normalized`, x, normalization)
}

get_unique_values <- function(x, na_omit) {
    .Call(`_comat_get_unique_values`, x, na_omit)
}

rcpp_ent <- function(x, base = "log2") {
    .Call(`_comat_rcpp_ent`, x, base)
}

rcpp_joinent <- function(x, base = "log2", ordered = TRUE) {
    .Call(`_comat_rcpp_joinent`, x, base, ordered)
}

rcpp_condent <- function(x, base = "log2", ordered = TRUE) {
    .Call(`_comat_rcpp_condent`, x, base, ordered)
}

rcpp_mutinf <- function(x, base = "log2", ordered = TRUE) {
    .Call(`_comat_rcpp_mutinf`, x, base, ordered)
}

rcpp_relmutinf <- function(x, base = "log2", ordered = TRUE) {
    .Call(`_comat_rcpp_relmutinf`, x, base, ordered)
}

rcpp_get_cocoma <- function(x, y, directions) {
    .Call(`_comat_rcpp_get_cocoma`, x, y, directions)
}

rcpp_get_cocoma_internal <- function(x, y, directions, classes_x, classes_y) {
    .Call(`_comat_rcpp_get_cocoma_internal`, x, y, directions, classes_x, classes_y)
}

rcpp_get_coma <- function(x, directions) {
    .Call(`_comat_rcpp_get_coma`, x, directions)
}

rcpp_get_coma_internal <- function(x, directions, classes) {
    .Call(`_comat_rcpp_get_coma_internal`, x, directions, classes)
}

rcpp_get_incoma <- function(x, directions) {
    .Call(`_comat_rcpp_get_incoma`, x, directions)
}

rcpp_get_incoma_list <- function(x, directions, classes) {
    .Call(`_comat_rcpp_get_incoma_list`, x, directions, classes)
}

rcpp_get_incoma_matrix <- function(x) {
    .Call(`_comat_rcpp_get_incoma_matrix`, x)
}

rcpp_get_incoma_matrix_to_list <- function(x) {
    .Call(`_comat_rcpp_get_incoma_matrix_to_list`, x)
}

rcpp_get_vec <- function(x, ordered, normalization) {
    .Call(`_comat_rcpp_get_vec`, x, ordered, normalization)
}

rcpp_get_wecove <- function(x, ordered, normalization) {
    .Call(`_comat_rcpp_get_wecove`, x, ordered, normalization)
}

rcpp_get_cove <- function(x, ordered, normalization) {
    .Call(`_comat_rcpp_get_cove`, x, ordered, normalization)
}

rcpp_get_cocove <- function(x, ordered, normalization) {
    .Call(`_comat_rcpp_get_cocove`, x, ordered, normalization)
}

is_cross_mat <- function(n_layers) {
    .Call(`_comat_is_cross_mat`, n_layers)
}

rcpp_get_incove <- function(x, ordered, repeated, normalization) {
    .Call(`_comat_rcpp_get_incove`, x, ordered, repeated, normalization)
}

rcpp_get_wecoma <- function(x, w, directions, fun, na_action) {
    .Call(`_comat_rcpp_get_wecoma`, x, w, directions, fun, na_action)
}

rcpp_get_wecoma_internal <- function(x, w, directions, classes, fun, na_action) {
    .Call(`_comat_rcpp_get_wecoma_internal`, x, w, directions, classes, fun, na_action)
}

triangular_index <- function(r, c) {
    .Call(`_comat_triangular_index`, r, c)
}

# Register entry points for exported C++ functions
methods::setLoadAction(function(ns) {
    .Call(`_comat_RcppExport_registerCCallable`)
})

Try the comat package in your browser

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

comat documentation built on May 29, 2024, 9:48 a.m.