Xonotic
|
Go to the source code of this file.
Macros | |
#define | heapify(_count) |
#define | siftdown(_start, _end) |
Typedefs | |
using | comparefunc_t = int(int i1, int i2, entity pass) |
<0 for <, ==0 for ==, >0 for > (like strcmp) More... | |
using | swapfunc_t = void(int i1, int i2, entity pass) |
is only ever called for i1 < i2 More... | |
Functions | |
ERASEABLE void | heapsort (int n, swapfunc_t swap, comparefunc_t cmp, entity pass) |
ERASEABLE void | shuffle (float n, swapfunc_t swap, entity pass) |
#define heapify | ( | _count | ) |
Referenced by heapsort().
#define siftdown | ( | _start, | |
_end | |||
) |
Referenced by heapsort().
ERASEABLE void heapsort | ( | int | n, |
swapfunc_t | swap, | ||
comparefunc_t | cmp, | ||
entity | pass | ||
) |
Definition at line 9 of file sort.qh.
References ERASEABLE, heapify, and siftdown.
Referenced by _MapInfo_FilterGametype(), Dump_Weapon_Settings(), HUD_Weapons(), MapInfo_FilterString(), and W_FixWeaponOrder_BuildImpulseList().
ERASEABLE void shuffle | ( | float | n, |
swapfunc_t | swap, | ||
entity | pass | ||
) |
Definition at line 42 of file sort.qh.
References floor(), and random().
Referenced by shufflewords().