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)
}

Try the adjclust package in your browser

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

adjclust documentation built on April 28, 2023, 1:10 a.m.