schedgym package¶
Subpackages¶
Submodules¶
schedgym.resource module¶
schedgym.cluster module¶
schedgym.event module¶
schedgym.heap module¶

heap - A Priority Queue based on the heapq module.
- class schedgym.heap.Heap¶
Bases:
Generic[schedgym.heap.T]A Priority Queue that is backed by a heap data structure.
To reduce the computational cost of key removal, this class wastes a bit memory by not actually deleting items.
- add(item, priority=0) None¶
Add a new item or update the priority of an existing item
- entry_finder: Dict[Optional[schedgym.heap.T], Tuple[int, int, List[Optional[schedgym.heap.T]]]]¶
Cache to check in O(1) whether an entry exists in the heap.
- property first: Optional[schedgym.heap.T]¶
Returns the “first” item (highest priority item) in the Heap.
- heapsort() Generator[schedgym.heap.T, None, None]¶
Generator that iterates over all elements in the heap in priority order.
- pop() schedgym.heap.T¶
Remove and return the lowest priority task.
Raises KeyError if empty.
- priority_queue: List[Tuple[int, int, List[Optional[schedgym.heap.T]]]]¶
The actual priority queue, implemented as a list with heap ordering.
- remove(item) None¶
Mark an existing item as removed. Raise KeyError if not found.