package core:container/queue
Index
Types (1)
Constants (1)
Variables (0)
This section is empty.
Types
Constants
DEFAULT_CAPACITY ¶
DEFAULT_CAPACITY: int : 16
Variables
This section is empty.
Procedures
back ¶
back :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T)) -> $T {…}
back_ptr ¶
back_ptr :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T)) -> ^$T {…}
cap ¶
cap :: proc(q: $Q/container_priority_queue.Priority_Queue($T)) -> int {…}
The current capacity of the queue
clear ¶
clear :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T)) {…}
Clear the contents of the queue
consume_back ¶
consume_back :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), n: int, loc := #caller_location) {…}
Consume n
elements from the back of the queue
consume_front ¶
consume_front :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), n: int, loc := #caller_location) {…}
Consume n
elements from the front of the queue
destroy ¶
destroy :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T)) {…}
Procedure to destroy a queue
front ¶
front :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T)) -> $T {…}
front_ptr ¶
front_ptr :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T)) -> ^$T {…}
get ¶
get :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), #any_int i: int, loc := #caller_location) -> $T {…}
get_ptr ¶
get_ptr :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), #any_int i: int, loc := #caller_location) -> ^$T {…}
init ¶
init :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), capacity: int = DEFAULT_CAPACITY, allocator := context.allocator) -> runtime.Allocator_Error {…}
Procedure to initialize a queue
init_from_slice ¶
init_from_slice :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), backing: []$T) -> bool {…}
Procedure to initialize a queue from a fixed backing slice.
The contents of the backing
will be overwritten as items are pushed onto the Queue
.
Any previous contents are not available.
init_with_contents ¶
init_with_contents :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), backing: []$T) -> bool {…}
Procedure to initialize a queue from a fixed backing slice. Existing contents are preserved and available on the queue.
len ¶
len :: proc(q: $Q/container_priority_queue.Priority_Queue($T)) -> int {…}
The length of the queue
peek_back ¶
peek_back :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), loc := #caller_location) -> ^$T {…}
peek_front ¶
peek_front :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), loc := #caller_location) -> ^$T {…}
pop_back ¶
pop_back :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), loc := #caller_location) -> (elem: $T) {…}
Pop an element from the back of the queue
pop_back_safe ¶
pop_back_safe :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T)) -> (elem: $T, ok: bool) {…}
Safely pop an element from the back of the queue
pop_front ¶
pop_front :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), loc := #caller_location) -> (elem: $T) {…}
Pop an element from the front of the queue
pop_front_safe ¶
pop_front_safe :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T)) -> (elem: $T, ok: bool) {…}
Safely pop an element from the front of the queue
push_back ¶
push_back :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), elem: $T) -> (ok: bool, err: runtime.Allocator_Error) {…}
Push an element to the back of the queue
push_back_elems ¶
push_back_elems :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), .. elems: ..$T) -> (ok: bool, err: runtime.Allocator_Error) {…}
Push multiple elements to the back of the queue
push_front ¶
push_front :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), elem: $T) -> (ok: bool, err: runtime.Allocator_Error) {…}
Push an element to the front of the queue
reserve ¶
reserve :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), capacity: int) -> runtime.Allocator_Error {…}
Reserve enough space for at least the specified capacity
set ¶
set :: proc(q: ^$Q/container_priority_queue.Priority_Queue($T), #any_int i: int, val: $T, loc := #caller_location) {…}
space ¶
space :: proc(q: $Q/container_priority_queue.Priority_Queue($T)) -> int {…}
Remaining space in the queue (cap-len)
Procedure Groups
append ¶
append :: proc{ push_back, push_back_elems, }
push ¶
push :: proc{ push_back, push_back_elems, }
Source Files
Generation Information
Generated with odin version dev-2025-04 (vendor "odin") Windows_amd64 @ 2025-04-13 21:11:29.919762700 +0000 UTC