DS Priority Queues

A ds_priority is a data structure based on the importance value of the information it contains.

A ds_priority queue is a special data structure similar to a ds_queue, only here the queue of values is ordered by the priorities (always real numbers) that the values have been assigned. This structure can be very useful for constructing leaderboards or information lists where the importance of each entry can be weighted.

NOTE: As with all dynamic resources, data structures take up memory and so should always be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.

The following functions exist that deal with ds_priority queues:

  1. ds_priority_create
  2. ds_priority_destroy
  3. ds_priority_clear
  4. ds_priority_empty
  5. ds_priority_size
  6. ds_priority_add
  7. ds_priority_change_priority
  8. ds_priority_delete_max
  9. ds_priority_delete_min
  10. ds_priority_delete_value
  11. ds_priority_find_max
  12. ds_priority_find_min
  13. ds_priority_find_priority
  14. ds_priority_copy
  15. ds_priority_read
  16. ds_priority_write
NOTE: if you need to check if a data structure exists, you can use the ds_exists() function.


Back: Data Structures
Next: DS Grids
© Copyright YoYo Games Ltd. 2018 All Rights Reserved