What is a Calendar Queue?

前端 未结 3 1788
慢半拍i
慢半拍i 2021-02-05 21:25

I am working on a building a discrete event simulator. Wikipedia mentioned that there are several general purpose priority queues that are good for use in DES\'s. Specifically

3条回答
  •  囚心锁ツ
    2021-02-05 21:36

    Definition by NIST:

    A fast priority queue implementation having N buckets each with width w, or covering w time. An item with priority p more than current goes in bucket (p/w)%N. Choose N and w to have few items in each bucket. Keep items sorted within buckets. Double or halve N and change w if the number of items grows or shrinks a lot.

    Paul E. Black, "calendar queue", in Dictionary of Algorithms and Data Structures [online], Vreda Pieterse and Paul E. Black, eds. 24 January 2005. (accessed 2014-03-10) Available from: http://www.nist.gov/dads/HTML/calendarQueue.html

提交回复
热议问题