vector_to_heap: Construct a heap from a vector of elements.

Description Usage Arguments

View source: R/heaps.R

Description

This function builds heaps in linear time by iteratively merging larger and larger heaps.

Usage

1
vector_to_heap(vec, empty_heap, empty_queue = empty_env_queue())

Arguments

vec

The vector to translate into a heap.

empty_heap

Empty heap for determing which heap implementation to use.

empty_queue

Empty queue to determing which queue implementation to use for building the heap.


mailund/ralgo documentation built on April 3, 2018, 9:29 p.m.