1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
<head><title>rsm.queue</title>
<meta http-equiv="Expires" content="Jan 1 1990 00:00:00 GMT" />
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<meta name="Copyright" content="R. Scott McIntire 2003 <rscottmcintire@users.sourceforge.net>" />
<meta name="description" content="Queing functions" />
<meta name="author" content="R. Scott McIntire" />
<meta name="keywords" content="queues, Lisp" />
<meta name="generator" content="LML2-1.4.1" />
<center><h1>Documentation for package rsm.queue</h1></center></head>
<body bgcolor="#C5C5C5"><hr color="lightred" style="height=10" /><p></p>
<table border="10" bordercolor="navyblue" align="center" cellspacing="15"><tr bgcolor="#A5A5A5"><td><h2>Author : R. Scott McIntire</h2>
<h2>Version: 1.1</h2>
<h2>Overview:</h2>
<pre>This package provides the usual queuing functions.
<b style="color:darkblue">Export Summary:</b>
<b style="color:darkblue">
append-queue :</b> Create a new queue which concatenates queues.<b style="color:darkblue">
nappend-queue:</b> Similar to nconc, but for queues.<b style="color:darkblue">
create :</b> Create a new queue.<b style="color:darkblue">
do-queue :</b> Control structure for queue: Like dolist but for queues.
Each element is formed by dequeuing a copy of the original queue.<b style="color:darkblue">
do-nqueue :</b> Control structure for queue: Like dolist but for queues.
Each element is formed by dequeuing the original queue.
This function is destructive.<b style="color:darkblue">
empty-p :</b> Is this queue empty?<b style="color:darkblue">
enqueue :</b> Enqueue an element onto a queue.<b style="color:darkblue">
dequeue :</b> Dequeue a queue (returning the dequeued element).<b style="color:darkblue">
get-first :</b> Get the first element of the queue. The next element to be
dequeued.<b style="color:darkblue">
get-last :</b> Get the last element of the queue. The last element to be
dequeued.<b style="color:darkblue">
nget-list :</b> Get the list of the queue. Does NOT make a copy.<b style="color:darkblue">
list->queue :</b> Returns a copy of a list as a queue.<b style="color:darkblue">
queue :</b> A type for queues.<b style="color:darkblue">
queue-p :</b> Returns true if argument is a queue.<b style="color:darkblue">
queue->list :</b> Returns a copy of the list of the queue.<b style="color:darkblue">
nsort-queue :</b> Sort a queue in place.<b style="color:darkblue">
sort-queue :</b> Sort a copy of a queue.</pre>
</td></tr><tr bgcolor="#C5C5C5"></tr><tr bgcolor="#C5C5C5"><td>
<h2 style="color=darkblue">append-queue<b style="color=blue">  (&rest queues)</b></h2><pre>Create a new queue which appends the other queues. The original queues are
not changed.</pre>
<h2 style="color=darkblue">copy-queue<b style="color=blue">  (que)</b></h2><pre>Copy a queue.</pre>
<h2 style="color=darkblue">create<b style="color=blue">  (&optional obj)</b></h2><pre>Create a queue. If <em style="color:blue"><obj></em> is non nil queue it up. In order to create a queue
with nil as the first element, call queue with no arguments and then call
enqueue with nil as the value to queue.</pre>
<h2 style="color=darkblue">dequeue<b style="color=blue">  (queue)</b></h2><pre>Dequeue an object. Return the object queued.</pre>
<h2 style="color=darkblue">do-nqueue<b style="color=blue">  ((var que &optional result) &body body)</b></h2><pre>Loop construct for queues that sets <em style="color:blue"><var></em> to the successive values of the
queue, <em style="color:blue"><que></em>, (by dequeuing) and then evaluates <em style="color:blue"><body></em>. If the symbol <em style="color:blue"><result></em>
is supplied, its value is returned when the iteration is finished.<div style="color:darkgreen">
Example: (rsm.queue:do-nqueue (item que) (format t "queue item = ~s~%" item)) </div>
This drains the queue, <em style="color:blue"><que></em>, printing each of the elements of the queue. <b style="color:red">
Note: </b> This is a destructive function. If <em style="color:blue"><body></em> mutates <em style="color:blue"><que></em>, this
construct could go into an infinite loop.</pre>
<h2 style="color=darkblue">do-queue<b style="color=blue">  ((var que &optional result) &body body)</b></h2><pre>Loop construct for queues that sets <em style="color:blue"><var></em> to the successive values of a copy
of the queue, <em style="color:blue"><que></em>, (by dequeuing) and then evaluates <em style="color:blue"><body></em>. If the symbol
<em style="color:blue"><result></em> is supplied, its value is returned when the iteration is finished.<div style="color:darkgreen">
Example: (rsm.queue:do-queue (item que) (format t "queue item = ~s~%" item)) </div>
This drains a copy of the queue, <em style="color:blue"><que></em>, printing each of the elements
of the queue.</pre>
<h2 style="color=darkblue">empty-p<b style="color=blue">  (queue)</b></h2><pre>Is the queue empty?</pre>
<h2 style="color=darkblue">enqueue<b style="color=blue">  (obj queue)</b></h2><pre>Enqueue an object. Return the queue.</pre>
<h2 style="color=darkblue">get-first<b style="color=blue">  (queue)</b></h2><pre>Get the next element the queue would dequeue. Does not affect the queue.</pre>
<h2 style="color=darkblue">get-last<b style="color=blue">  (queue)</b></h2><pre>Get the last element the queue would dequeue. Does not affect the queue.</pre>
<h2 style="color=darkblue">list->queue<b style="color=blue">  (list)</b></h2><pre>Return a copy of the list as a queue.</pre>
<h2 style="color=darkblue">nappend-queue<b style="color=blue">  (&rest queues)</b></h2><pre>Append (destructively (like nconc) the queues <em style="color:blue"><queues></em> essentially by
nconsing the internal list of the first nonempty queue with the lists from the
rest of the non empty queues. <b style="color:red">
Note: </b> After this operation, do not use the other queues.</pre>
<h2 style="color=darkblue">nget-list<b style="color=blue">  (queue)</b></h2><pre>Get the internal list of queue, <em style="color:blue"><queue></em>. The integrity of the queue cannot be
guaranteed if this list is destructively modified.</pre>
<h2 style="color=darkblue">nsort-queue<b style="color=blue">  (queue sort-func)</b></h2><pre>Sort a queue, <em style="color:blue"><queue></em>, in place using sort function <em style="color:blue"><sort-func></em>.</pre>
<h2 style="color=darkblue">queue->list<b style="color=blue">  (que)</b></h2><pre>Return a copy of the queue as a list, from 'first in' to 'last in'.</pre>
<h2 style="color=darkblue">queue-p<b style="color=blue">  (que)</b></h2><pre>Returns true if <em style="color:blue"><que></em> is a queue.</pre>
<h2 style="color=darkblue">sort-queue<b style="color=blue">  (queue sort-func)</b></h2><pre>Sort a copy of queue, <em style="color:blue"><queue></em>, using sort function <em style="color:blue"><sort-func></em>.</pre></td></tr></table></body>
|