The pettomato-deque Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The pettomato-deque Reference Manual

This is the pettomato-deque Reference Manual, version 0.1.1, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:23:21 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

This package contains implementations of double-ended queues (aka,
deques). See: http://en.wikipedia.org/wiki/Deque

deque is a standard double-ended queue. You can push and pop from both
ends. Other features include indexing elements from their relative
position inside the deque, iterating through the elements, and
converting the deque to a list.

ideque is a specialized deque that keeps track of the indices of the
front and back of the queue so that we may reference items by an
absolute, rather than relative, index. The idea is that you can add
elements to an ideque (push-back), pop elements off the front
(pop-front), and still reference the nth item added directly by n. It
probably doesn't make much sense to use push-front with an ideque, but
you can.

Please see the docstrings for the exported symbols for more
information.

--------------------------------
Acknowledgments

This implementation was originally based off of the deque
implementation in the arnesi package:
http://common-lisp.net/project/bese/repos/arnesi_dev/src/queue.lisp


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 pettomato-deque

Author

Austin Haas <austin@pettomato.com>

License

MIT

Description

A set of double-ended queue implementations.

Version

0.1.1

Source

pettomato-deque.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 pettomato-deque/src

Parent

pettomato-deque (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 pettomato-deque.asd

Location

pettomato-deque.asd

Systems

pettomato-deque (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 pettomato-deque/src/package.lisp

Parent

src (module)

Location

src/package.lisp

Packages

pettomato-deque


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 pettomato-deque/src/deque.lisp

Dependency

package.lisp (file)

Parent

src (module)

Location

src/deque.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.4 pettomato-deque/src/ideque.lisp

Dependency

deque.lisp (file)

Parent

src (module)

Location

src/ideque.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

5.1 pettomato-deque

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Macros

Macro: do-all-elements (ELEMENT DEQUE) &body BODY

Iterate through deque in the order that pop-front would return elements, and bind each element to element in body. element is bound using a symbol-macrolet so that the value referenced by element can be changed using setf.

Package

pettomato-deque

Source

deque.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Functions

Function: deque->list DEQUE

Returns the elements of the queue as a list. The original queue is not modified.

Package

pettomato-deque

Source

deque.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Generic functions

Generic Function: element-count QUEUE

Returns the number of elements currently in the queue.

Package

pettomato-deque

Source

deque.lisp (file)

Methods
Method: element-count (DEQUE ideque)
Source

ideque.lisp (file)

Method: element-count (DEQUE deque)
Generic Function: empty-p QUEUE

Returns a generalized boolean: true if the queue is empty, otherwise false.

Package

pettomato-deque

Source

deque.lisp (file)

Methods
Method: empty-p (DEQUE deque)
Generic Function: expire-front-to DEQUE INDEX

Move front up to index. It is permissible for index
to be greater than max-index; the queue will be cleared and min-index and max-index will be set to index. Returns deque.

Package

pettomato-deque

Source

ideque.lisp (file)

Methods
Method: expire-front-to (DEQUE ideque) INDEX
Generic Function: grow-back-to DEQUE INDEX VALUE

Ensure that deque is large enough to be indexed at
index. If not, value will be pushed on until it is. If value is a function, the function will be called and the returned value will be used. Returns deque.

Package

pettomato-deque

Source

ideque.lisp (file)

Methods
Method: grow-back-to (DEQUE ideque) INDEX VALUE
Generic Function: nth-element QUEUE INDEX

Accesses the element of the queue specified by index.

Package

pettomato-deque

Source

deque.lisp (file)

Writer

(setf nth-element) (generic function)

Methods
Method: nth-element (DEQUE ideque) INDEX
Source

ideque.lisp (file)

Method: nth-element (DEQUE deque) INDEX
Generic Function: (setf nth-element) VAL QUEUE INDEX
Package

pettomato-deque

Source

deque.lisp (file)

Reader

nth-element (generic function)

Methods
Method: (setf nth-element) VAL (DEQUE ideque) INDEX
Source

ideque.lisp (file)

Method: (setf nth-element) VAL (DEQUE deque) INDEX
Generic Function: peek-back QUEUE

Returns the element at the back of the queue without removing it from the queue.

Package

pettomato-deque

Source

deque.lisp (file)

Methods
Method: peek-back (DEQUE deque)
Generic Function: peek-front QUEUE

Returns the element at the front of the queue without removing it from the queue.

Package

pettomato-deque

Source

deque.lisp (file)

Methods
Method: peek-front (DEQUE deque)
Generic Function: pop-back QUEUE

Removes the element at the back of the queue and returns it.

Package

pettomato-deque

Source

deque.lisp (file)

Methods
Method: pop-back (DEQUE ideque) after
Source

ideque.lisp (file)

Method: pop-back (DEQUE deque)
Generic Function: pop-front QUEUE

Removes the element at the front of the queue and returns it.

Package

pettomato-deque

Source

deque.lisp (file)

Methods
Method: pop-front (DEQUE ideque) after
Source

ideque.lisp (file)

Method: pop-front (DEQUE deque)
Generic Function: push-back QUEUE VALUE

Push value on to the back of queue. Returns queue.

Package

pettomato-deque

Source

deque.lisp (file)

Methods
Method: push-back (DEQUE ideque) VALUE after
Source

ideque.lisp (file)

Method: push-back (DEQUE deque) VALUE
Generic Function: push-front QUEUE VALUE

Push value on to the front of queue. Returns queue.

Package

pettomato-deque

Source

deque.lisp (file)

Methods
Method: push-front (DEQUE ideque) VALUE after
Source

ideque.lisp (file)

Method: push-front (DEQUE deque) VALUE

Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Classes

Class: deque ()

A double ended queue.

Package

pettomato-deque

Source

deque.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

ideque (class)

Direct methods
Direct slots
Slot: head-index
Readers

head-index (generic function)

Writers

(setf head-index) (generic function)

Slot: tail-index
Readers

tail-index (generic function)

Writers

(setf tail-index) (generic function)

Slot: buffer
Readers

buffer (generic function)

Writers

(setf buffer) (generic function)

Class: ideque ()

A double ended queue that allows indexing.

Package

pettomato-deque

Source

ideque.lisp (file)

Direct superclasses

deque (class)

Direct methods
Direct slots
Slot: min-index
Initform

0

Readers

min-index (generic function)

Writers

(setf min-index) (generic function)

Slot: max-index
Initform

0

Readers

max-index (generic function)

Writers

(setf max-index) (generic function)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Macros

Macro: decf-mod PLACE DIVISOR
Package

pettomato-deque

Source

deque.lisp (file)

Macro: incf-mod PLACE DIVISOR
Package

pettomato-deque

Source

deque.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: deque-full-p DEQUE
Package

pettomato-deque

Source

deque.lisp (file)

Function: grow-deque DEQUE
Package

pettomato-deque

Source

deque.lisp (file)

Function: move-head-back DEQUE
Package

pettomato-deque

Source

deque.lisp (file)

Function: move-head-forward DEQUE
Package

pettomato-deque

Source

deque.lisp (file)

Function: move-tail-back DEQUE
Package

pettomato-deque

Source

deque.lisp (file)

Function: move-tail-forward DEQUE
Package

pettomato-deque

Source

deque.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Generic functions

Generic Function: buffer OBJECT
Generic Function: (setf buffer) NEW-VALUE OBJECT
Package

pettomato-deque

Methods
Method: buffer (DEQUE deque)

automatically generated reader method

Source

deque.lisp (file)

Method: (setf buffer) NEW-VALUE (DEQUE deque)

automatically generated writer method

Source

deque.lisp (file)

Generic Function: head-index OBJECT
Generic Function: (setf head-index) NEW-VALUE OBJECT
Package

pettomato-deque

Methods
Method: head-index (DEQUE deque)

automatically generated reader method

Source

deque.lisp (file)

Method: (setf head-index) NEW-VALUE (DEQUE deque)

automatically generated writer method

Source

deque.lisp (file)

Generic Function: max-index OBJECT
Generic Function: (setf max-index) NEW-VALUE OBJECT
Package

pettomato-deque

Methods
Method: max-index (IDEQUE ideque)

automatically generated reader method

Source

ideque.lisp (file)

Method: (setf max-index) NEW-VALUE (IDEQUE ideque)

automatically generated writer method

Source

ideque.lisp (file)

Generic Function: min-index OBJECT
Generic Function: (setf min-index) NEW-VALUE OBJECT
Package

pettomato-deque

Methods
Method: min-index (IDEQUE ideque)

automatically generated reader method

Source

ideque.lisp (file)

Method: (setf min-index) NEW-VALUE (IDEQUE ideque)

automatically generated writer method

Source

ideque.lisp (file)

Generic Function: tail-index OBJECT
Generic Function: (setf tail-index) NEW-VALUE OBJECT
Package

pettomato-deque

Methods
Method: tail-index (DEQUE deque)

automatically generated reader method

Source

deque.lisp (file)

Method: (setf tail-index) NEW-VALUE (DEQUE deque)

automatically generated writer method

Source

deque.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   M   P  
Index Entry  Section

F
File, Lisp, pettomato-deque.asd: The pettomato-deque<dot>asd file
File, Lisp, pettomato-deque/src/deque.lisp: The pettomato-deque/src/deque<dot>lisp file
File, Lisp, pettomato-deque/src/ideque.lisp: The pettomato-deque/src/ideque<dot>lisp file
File, Lisp, pettomato-deque/src/package.lisp: The pettomato-deque/src/package<dot>lisp file

L
Lisp File, pettomato-deque.asd: The pettomato-deque<dot>asd file
Lisp File, pettomato-deque/src/deque.lisp: The pettomato-deque/src/deque<dot>lisp file
Lisp File, pettomato-deque/src/ideque.lisp: The pettomato-deque/src/ideque<dot>lisp file
Lisp File, pettomato-deque/src/package.lisp: The pettomato-deque/src/package<dot>lisp file

M
Module, pettomato-deque/src: The pettomato-deque/src module

P
pettomato-deque.asd: The pettomato-deque<dot>asd file
pettomato-deque/src: The pettomato-deque/src module
pettomato-deque/src/deque.lisp: The pettomato-deque/src/deque<dot>lisp file
pettomato-deque/src/ideque.lisp: The pettomato-deque/src/ideque<dot>lisp file
pettomato-deque/src/package.lisp: The pettomato-deque/src/package<dot>lisp file

Jump to:   F   L   M   P  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
B   D   E   F   G   H   I   M   N   P   T  
Index Entry  Section

(
(setf buffer): Internal generic functions
(setf buffer): Internal generic functions
(setf head-index): Internal generic functions
(setf head-index): Internal generic functions
(setf max-index): Internal generic functions
(setf max-index): Internal generic functions
(setf min-index): Internal generic functions
(setf min-index): Internal generic functions
(setf nth-element): Exported generic functions
(setf nth-element): Exported generic functions
(setf nth-element): Exported generic functions
(setf tail-index): Internal generic functions
(setf tail-index): Internal generic functions

B
buffer: Internal generic functions
buffer: Internal generic functions

D
decf-mod: Internal macros
deque->list: Exported functions
deque-full-p: Internal functions
do-all-elements: Exported macros

E
element-count: Exported generic functions
element-count: Exported generic functions
element-count: Exported generic functions
empty-p: Exported generic functions
empty-p: Exported generic functions
expire-front-to: Exported generic functions
expire-front-to: Exported generic functions

F
Function, deque->list: Exported functions
Function, deque-full-p: Internal functions
Function, grow-deque: Internal functions
Function, move-head-back: Internal functions
Function, move-head-forward: Internal functions
Function, move-tail-back: Internal functions
Function, move-tail-forward: Internal functions

G
Generic Function, (setf buffer): Internal generic functions
Generic Function, (setf head-index): Internal generic functions
Generic Function, (setf max-index): Internal generic functions
Generic Function, (setf min-index): Internal generic functions
Generic Function, (setf nth-element): Exported generic functions
Generic Function, (setf tail-index): Internal generic functions
Generic Function, buffer: Internal generic functions
Generic Function, element-count: Exported generic functions
Generic Function, empty-p: Exported generic functions
Generic Function, expire-front-to: Exported generic functions
Generic Function, grow-back-to: Exported generic functions
Generic Function, head-index: Internal generic functions
Generic Function, max-index: Internal generic functions
Generic Function, min-index: Internal generic functions
Generic Function, nth-element: Exported generic functions
Generic Function, peek-back: Exported generic functions
Generic Function, peek-front: Exported generic functions
Generic Function, pop-back: Exported generic functions
Generic Function, pop-front: Exported generic functions
Generic Function, push-back: Exported generic functions
Generic Function, push-front: Exported generic functions
Generic Function, tail-index: Internal generic functions
grow-back-to: Exported generic functions
grow-back-to: Exported generic functions
grow-deque: Internal functions

H
head-index: Internal generic functions
head-index: Internal generic functions

I
incf-mod: Internal macros

M
Macro, decf-mod: Internal macros
Macro, do-all-elements: Exported macros
Macro, incf-mod: Internal macros
max-index: Internal generic functions
max-index: Internal generic functions
Method, (setf buffer): Internal generic functions
Method, (setf head-index): Internal generic functions
Method, (setf max-index): Internal generic functions
Method, (setf min-index): Internal generic functions
Method, (setf nth-element): Exported generic functions
Method, (setf nth-element): Exported generic functions
Method, (setf tail-index): Internal generic functions
Method, buffer: Internal generic functions
Method, element-count: Exported generic functions
Method, element-count: Exported generic functions
Method, empty-p: Exported generic functions
Method, expire-front-to: Exported generic functions
Method, grow-back-to: Exported generic functions
Method, head-index: Internal generic functions
Method, max-index: Internal generic functions
Method, min-index: Internal generic functions
Method, nth-element: Exported generic functions
Method, nth-element: Exported generic functions
Method, peek-back: Exported generic functions
Method, peek-front: Exported generic functions
Method, pop-back: Exported generic functions
Method, pop-back: Exported generic functions
Method, pop-front: Exported generic functions
Method, pop-front: Exported generic functions
Method, push-back: Exported generic functions
Method, push-back: Exported generic functions
Method, push-front: Exported generic functions
Method, push-front: Exported generic functions
Method, tail-index: Internal generic functions
min-index: Internal generic functions
min-index: Internal generic functions
move-head-back: Internal functions
move-head-forward: Internal functions
move-tail-back: Internal functions
move-tail-forward: Internal functions

N
nth-element: Exported generic functions
nth-element: Exported generic functions
nth-element: Exported generic functions

P
peek-back: Exported generic functions
peek-back: Exported generic functions
peek-front: Exported generic functions
peek-front: Exported generic functions
pop-back: Exported generic functions
pop-back: Exported generic functions
pop-back: Exported generic functions
pop-front: Exported generic functions
pop-front: Exported generic functions
pop-front: Exported generic functions
push-back: Exported generic functions
push-back: Exported generic functions
push-back: Exported generic functions
push-front: Exported generic functions
push-front: Exported generic functions
push-front: Exported generic functions

T
tail-index: Internal generic functions
tail-index: Internal generic functions

Jump to:   (  
B   D   E   F   G   H   I   M   N   P   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   B   H   M   S   T  
Index Entry  Section

B
buffer: Exported classes

H
head-index: Exported classes

M
max-index: Exported classes
min-index: Exported classes

S
Slot, buffer: Exported classes
Slot, head-index: Exported classes
Slot, max-index: Exported classes
Slot, min-index: Exported classes
Slot, tail-index: Exported classes

T
tail-index: Exported classes

Jump to:   B   H   M   S   T  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   D   I   P   S  
Index Entry  Section

C
Class, deque: Exported classes
Class, ideque: Exported classes

D
deque: Exported classes

I
ideque: Exported classes

P
Package, pettomato-deque: The pettomato-deque package
pettomato-deque: The pettomato-deque system
pettomato-deque: The pettomato-deque package

S
System, pettomato-deque: The pettomato-deque system

Jump to:   C   D   I   P   S