Add priority queue interface with a binary heap–based implementation#6873
Conversation
michaellilltokiwa
left a comment
There was a problem hiding this comment.
Lots of small(er) comments from me, sorry. Overall structure is pretty much what I would expect. We have a mutable queue definition with enqueue/dequeue functionality. Of to a good start!
|
|
||
| # unordered elements to construct the queue from | ||
| # | ||
| initial_elements option (Sequence T)) ref : container.Mutable_Priority_Queue T is |
There was a problem hiding this comment.
Since this constructor is not public anyway, I would probably prefer all initialization to be done outside of the constructor. So it would have elements as an arg instead of initial_elements.
This way the constructor does not not contain any code which may make error handling more easy.
236188b to
183dd6b
Compare
8189688 to
8ddb796
Compare
michaellilltokiwa
left a comment
There was a problem hiding this comment.
I think the histogram is a good start.
What I'm missing is - the probably most important metric - is WCET (worst case execution time). An also some heuristic how the determine if this is within a certain range.
31c987c to
6e3d5be
Compare
There was a problem hiding this comment.
Good work!
I have a number of comments, but mostly some more documentation and some code that I would like to see at other places, so nothing major to commplain.
I have not checked the tests and benchmarks yet, but that should not be blocking.
Some comments can be addressed later, so do not consider them as blocking your documentation etc.
as well as peek and contains
fridis
left a comment
There was a problem hiding this comment.
The test is already good in the sense that it covers diifferent and important cases.
I made a number of suggestions how this test could be more systematic. Please just pick and chose comments that you would like to include in your thesis and ignore what is too much for now.
Some design decisions (like using a compare function instead of property.orderable, adding min/max variants, etc.) result in an explosion of configurations and make it harder to test this. At a later point in time, I would like you to revisit these decisions.
* use `as_string_tree_vertical` more often * don't mix output with feature `expect` * have `expect` print nothing in case of success
8e07adf to
30779ec
Compare
No description provided.