/usr/share/axiom-20170501/src/algebra/QUAGG.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | )abbrev category QUAGG QueueAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
++ Date Last Updated: April 1991
++ Description:
++ A queue is a bag where the first item inserted is the first
++ item extracted.
QueueAggregate(S) : Category == SIG where
S : Type
SIG ==> BagAggregate S with
finiteAggregate
enqueue_! : (S, %) -> S
++ enqueue!(x,q) inserts x into the queue q at the back end.
dequeue_! : % -> S
++ dequeue! s destructively extracts the first (top) element
++ from queue q. The element previously second in the queue becomes
++ the first element. Error: if q is empty.
rotate_! : % -> %
++ rotate! q rotates queue q so that the element at the front of
++ the queue goes to the back of the queue.
++ Note that rotate! q is equivalent to enqueue!(dequeue!(q)).
length : % -> NonNegativeInteger
++ length(q) returns the number of elements in the queue.
++ Note that \axiom{length(q) = #q}.
front : % -> S
++ front(q) returns the element at the front of the queue.
++ The queue q is unchanged by this operation.
++ Error: if q is empty.
back : % -> S
++ back(q) returns the element at the back of the queue.
++ The queue q is unchanged by this operation.
++ Error: if q is empty.
|