Package | org.rapidphysics.system |
Class | public class RapidHeap |
Inheritance | RapidHeap ![]() |
Property | Defined By | ||
---|---|---|---|
length : int [read-only] | RapidHeap |
Method | Defined By | ||
---|---|---|---|
RapidHeap(pCompare:Function) | RapidHeap | ||
clear():void | RapidHeap | ||
Add the element on the bottom level of the heap. | RapidHeap | ||
isEmpty():Boolean | RapidHeap | ||
remove the root
put the bottom element in its place
heapify
| RapidHeap |
length | property |
length:int
[read-only] public function get length():int
RapidHeap | () | Constructor |
public function RapidHeap(pCompare:Function)
pCompare:Function |
clear | () | method |
public function clear():void
insert | () | method |
public function insert(obj:Collision):void
Add the element on the bottom level of the heap. Compare the added element with its parent; if they are in the correct order, stop. If not, swap the element with its parent and return to the previous step.
Parameters
obj:Collision |
isEmpty | () | method |
public function isEmpty():Boolean
ReturnsBoolean |
removeMin | () | method |
public function removeMin():Collision
remove the root put the bottom element in its place heapify
ReturnsCollision —
|