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