![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <IndexPriorityQueue.h>
Classes | |
| struct | FQueueNode |
Public Member Functions | |
| FIndexPriorityQueue () | |
| FIndexPriorityQueue (int maxID) | |
| void | Initialize (int MaxNodeID) |
| void | Clear (bool bFreeMemory=true) |
| int | GetCount () const |
| int | GetFirstNodeID () const |
| float | GetFirstNodePriority () const |
| bool | Contains (int NodeID) const |
| void | Insert (int NodeID, float priority) |
| int | Dequeue () |
| void | Remove (int NodeID) |
| void | Update (int NodeID, float Priority) |
| float | GetPriority (int id) |
| bool | IsValidQueue () const |
| bool | CheckIds () |
Public Attributes | |
| bool | EnableDebugChecks = false |
| TDynamicVector< FQueueNode > | nodes |
| int | num_nodes |
| TArray< int > | id_to_index |
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.
|
inline |
This constructor is provided for convenience, you must call Initialize()
|
inline |
Calls Initialize()
| maxID | maximum external ID that will be passed to any public functions |
|
inline |
Check if node ordering is correct (for debugging/testing)
Reset the queue to empty state. if bFreeMemory is false, we don't discard internal data structures, so there will be less allocation next time
|
inline |
|
inline |
Remove node at head of queue, update queue, and return id for that node
|
inline |
|
inline |
|
inline |
|
inline |
Query the priority at node id, assuming it exists in queue. Behavior is undefined if you call w/ id that is not in queue
|
inline |
Initialize internal data structures. Internally a fixed-size array is used to track mapping from IDs to internal node indices, so maxID must be provided up-front. If this seems problematic or inefficient, this is not the Priority Queue for you.
| MaxNodeID | maximum external ID that will be passed to any public functions |
Add id to list w/ given priority. Do not call with same id twice!
|
inline |
Check if node ordering is correct (for debugging/testing)
|
inline |
Remove node associated with given ID from queue. Behavior is undefined if you call w/ id that is not in queue
Update priority at node id, and then move it to correct position in queue. Behavior is undefined if you call w/ id that is not in queue
set this to true during development to catch issues
| TArray<int> UE::Geometry::FIndexPriorityQueue::id_to_index |
mapping from external ids to internal node indices
| TDynamicVector<FQueueNode> UE::Geometry::FIndexPriorityQueue::nodes |
tree of allocated nodes, stored linearly. active up to num_nodes (allocated may be larger)
| int UE::Geometry::FIndexPriorityQueue::num_nodes |
count of active nodes