GenericPriorityQueueNode.cs 755 B

123456789101112131415161718192021222324252627
  1. namespace IFramework.Queue
  2. {
  3. /// <summary>
  4. /// 泛型优先级队列节点
  5. /// </summary>
  6. /// <typeparam name="TPriority">优先程度</typeparam>
  7. public class GenericPriorityQueueNode<TPriority>
  8. {
  9. /// <summary>
  10. /// 节点元素的优先级 <br />
  11. /// 无法修改 - 请查阅 queue.Enqueue() 和 queue.UpdatePriority()
  12. /// </summary>
  13. public TPriority priority { get; protected internal set; }
  14. /// <summary>
  15. /// 当前元素在队列中的位置
  16. /// </summary>
  17. public int position { get; internal set; }
  18. /// <summary>
  19. /// 元素插入时的序号
  20. /// </summary>
  21. public long insertPosition { get; internal set; }
  22. }
  23. }