🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++.leda
Article #65

Re: Missing feature in p_queue

#65
From: Ulrich Lauther
Date: Fri, 01 Sep 1995 07:58
24 lines
1433 bytes
Muzzulini Frank (hb04@rz70.rz.uni-karlsruhe.de) wrote:
: I had to implement a shortest path algorithm and since I didn't use
: LEDA-Graphs and nodes, I tried to implement Dijkstra's Algorithm with
: a normal p_queue. But then I found, that given a specific information
: which must be in the queue, I can't find the associated pq_item and
: without that, I can't decrease the priority or delete the information
: out of the queue.
: 
: It seems to me, there should be a member
: 
: 	pq_item Q.find(I i)
: 
: in class p_queue, or have I missed something?
: 
you should store the item at the time you create it, e.g. in your node.
To search for it would be a waste of time. Allowing to remember a "finger"
into the datastructure is the main purpose of the item concept.
-- 
	-lauther

[nosave]
----------------------------------------------------------------------------
Ulrich Lauther          ph: +49 89 636 48834 fx: ... 636 42284
Siemens ZFE BT SE 14    Internet: lauther@ztivax.zfe.siemens.de
Technical Details
Message-ID: <426ef6$44s@outlaw.zfe.siemens.de>
Path: arc1-ca.pugleaf.net!cayley.zfe.siemens.de!not-for-mail
References: <BMC4BCOG@inka.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cayley.zfe.siemens.de!not-for-mail
From: lauther@cayley.zfe.siemens.de (Ulrich Lauther)
Newsgroups: comp.lang.c++.leda
Subject: Re: Missing feature in p_queue
Date: 1 Sep 1995 07:58:30 GMT
Organization: Siemens
Distribution: world
Message-ID: <426ef6$44s@outlaw.zfe.siemens.de>
References: <BMC4BCOG@inka.de>
NNTP-Posting-Host: cayley.zfe.siemens.de
X-Newsreader: TIN [UNIX 1.3 950515BETA PL0]