R/RcppExports.R

Defines functions computeSparseRowVariances iterateSparseMatrixCPP vstExprsCPP rowStdDev colStdDev logNormCPP calculateScoresCPP subsetSM sp_show_storage calcKNNgraph_euclidean calcKNNgraph_pearson

Documented in calcKNNgraph_euclidean calcKNNgraph_pearson

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

#' Calculate k Nearest Neighbors from Pearson distance metric
#'
#' Each distance metric has its own function for speed/efficiency
#' This takes a sample X feature matrix and returns
#' a matrix of k nearest neighbors. This is the one for Pearson.
#'
#' @param x An m x n numeric matrix
#' @param k The number of nearest neighbors to return
#' per sample
#' @return An m x k matrix of indicies 1...k of the
#' nearest neighbors for the specified row based on
#' Pearson distance.
#' @export
calcKNNgraph_pearson <- function(x, k = 1L) {
    .Call('_m3addon_calcKNNgraph_pearson', PACKAGE = 'm3addon', x, k)
}

#' Calculate k Nearest Neighbors from Euclidean distance metric
#'
#' Each distance metric has its own function for speed/efficiency
#' This takes a sample X feature matrix and returns
#' a matrix of k nearest neighbors. This is the one for Euclidean.
#'
#' @param x An m x n numeric matrix
#' @param k The number of nearest neighbors to return
#' per sample
#' @return An m x k matrix of indicies 1...k of the
#' nearest neighbors for the specified row based on
#' Euclidean distance.
#' @export
calcKNNgraph_euclidean <- function(x, k = 1L) {
    .Call('_m3addon_calcKNNgraph_euclidean', PACKAGE = 'm3addon', x, k)
}

sp_show_storage <- function(x) {
    .Call('_m3addon_sp_show_storage', PACKAGE = 'm3addon', x)
}

subsetSM <- function(a, rind, cind) {
    .Call('_m3addon_subsetSM', PACKAGE = 'm3addon', a, rind, cind)
}

calculateScoresCPP <- function(a, Rgenevec) {
    .Call('_m3addon_calculateScoresCPP', PACKAGE = 'm3addon', a, Rgenevec)
}

logNormCPP <- function(a) {
    .Call('_m3addon_logNormCPP', PACKAGE = 'm3addon', a)
}

colStdDev <- function(a) {
    .Call('_m3addon_colStdDev', PACKAGE = 'm3addon', a)
}

rowStdDev <- function(a) {
    .Call('_m3addon_rowStdDev', PACKAGE = 'm3addon', a)
}

vstExprsCPP <- function(a, eP, aD, return_sparse = TRUE, calc_zeros = FALSE) {
    .Call('_m3addon_vstExprsCPP', PACKAGE = 'm3addon', a, eP, aD, return_sparse, calc_zeros)
}

iterateSparseMatrixCPP <- function(a) {
    invisible(.Call('_m3addon_iterateSparseMatrixCPP', PACKAGE = 'm3addon', a))
}

computeSparseRowVariances <- function(j, val, rm, n) {
    .Call('_m3addon_computeSparseRowVariances', PACKAGE = 'm3addon', j, val, rm, n)
}
scfurl/m3addon documentation built on Aug. 9, 2021, 5:30 p.m.