<p>Specific but efficient priority queue implementation. </p>
<p>The priority type must be an integer. The queue allows to retrieve the element with highest priority but only allows pushes with a priority greater or equal to the highest priority in the queue minus one. All operations are in O(1) and the memory is in O(num elements in the queue). Elements with the same priority are retrieved with LIFO order.</p>
<p>Note(user): As far as I know, this is an original idea and is the only code that use this in the Maximum Flow context. Papers usually refer to an height-indexed array of simple linked lists of active node with the same height. Even worse, sometimes they use double-linked list to allow arbitrary height update in order to detect missing height (used for the Gap heuristic). But this can actually be implemented a lot more efficiently by just maintaining the height distribution of all the node in the graph. </p>
<pclass="definition">Definition at line <aclass="el"href="max__flow_8h_source.html#l00264">264</a> of file <aclass="el"href="max__flow_8h_source.html">max_flow.h</a>.</p>
<trclass="memdesc:a0fa26c84168a6d71010556b0d6541a1f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Is the queue empty? <ahref="#a0fa26c84168a6d71010556b0d6541a1f">More...</a><br/></td></tr>
<trclass="memdesc:ad5d7012545c74d85dd938ea6bf9e9537"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Clears the queue. <ahref="#ad5d7012545c74d85dd938ea6bf9e9537">More...</a><br/></td></tr>
<trclass="memdesc:a2662f061f688af21e19f3ac53027ed4b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Push a new element in the queue. <ahref="#a2662f061f688af21e19f3ac53027ed4b">More...</a><br/></td></tr>
<trclass="memdesc:a9597013d76010425ffc592a32ff4f259"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the element with highest priority and remove it from the queue. <ahref="#a9597013d76010425ffc592a32ff4f259">More...</a><br/></td></tr>
<pclass="definition">Definition at line <aclass="el"href="max__flow_8h_source.html#l00266">266</a> of file <aclass="el"href="max__flow_8h_source.html">max_flow.h</a>.</p>
</div>
</div>
<h2class="groupheader">Member Function Documentation</h2>
<pclass="definition">Definition at line <aclass="el"href="max__flow_8h_source.html#l00667">667</a> of file <aclass="el"href="max__flow_8h_source.html">max_flow.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="max__flow_8h_source.html#l00661">661</a> of file <aclass="el"href="max__flow_8h_source.html">max_flow.h</a>.</p>
<p>Returns the element with highest priority and remove it from the queue. </p>
<p><aclass="el"href="classoperations__research_1_1PriorityQueueWithRestrictedPush.html#a0fa26c84168a6d71010556b0d6541a1f"title="Is the queue empty?">IsEmpty()</a> must be false, this condition is DCHECKed. </p>
<pclass="definition">Definition at line <aclass="el"href="max__flow_8h_source.html#l00692">692</a> of file <aclass="el"href="max__flow_8h_source.html">max_flow.h</a>.</p>
<p>Its priority must be greater or equal to the highest priority present in the queue, minus one. This condition is DCHECKed, and violating it yields erroneous queue behavior in NDEBUG mode. </p>
<p>Since users may rely on it, we DCHECK the exact condition.</p>
<dlclass="section note"><dt>Note</dt><dd>the DCHECK() below are less restrictive than the ones above but check a necessary and sufficient condition for the priority queue to behave as expected. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="max__flow_8h_source.html#l00673">673</a> of file <aclass="el"href="max__flow_8h_source.html">max_flow.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>