Navigation
API > API/Runtime > API/Runtime/GeometryCore
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.
| Name | FIndexPriorityQueue |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Util/IndexPriorityQueue.h |
| Include Path | #include "Util/IndexPriorityQueue.h" |
Syntax
class FIndexPriorityQueue
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| This constructor is provided for convenience, you must call Initialize() | Util/IndexPriorityQueue.h | ||
FIndexPriorityQueue
(
int maxID |
Calls Initialize() | Util/IndexPriorityQueue.h |
Structs
| Name | Remarks |
|---|---|
| FQueueNode |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| EnableDebugChecks | bool | Set this to true during development to catch issues | Util/IndexPriorityQueue.h | |
| id_to_index | TArray< int > | Mapping from external ids to internal node indices | Util/IndexPriorityQueue.h | |
| nodes | TDynamicVector< FQueueNode > | Tree of allocated nodes, stored linearly. active up to num_nodes (allocated may be larger) | Util/IndexPriorityQueue.h | |
| num_nodes | int | Count of active nodes | Util/IndexPriorityQueue.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool CheckIds() |
Check if node ordering is correct (for debugging/testing) | Util/IndexPriorityQueue.h | |
void Clear
(
bool bFreeMemory |
Reset the queue to empty state. | Util/IndexPriorityQueue.h | |
bool Contains
(
int NodeID |
Util/IndexPriorityQueue.h | ||
int Dequeue() |
Remove node at head of queue, update queue, and return id for that node | Util/IndexPriorityQueue.h | |
int GetCount() |
Util/IndexPriorityQueue.h | ||
int GetFirstNodeID() |
Util/IndexPriorityQueue.h | ||
float GetFirstNodePriority() |
Util/IndexPriorityQueue.h | ||
float GetPriority
(
int id |
Query the priority at node id, assuming it exists in queue. | Util/IndexPriorityQueue.h | |
void Initialize
(
int MaxNodeID |
Initialize internal data structures. | Util/IndexPriorityQueue.h | |
void Insert
(
int NodeID, |
Add id to list w/ given priority. Do not call with same id twice! | Util/IndexPriorityQueue.h | |
bool IsValidQueue() |
Check if node ordering is correct (for debugging/testing) | Util/IndexPriorityQueue.h | |
void Remove
(
int NodeID |
Remove node associated with given ID from queue. | Util/IndexPriorityQueue.h | |
void Update
(
int NodeID, |
Update priority at node id, and then move it to correct position in queue. | Util/IndexPriorityQueue.h |