R/hash_phylo.R

Defines functions hash_phylo

Documented in hash_phylo

#' @rdname phangorn-internal
#' @export
hash_phylo <- function(x, ...){
  if(has.singles(x)) x <- collapse.singles(x)
  x <- unroot(x)
  x <- reorder(x, "postorder")
  nTips <- as.integer(length(x$tip.label))
  res <- .Call('_phangorn_short_bipCPP', x$edge, nTips)
  digest::digest(res, ...)
}

Try the phangorn package in your browser

Any scripts or data that you put into this service are public.

phangorn documentation built on Jan. 23, 2023, 5:37 p.m.