Class TPriorityQueue (unit EZDSLPQu) |
Inherits from
TAbstractContainer
---Place any compiler options you require here----------------------} {--------------------------------------------------------------------} {$I EZDSLOPT.INC
constructor Clone(Source : TAbstractContainer;
DataOwner : boolean; NewCompare : TCompareFunc);
- --------
constructor Create(DataOwner : boolean);
- ===TPriorityQueue====================================================
A priority queue
Much like an ordinary queue, expect that the smallest data object in
the queue is popped first.
procedure Append(aData : pointer);
--------
procedure Empty;
--------
function Examine : pointer;
--------
function Pop : pointer;
--------
function Replace(aData : pointer) : pointer;
--------
procedure acSort;
--------
procedure pqAppendPrim(aNode : PNode);
--------
procedure pqBubbleUp(Node : PNode);
--------
function pqGetNodeFromIndex(Inx : longint) : PNode;
--------
procedure pqSortTraverse(aNode : PNode);
--------
procedure pqTrickleDown(Node : PNode);
--------
pqRt : PNode;
constructor Clone(Source : TAbstractContainer;
DataOwner : boolean; NewCompare : TCompareFunc);
--------
constructor Create(DataOwner : boolean);
===TPriorityQueue====================================================
A priority queue
Much like an ordinary queue, expect that the smallest data object in
the queue is popped first. Another name for a priority queue is a
heap.
If the Compare method returns values in the 'normal' sense (ie -1 if
Data1 < Data2, etc), then data objects will be popped off smallest
first, ie in increasing order. If Compare returns values in the
'reverse' sense (ie -1 if Data1 > Data2, etc), then elements will be
popped off largest first, ie in decreasing order. Thus by carefully
selecting Compare, this object will provide a min-heap and a max-heap.
=====================================================================
procedure Append(aData : pointer);
--------
procedure Empty;
--------
function Examine : pointer;
--------
function Pop : pointer;
--------
function Replace(aData : pointer) : pointer;
--------
procedure acSort;
--------
procedure pqAppendPrim(aNode : PNode);
--------
procedure pqBubbleUp(Node : PNode);
--------
function pqGetNodeFromIndex(Inx : longint) : PNode;
--------
procedure pqSortTraverse(aNode : PNode);
--------
procedure pqTrickleDown(Node : PNode);
--------
pqRt : PNode;