Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IPriorityQueue.cs 882B

1234567891011121314151617181920212223
  1. using System.Collections.Generic;
  2. namespace Svelto.DataStructures
  3. {
  4. /// <summary>
  5. /// The IPriorityQueue interface. This is mainly here for purists, and in case I decide to add more implementations later.
  6. /// For speed purposes, it is actually recommended that you *don't* access the priority queue through this interface, since the JIT can
  7. /// (theoretically?) optimize method calls from concrete-types slightly better.
  8. /// </summary>
  9. public interface IPriorityQueue<T> : IEnumerable<T>
  10. where T : PriorityQueueEntityView
  11. {
  12. void Remove(T entityView);
  13. void UpdatePriority(T entityView, double priority);
  14. void Enqueue(T entityView, double priority);
  15. T Dequeue();
  16. T First { get; }
  17. int Count { get; }
  18. int MaxSize { get; }
  19. void Clear();
  20. bool Contains(T entityView);
  21. }
  22. }