std.PriorityDequeue
The entries of std.PriorityDequeue in the Zig reference. This page has 21 cards.
pub fn capacity(self: *const Self) usize
Return the number of elements that can be added to the dequeue before more memory is allocated.
- Kind
- function
- Module
std.PriorityDequeue
pub fn count(self: *const Self) usize
Return the number of elements remaining in the dequeue.
- Kind
- function
- Module
std.PriorityDequeue
pub fn deinit(self: *Self, allocator: Allocator) void
Free memory used by the dequeue.
- Kind
- function
- Module
std.PriorityDequeue
A priority dequeue containing no elements.
- Kind
- constant
- Module
std.PriorityDequeue
pub fn ensureTotalCapacity(self: *Self, allocator: Allocator, new_capacity: usize) !void
Ensure that the dequeue can fit at least `new_capacity` items.
- Kind
- function
- Module
std.PriorityDequeue
pub fn ensureUnusedCapacity(self: *Self, allocator: Allocator, additional_count: usize) !void
Ensure that the dequeue can fit at least `additional_count` **more** items.
- Kind
- function
- Module
std.PriorityDequeue
pub fn fromOwnedSlice(items: []T, context: Context) Self
Dequeue takes ownership of the passed in slice.
- Kind
- function
- Module
std.PriorityDequeue
pub fn initContext(context: Context) Self
Initialize and return a new priority dequeue with context.
- Kind
- function
- Module
std.PriorityDequeue
- Kind
- struct
- Module
std.PriorityDequeue
pub fn iterator(self: *Self) Iterator
Return an iterator that walks the queue without consuming it.
- Kind
- function
- Module
std.PriorityDequeue
pub fn next(it: *Iterator) ?T
- Kind
- function
- Module
std.PriorityDequeue
pub fn reset(it: *Iterator) void
- Kind
- function
- Module
std.PriorityDequeue
pub fn peekMax(self: *const Self) ?T
Look at the largest element in the dequeue.
- Kind
- function
- Module
std.PriorityDequeue
pub fn peekMin(self: *const Self) ?T
Look at the smallest element in the dequeue.
- Kind
- function
- Module
std.PriorityDequeue
pub fn popIndex(self: *Self, index: usize) T
Remove and return element at index.
- Kind
- function
- Module
std.PriorityDequeue
pub fn popMax(self: *Self) ?T
Remove and return the largest element from the dequeue, or `null` if empty.
- Kind
- function
- Module
std.PriorityDequeue
pub fn popMin(self: *Self) ?T
Remove and return the smallest element from the dequeue, or `null` if empty.
- Kind
- function
- Module
std.PriorityDequeue
pub fn push(self: *Self, allocator: Allocator, elem: T) !void
Insert a new element, maintaining priority.
- Kind
- function
- Module
std.PriorityDequeue
pub fn pushSlice(self: *Self, allocator: Allocator, items: []const T) !void
Add each element in `items` to the dequeue.
- Kind
- function
- Module
std.PriorityDequeue
pub fn shrinkAndFree(self: *Self, allocator: Allocator, new_len: usize) void
Reduce allocated capacity to `new_len`.
- Kind
- function
- Module
std.PriorityDequeue
pub fn update(self: *Self, elem: T, new_elem: T) !void
- Kind
- function
- Module
std.PriorityDequeue