diff options
Diffstat (limited to 'Software/Visual_Studio/SideChains/Priority Queue/GenericPriorityQueueNode.cs')
| -rw-r--r-- | Software/Visual_Studio/SideChains/Priority Queue/GenericPriorityQueueNode.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Software/Visual_Studio/SideChains/Priority Queue/GenericPriorityQueueNode.cs b/Software/Visual_Studio/SideChains/Priority Queue/GenericPriorityQueueNode.cs new file mode 100644 index 000000000..5a53ed24e --- /dev/null +++ b/Software/Visual_Studio/SideChains/Priority Queue/GenericPriorityQueueNode.cs @@ -0,0 +1,29 @@ +namespace Priority_Queue +{ + public class GenericPriorityQueueNode<TPriority> + { + /// <summary> + /// The Priority to insert this node at. Must be set BEFORE adding a node to the queue (ideally just once, in the node's constructor). + /// Should not be manually edited once the node has been enqueued - use queue.UpdatePriority() instead + /// </summary> + public TPriority Priority { get; protected internal set; } + + /// <summary> + /// Represents the current position in the queue + /// </summary> + public int QueueIndex { get; internal set; } + + /// <summary> + /// Represents the order the node was inserted in + /// </summary> + public long InsertionIndex { get; internal set; } + + +#if DEBUG + /// <summary> + /// The queue this node is tied to. Used only for debug builds. + /// </summary> + public object Queue { get; internal set; } +#endif + } +} |
