For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
FixedHeightMinHeap
struct FixedHeightMinHeap[k_dtype: DType, v_dtype: DType, levels: Int]
Fieldsβ
- βk_array (
InlineArray[Scalar[k_dtype], FixedHeightMinHeap[k_dtype, v_dtype, levels].num_elements]): - βv_array (
InlineArray[Scalar[v_dtype], FixedHeightMinHeap[k_dtype, v_dtype, levels].num_elements]):
Implemented traitsβ
AnyType,
ImplicitlyDestructible
comptime membersβ
num_elementsβ
comptime num_elements = ((2 ** levels) - 1)
Methodsβ
__init__β
def __init__(out self, *, fill_k: Scalar[k_dtype], fill_v: Scalar[v_dtype])
swapβ
def swap(mut self, a: Int, b: Int)
heap_downβ
def heap_down(mut self)
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!