Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
simson
Beginner


Joined: 18 Oct 2000
Posts: 29
Location: Sweden

PostPosted: Thu Mar 23, 2006 1:01 pm   

Feature Request - priority queues
 
I couldn't find much but the zmud script for priority queues when I searched about it here, but having a built in priority queue that accepts any element with any key would be quite useful.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Mar 23, 2006 11:28 pm   
 
#PRIORITY {}

It's all we need.
_________________
EDIT: I didn't like my old signature
Reply with quote
simson
Beginner


Joined: 18 Oct 2000
Posts: 29
Location: Sweden

PostPosted: Thu Mar 23, 2006 11:41 pm   
 
According to the help file, that is not even remotely close to what I asked for.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Mar 24, 2006 12:41 am   
 
Well then explain what you want
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
simson
Beginner


Joined: 18 Oct 2000
Posts: 29
Location: Sweden

PostPosted: Fri Mar 24, 2006 1:06 am   
 
I want a priority queue. It is a data structure. I want to insert elements with a key into a set and then be able to take out the element with the maximum (or minimum, doesn't really matter) key.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Mar 24, 2006 2:30 am   
 
Priority queues tend to be specialized to the exact task you want to preform. While I have written one and posted it into the Finished Scripts forum, and tried to make it as generalized as possible; it obviously can not fit every need. Zugg could spend a long time trying to generate something even more general, yet still more functional then the basic #ADDITEM %sort combo. In the end it is simpler to be done with user specific needs in the first place, by a script.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Rainchild
Wizard


Joined: 10 Oct 2000
Posts: 1551
Location: Australia

PostPosted: Fri Mar 24, 2006 2:40 am   
 
Making a generic one shouldn't be too hard for Zugg, you just have the queue have 'item' and 'priority' and a custom comparer user-defined function which return -1, 0, or 1 depending on where to insert it.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net