R/RcppExports.R

Defines functions rcpp_freqmatrix rcpp_partition

Documented in rcpp_freqmatrix rcpp_partition

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

#' Partition of a graph given its centers
#' 
#' Each center in order takes up all its free neighbors. The process is repeated 
#' until there are no more free regions.
#' @title Graph partition
#' @param neighbors A matrix defining a the links between the graph nodes.
#' @param centers The desired centers to start the algorithm
#' @return a vector indicating the cluster center for each graph node.
#' @author Marcelo Costa
rcpp_partition <- function(neighbors, centers) {
    .Call('_gbdcd_rcpp_partition', PACKAGE = 'gbdcd', neighbors, centers)
}

#' Generate frequency matrix
#' 
#' Frequency matrix
#' @title Frequency matrix generation
#' @param partitions A vector indicating the cluster center for each graph node.
#' @return a matrix.
#' @author Leandro Mineti
rcpp_freqmatrix <- function(partitions) {
    .Call('_gbdcd_rcpp_freqmatrix', PACKAGE = 'gbdcd', partitions)
}
leandromineti/gbdcd documentation built on Sept. 24, 2020, 12:43 p.m.