The memoize Reference Manual

Table of Contents

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

The memoize Reference Manual

This is the memoize Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 15:17:28 2018 GMT+0.


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

1 Systems

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


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

1.1 memoize

Source

memoize.asd (file)

Component

memoize.lisp (file)


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

2 Files

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


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

2.1 Lisp


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

2.1.1 memoize.asd

Location

memoize.asd

Systems

memoize (system)


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

2.1.2 memoize/memoize.lisp

Parent

memoize (system)

Location

memoize.lisp

Packages

org.tfeb.hax.memoize

Exported Definitions
Internal Definitions

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

3 Packages

Packages are listed by definition order.


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

3.1 org.tfeb.hax.memoize

Source

memoize.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

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

4 Definitions

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


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

4.1 Exported definitions


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

4.1.1 Macros

Macro: def-memoized-function FNSPEC ARGS &body BOD

Define a memoized function.
FNSPEC is either the name of the function, or a list suitable as an arglist for MEMOIZE-FUNCTION. ARGS & BOD are passed off to DEFUN.

This will declare FNSPEC NOTINLINE, which may be necessary to prevent good compilers optimizing away self calls & stuff like that.

Package

org.tfeb.hax.memoize

Source

memoize.lisp (file)

Macro: memoized-labels (&rest LABDEFS) &body BOD

A version of LABELS that memoizes the local functions. See MEMOIZE-FUNCTION and DEF-MEMOIZED-FUNCTION. If code that uses this is compiled (either by COMPILE or COMPILE-FILE, then the table of memoized results will be unique, if interpreted then a new table may be generated for each use. The function ‘names’ are generalised in the same way as for DEF-MEMOIZED-FUNCTION.

Package

org.tfeb.hax.memoize

Source

memoize.lisp (file)


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

4.1.2 Functions

Function: clear-memoized-function FN-NAME

Clear memoized results for FN-NAME

Package

org.tfeb.hax.memoize

Source

memoize.lisp (file)

Function: clear-memoized-functions ()

Clear memoized results for all functions

Package

org.tfeb.hax.memoize

Source

memoize.lisp (file)

Function: function-memoized-p FN-NAME

Is FN-NAME memoized?

Package

org.tfeb.hax.memoize

Source

memoize.lisp (file)

Function: memoize-function FN-NAME &key KEY TEST

Memoize FN-NAME, a symbol, causing its results to be stashed.
KEY is a function which is given the arglist of FN-NAME, and should return a key to hash on for memoizing. TEST is a function which the test for the ashtable.
See Norvig P269-275.

Note this function may not work on self-recursive functions because the compiler can optimize away self-calls in various ways. DEF-MEMOIZED-FUNCTION should work for those cases as it is careful to ensure the function can not be inlined like this.

Package

org.tfeb.hax.memoize

Source

memoize.lisp (file)

Function: unmemoize-function FN-NAME

Remove memoization for FN-NAME

Package

org.tfeb.hax.memoize

Source

memoize.lisp (file)

Function: unmemoize-functions ()

Unmemoize all functions

Package

org.tfeb.hax.memoize

Source

memoize.lisp (file)


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

4.2 Internal definitions


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

4.2.1 Special variables

Special Variable: *memoized-functions*
Package

org.tfeb.hax.memoize

Source

memoize.lisp (file)


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

4.2.2 Functions

Function: make-memo FN KEY TEST
Package

org.tfeb.hax.memoize

Source

memoize.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   M  
Index Entry  Section

F
File, Lisp, memoize.asd: The memoize<dot>asd file
File, Lisp, memoize/memoize.lisp: The memoize/memoize<dot>lisp file

L
Lisp File, memoize.asd: The memoize<dot>asd file
Lisp File, memoize/memoize.lisp: The memoize/memoize<dot>lisp file

M
memoize.asd: The memoize<dot>asd file
memoize/memoize.lisp: The memoize/memoize<dot>lisp file

Jump to:   F   L   M  

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

A.2 Functions

Jump to:   C   D   F   M   U  
Index Entry  Section

C
clear-memoized-function: Exported functions
clear-memoized-functions: Exported functions

D
def-memoized-function: Exported macros

F
Function, clear-memoized-function: Exported functions
Function, clear-memoized-functions: Exported functions
Function, function-memoized-p: Exported functions
Function, make-memo: Internal functions
Function, memoize-function: Exported functions
Function, unmemoize-function: Exported functions
Function, unmemoize-functions: Exported functions
function-memoized-p: Exported functions

M
Macro, def-memoized-function: Exported macros
Macro, memoized-labels: Exported macros
make-memo: Internal functions
memoize-function: Exported functions
memoized-labels: Exported macros

U
unmemoize-function: Exported functions
unmemoize-functions: Exported functions

Jump to:   C   D   F   M   U  

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

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*memoized-functions*: Internal special variables

S
Special Variable, *memoized-functions*: Internal special variables

Jump to:   *  
S  

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

A.4 Data types

Jump to:   M   O   P   S  
Index Entry  Section

M
memoize: The memoize system

O
org.tfeb.hax.memoize: The org<dot>tfeb<dot>hax<dot>memoize package

P
Package, org.tfeb.hax.memoize: The org<dot>tfeb<dot>hax<dot>memoize package

S
System, memoize: The memoize system

Jump to:   M   O   P   S