View source: R/40-priority_queue-constructors.R
| priority_queue | R Documentation |
Creates a priority_queue from elements in ... and matching
priorities.
priority_queue(..., priorities)
... |
Elements to enqueue. |
priorities |
Priorities with the same length as |
Empty construction is supported: priority_queue() returns an empty queue.
If elements are named, names are preserved for name-based reads.
Queue operations are exposed through insert(), peek_*(), pop_*(),
and fapply().
A priority_queue.
x <- priority_queue("a", "b", "c", priorities = c(2, 1, 2))
x
peek_min(x)
empty_q <- priority_queue()
peek_min(empty_q)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.