Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Util
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Util/IndexPriorityQueue.h |
| Include | #include "Util/IndexPriorityQueue.h" |
Syntax
class FIndexPriorityQueue
Remarks
This is a min-heap priority queue class that does not use an object for each queue node. Integer IDs must be provided by the user to identify unique nodes. Internally an array is used to keep track of the mapping from ids to internal indices, so the max ID must also be provided.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | EnableDebugChecks | Set this to true during development to catch issues | |
| TArray< int > | id_to_index | Mapping from external ids to internal node indices | |
| TDynamicVector< FQueueNode > | nodes | Tree of allocated nodes, stored linearly. active up to num_nodes (allocated may be larger) | |
| int | num_nodes | Count of active nodes |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| This constructor is provided for convenience, you must call Initialize() | |||
FIndexPriorityQueue
(
int maxID |
Calls Initialize() |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | CheckIds () |
Check if node ordering is correct (for debugging/testing) | |
| void | Clear
(
bool bFreeMemory |
Reset the queue to empty state. | |
| bool | Contains
(
int NodeID |
||
| int | Dequeue () |
Remove node at head of queue, update queue, and return id for that node | |
| int | GetCount () |
||
| int | |||
| float | |||
| float | GetPriority
(
int id |
Query the priority at node id, assuming it exists in queue. | |
| void | Initialize
(
int MaxNodeID |
Initialize internal data structures. | |
| void | Insert
(
int NodeID, |
Add id to list w/ given priority. Do not call with same id twice! | |
| bool | IsValidQueue () |
Check if node ordering is correct (for debugging/testing) | |
| void | Remove
(
int NodeID |
Remove node associated with given ID from queue. | |
| void | Update
(
int NodeID, |
Update priority at node id, and then move it to correct position in queue. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FQueueNode |