blob: 345a47b97bd72a5eb1d3c89a6019824b3725a25c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH List.heapify 3 2025-10-11 "Tomo man-pages"
.SH NAME
List.heapify \- convert a list into a heap
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI List.heapify\ :\ func(list:\ @[T],\ by:\ func(x,y:&T->Int32)\ =\ T.compare\ ->\ Void)
.fi
.SH DESCRIPTION
Converts a list into a heap.
.SH ARGUMENTS
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
list @[T] The mutable reference to the list to be heapified. -
by func(x,y:&T->Int32) The comparison function used to determine order. If not specified, the default comparison function for the item type will be used. T.compare
.TE
.SH RETURN
Nothing.
.SH EXAMPLES
.EX
my_heap := [30, 10, 20]
my_heap.heapify()
.EE
|