R/RcppExports.R

Defines functions fastLiclust

Documented in fastLiclust

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

#' Hierarchical clustering on a linkage matrix
#' 
#' Performs hierarchical clustering (currently only average linkage is supported) on a dataset which is 
#' only partially interconnected (i.e. between some vertices there is no edge.) This is in particular a
#' memory-saving alternative on large sparse graphs which are only encoded in the linkage matrix, i.e. have
#' no nxn distance matrix. Other use cases are sparsely populated matrices which can be extracted directly from 
#' \code{ff} objects on disk, so no nxn matrix has to be built in RAM.
#' 
#' @param linkmat A nx2 integer matrix of vertices which are connected.
#' @param sim A length n numeric vector of the distances between the connected edges.
#' @param weights A n integer vector initialized with all 1, which will contain the number of vertices
#'   summarized under a cluster (necessary in the algorithm.)
#'   
#' @return Nothing - the operation is performed in place on the matrix! Note this is highly unstandard
#' R behavior. To get the results in a useful way, run first \code{\link{crop}} then \code{\link{toHclust}}.
#' @export
fastLiclust <- function(linkmat, sim, weights, disconnect = 1) {
    .Call('_fastliclust_fastLiclust', PACKAGE = 'fastliclust', linkmat, sim, weights, disconnect)
}
meowcat/fastliclust documentation built on May 22, 2019, 6:51 p.m.