adiar
adiar copied to clipboard
Generalise Top-Down Priority Queue(s) logic into a Request Manager
Follow-up on #397 .
In that refactor we provide a major clean-up of all the prior code. But, we can improve the code quality even more, by generalising the use of priority queues in a single class that manages all the requests.
- [ ] Use the new Request class in top-down algorithms
- [x] count
- [ ] pred
- [ ] intercut
- [x] prod2
- [x] prod3
- [x] quantify
- [x] select
- [ ] Create request_manager class to centralize logic for interactions with the priority queues. This class has template arguments quite similar to
request
. It includes the logic- The type of a request.
- The top() logic merging one or more priority queues.
- The forwarding logic, copying the children of the current node(s) into a request placed in a per-level priority queue.
- The level merger logic for one or more nodes.
- The pull all ingoing arcs logic.
- [ ] Use the new Request Manager in top-down algorithms
- [ ] count
- [ ] pred
- [ ] intercut
- [ ] prod2
- [ ] prod3
- [ ] quantify
- [ ] substitute