image thumbnail
from Priority Queue (MEX/C++) by Andrea Tagliasacchi
An efficient priority queue implementation in C++

pq_pop.m
% PQ_POP removes the topmost element of the priority queue
%
% SYNTAX
% [idx, cost] = pq_pop(pq)
%
% INPUT PARAMETERS
%   pq: a pointer to the priority queue
%
% OUTPUT PARAMETERS
%   idx: the index of the popped element
%   cost: the cost of the popped element
% 
% DESCRIPTION
% Removes the topmost element from a priority queue and return its content.
%  
% See also:
% PQ_DEMO, PQ_CREATE, PQ_PUSH, PQ_POP, PQ_SIZE, PQ_TOP, PQ_DELETE
%
% References:
% Gormen, T.H. and Leiserson, C.E. and Rivest, R.L., "introduction to
% algorithms", 1990, MIT Press/McGraw-Hill, Chapter 6. 

% Copyright (c) 2008 Andrea Tagliasacchi
% All Rights Reserved
% email: andrea.tagliasacchi@gmail.com
% $Revision: 1.0$  Created on: May 22, 2009

Contact us at files@mathworks.com