package core:container/priority_queue

⌘K
Ctrl+K
or
/

    Index

    Types (1)
    Constants (1)
    Variables (0)

    This section is empty.

    Procedure Groups (0)

    This section is empty.

    Types

    Priority_Queue ¶

    Priority_Queue :: struct($Value: typeid) {}
    Related Procedures With Parameters

    Constants

    DEFAULT_CAPACITY ¶

    DEFAULT_CAPACITY :: 16

    Variables

    This section is empty.

    Procedures

    cap ¶

    cap :: proc(pq: $Q/Priority_Queue($T)) -> int {…}

    clear ¶

    clear :: proc(pq: ^$Q/Priority_Queue($T)) {…}

    default_swap_proc ¶

    default_swap_proc :: proc($T: typeid) -> proc([]typeid, i, int) {…}

    destroy ¶

    destroy :: proc(pq: ^$Q/Priority_Queue($T)) {…}

    fix ¶

    fix :: proc(pq: ^$Q/Priority_Queue($T), i: int) {…}
     

    NOTE(bill): When an element at index 'i' has changed its value, this will fix the the heap ordering. This is using a basic "heapsort" with shift up and a shift down parts.

    init ¶

    init :: proc(pq: ^$Q/Priority_Queue($T), less: proc(a, b: $T) -> bool, swap: proc(q: []$T, i, j: int), capacity: int = DEFAULT_CAPACITY, allocator := context.allocator) {…}

    init_from_dynamic_array ¶

    init_from_dynamic_array :: proc(pq: ^$Q/Priority_Queue($T), queue: [dynamic]$T, less: proc(a, b: $T) -> bool, swap: proc(q: []$T, i, j: int)) {…}

    len ¶

    len :: proc(pq: $Q/Priority_Queue($T)) -> int {…}

    peek ¶

    peek :: proc(pq: $Q/Priority_Queue($T), loc := #caller_location) -> (res: $T) {…}

    peek_safe ¶

    peek_safe :: proc(pq: $Q/Priority_Queue($T), loc := #caller_location) -> (res: $T, ok: bool) {…}

    pop ¶

    pop :: proc(pq: ^$Q/Priority_Queue($T), loc := #caller_location) -> (value: $T) {…}

    pop_safe ¶

    pop_safe :: proc(pq: ^$Q/Priority_Queue($T), loc := #caller_location) -> (value: $T, ok: bool) {…}

    push ¶

    push :: proc(pq: ^$Q/Priority_Queue($T), value: $T) {…}

    remove ¶

    remove :: proc(pq: ^$Q/Priority_Queue($T), i: int) -> (value: $T, ok: bool) {…}

    reserve ¶

    reserve :: proc(pq: ^$Q/Priority_Queue($T), capacity: int) {…}

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-17 21:11:00.926192900 +0000 UTC