R/RcppExports.R

# 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('yolo_calcKNNgraph_pearson', PACKAGE = 'yolo', 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('yolo_calcKNNgraph_euclidean', PACKAGE = 'yolo', x, k)
}
caleblareau/yolo documentation built on May 13, 2019, 11:01 a.m.