Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Heapsort()

void System.Array.SorterObjectArray.Heapsort ( int lo,
int hi )
inlineprivate

Definition at line 157 of file Array.cs.

158 {
159 int num = hi - lo + 1;
160 for (int num2 = num / 2; num2 >= 1; num2--)
161 {
162 DownHeap(num2, num, lo);
163 }
164 for (int num3 = num; num3 > 1; num3--)
165 {
166 Swap(lo, lo + num3 - 1);
167 DownHeap(1, num3 - 1, lo);
168 }
169 }
void Swap(int i, int j)
Definition Array.cs:53
void DownHeap(int i, int n, int lo)
Definition Array.cs:171

References System.Array.SorterObjectArray.DownHeap(), and System.Array.SorterObjectArray.Swap().

Referenced by System.Array.SorterObjectArray.IntroSort().