R/buildHeap.R

Defines functions buildHeap

# @useDynLib adjclust percDown
buildHeap <- function(heap, D, l) {
  for (ii in floor(l/2) : 1) {
    heap <- .Call("percDown", heap, D, as.integer(l), as.integer(ii), PACKAGE = "adjclust")
  }
  return(heap)
}
pneuvial/adjclust documentation built on Oct. 13, 2024, 7:59 a.m.