# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
jsdiv_v <- function(P, Q) {
.Call('_dfrtopics_jsdiv_v', PACKAGE = 'dfrtopics', P, Q)
}
jsdiv_m <- function(x, y) {
.Call('_dfrtopics_jsdiv_m', PACKAGE = 'dfrtopics', x, y)
}
naive_cluster <- function(D, K, threshold) {
.Call('_dfrtopics_naive_cluster', PACKAGE = 'dfrtopics', D, K, threshold)
}
naive_cluster_width <- function(cl, D) {
.Call('_dfrtopics_naive_cluster_width', PACKAGE = 'dfrtopics', cl, D)
}
calc_row_entropies <- function(m) {
.Call('_dfrtopics_calc_row_entropies', PACKAGE = 'dfrtopics', m)
}
#' Entropy of a vector
#'
#' This function computes the entropy of a vector, understood as a discrete
#' distribution over the index.
#'
#' @param x vector representing the distribution. Not checked to see whether
#' it is properly normalized.
#'
#' @return \eqn{sum_i x_i \log x_i}, where the log is base 2 and the sum is
#' taken only over non-zero elements of \eqn{x}.
#'
#' @export
entropy <- function(x) {
.Call('_dfrtopics_entropy', PACKAGE = 'dfrtopics', x)
}
draw_multinom <- function(nn, probs) {
.Call('_dfrtopics_draw_multinom', PACKAGE = 'dfrtopics', nn, probs)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.