<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Priority Queues and the STL</title>
	<link>http://marknelson.us/1996/01/01/priority-queues/</link>
	<description>Programming, mostly.</description>
	<pubDate>Fri, 12 Mar 2010 02:27:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: Mark Nelson</title>
		<link>http://marknelson.us/1996/01/01/priority-queues/#comment-320300</link>
		<dc:creator>Mark Nelson</dc:creator>
		<pubDate>Mon, 21 Dec 2009 18:50:01 +0000</pubDate>
		<guid>http://marknelson.us/1996/01/01/priority-queues/#comment-320300</guid>
		<description>@Javier:

The priority queue algorithm does not allow for random access such as you are proposing.

In order to do what you would like, you would need to perform the deletion on the underlying container, then rebuild the priority queue, paying the rebuild cost.

- Mark</description>
		<content:encoded><![CDATA[<p>@Javier:</p>
<p>The priority queue algorithm does not allow for random access such as you are proposing.</p>
<p>In order to do what you would like, you would need to perform the deletion on the underlying container, then rebuild the priority queue, paying the rebuild cost.</p>
<p>- Mark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javier Macias</title>
		<link>http://marknelson.us/1996/01/01/priority-queues/#comment-320299</link>
		<dc:creator>Javier Macias</dc:creator>
		<pubDate>Mon, 21 Dec 2009 18:46:36 +0000</pubDate>
		<guid>http://marknelson.us/1996/01/01/priority-queues/#comment-320299</guid>
		<description>I have a priority queue that store Edge elements of a Mesh. That is because my algorithm needs to process the Edge using a priority in base an angle.
My problem is sometimes i need to erase an edge of this list of edges to process...
is it possible use an iterator to navigate in my priority queue and the erase a random element? If i could obtain the protected container (vector) i could do it.

thanks.</description>
		<content:encoded><![CDATA[<p>I have a priority queue that store Edge elements of a Mesh. That is because my algorithm needs to process the Edge using a priority in base an angle.<br />
My problem is sometimes i need to erase an edge of this list of edges to process&#8230;<br />
is it possible use an iterator to navigate in my priority queue and the erase a random element? If i could obtain the protected container (vector) i could do it.</p>
<p>thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nelson</title>
		<link>http://marknelson.us/1996/01/01/priority-queues/#comment-303539</link>
		<dc:creator>Mark Nelson</dc:creator>
		<pubDate>Wed, 27 May 2009 13:13:59 +0000</pubDate>
		<guid>http://marknelson.us/1996/01/01/priority-queues/#comment-303539</guid>
		<description>@mj:

That is what this article does. Read it.</description>
		<content:encoded><![CDATA[<p>@mj:</p>
<p>That is what this article does. Read it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maria JOSe</title>
		<link>http://marknelson.us/1996/01/01/priority-queues/#comment-303497</link>
		<dc:creator>Maria JOSe</dc:creator>
		<pubDate>Wed, 27 May 2009 07:06:24 +0000</pubDate>
		<guid>http://marknelson.us/1996/01/01/priority-queues/#comment-303497</guid>
		<description>Necesito ayuda para hacer una practica de arboles huffman con colas con prioridad en un minheap, donde los datos de las frecuencias estan en un fichero binario, por favor alguien me puede ayudar.</description>
		<content:encoded><![CDATA[<p>Necesito ayuda para hacer una practica de arboles huffman con colas con prioridad en un minheap, donde los datos de las frecuencias estan en un fichero binario, por favor alguien me puede ayudar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dtg</title>
		<link>http://marknelson.us/1996/01/01/priority-queues/#comment-281416</link>
		<dc:creator>dtg</dc:creator>
		<pubDate>Fri, 06 Mar 2009 14:19:19 +0000</pubDate>
		<guid>http://marknelson.us/1996/01/01/priority-queues/#comment-281416</guid>
		<description>@Mark Nelson

I thought something like that might be the reason. Thank you for clarifying!</description>
		<content:encoded><![CDATA[<p>@Mark Nelson</p>
<p>I thought something like that might be the reason. Thank you for clarifying!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nelson</title>
		<link>http://marknelson.us/1996/01/01/priority-queues/#comment-281236</link>
		<dc:creator>Mark Nelson</dc:creator>
		<pubDate>Fri, 06 Mar 2009 06:27:40 +0000</pubDate>
		<guid>http://marknelson.us/1996/01/01/priority-queues/#comment-281236</guid>
		<description>@dtg:

In order to have a priority queue, you need to define what type of container will be used to implement the queue. That's what the "vector" part of the declaration is for.

In order to have a priority queue, you need to know how to order elements. The "greater" definition defines a functor that can be used to compare two elements in two nodes so they can be ordered.

- Mark</description>
		<content:encoded><![CDATA[<p>@dtg:</p>
<p>In order to have a priority queue, you need to define what type of container will be used to implement the queue. That&#8217;s what the &#8220;vector&#8221; part of the declaration is for.</p>
<p>In order to have a priority queue, you need to know how to order elements. The &#8220;greater&#8221; definition defines a functor that can be used to compare two elements in two nodes so they can be ordered.</p>
<p>- Mark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dtg</title>
		<link>http://marknelson.us/1996/01/01/priority-queues/#comment-281097</link>
		<dc:creator>dtg</dc:creator>
		<pubDate>Fri, 06 Mar 2009 01:05:42 +0000</pubDate>
		<guid>http://marknelson.us/1996/01/01/priority-queues/#comment-281097</guid>
		<description>This is a very helpful article.  I have a question about the following line of code in the Visual C++ source though:

priority_queue, greater &#62; q;

I understand the reason for the "node" argument, but am confused about the "vector" and "greater" arguments.  What are their purpose in the code?  They do not seem to be used anywhere.</description>
		<content:encoded><![CDATA[<p>This is a very helpful article.  I have a question about the following line of code in the Visual C++ source though:</p>
<p>priority_queue, greater &gt; q;</p>
<p>I understand the reason for the &#8220;node&#8221; argument, but am confused about the &#8220;vector&#8221; and &#8220;greater&#8221; arguments.  What are their purpose in the code?  They do not seem to be used anywhere.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://marknelson.us/1996/01/01/priority-queues/#comment-86665</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 19 Feb 2008 12:43:42 +0000</pubDate>
		<guid>http://marknelson.us/1996/01/01/priority-queues/#comment-86665</guid>
		<description>@musically_ut:

Yes, this article was written in 1996, before the standard was issued, so the source code is dated. Fortunately the fixes are fairly minor.</description>
		<content:encoded><![CDATA[<p>@musically_ut:</p>
<p>Yes, this article was written in 1996, before the standard was issued, so the source code is dated. Fortunately the fixes are fairly minor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: musically_ut</title>
		<link>http://marknelson.us/1996/01/01/priority-queues/#comment-86463</link>
		<dc:creator>musically_ut</dc:creator>
		<pubDate>Tue, 19 Feb 2008 07:19:49 +0000</pubDate>
		<guid>http://marknelson.us/1996/01/01/priority-queues/#comment-86463</guid>
		<description>A nice article, but I think I notice something that is may be a little out-of-date. I don't see an 

#include 

in the example. I haven't tried the whole example, but I think now its necessary to include queue to use priority_queue.

~musically_ut</description>
		<content:encoded><![CDATA[<p>A nice article, but I think I notice something that is may be a little out-of-date. I don&#8217;t see an </p>
<p>#include </p>
<p>in the example. I haven&#8217;t tried the whole example, but I think now its necessary to include queue to use priority_queue.</p>
<p>~musically_ut</p>
]]></content:encoded>
	</item>
</channel>
</rss>
