This is the fare-memoization Reference Manual, version 1.2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:04:53 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
fare-memoization
memoizing functions the correct, portable way
Francois-Rene Rideau
MIT
define memoized functions and memoize previously defined functions
1.2.0
memoization.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
fare-memoization/fare-memoization.asd
fare-memoization
(system).
fare-memoization/memoization.lisp
fare-memoization
(system).
*memoized*
(special variable).
define-memo-function
(macro).
memoize
(function).
memoized-apply
(function).
memoized-funcall
(function).
memoizing
(function).
unmemoize
(function).
unmemoize-1
(function).
compute-memoized-function
(function).
make-memoization-info
(function).
memoization-info
(class).
memoization-wrapper
(function).
memoized-argument-normalizer
(reader method).
memoized-call-normalizer
(reader method).
memoized-table
(reader method).
original-function
(reader method).
wrapped-function
(reader method).
(setf wrapped-function)
(writer method).
Packages are listed by definition order.
fare-memoization
fmemo
common-lisp
.
*memoized*
(special variable).
define-memo-function
(macro).
memoize
(function).
memoized-apply
(function).
memoized-funcall
(function).
memoizing
(function).
unmemoize
(function).
unmemoize-1
(function).
compute-memoized-function
(function).
make-memoization-info
(function).
memoization-info
(class).
memoization-wrapper
(function).
memoized-argument-normalizer
(generic reader).
memoized-call-normalizer
(generic reader).
memoized-table
(generic reader).
original-function
(generic reader).
wrapped-function
(generic reader).
(setf wrapped-function)
(generic writer).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Like defun, but creates a memoized function.
Also, if the name is a CONS, then the first element is the name, and the rest
is a list of keyword arguments, TABLE and NORMALIZATION as per MEMOIZE.
Memoize the function associated to given SYMBOL.
Beware that unless the function was declared NOTINLINE, callers may have inlined
the original definition and will not see the memoized function.
Moreover, if the function is self-recursive,
this declaration must have happened before it was defined.
Keyword argument TABLE (default: a fresh EQUAL hash-table) lets you
specify an existing hash-table for the memoized computations;
it may have been created with appropriate options regarding equality predicate
and weak pointers, initial contents, etc., and you may clear it when needed.
Keyword argument ARGUMENT-NORMALIZER (default: NIL) lets you specify a function
taking a list of arguments and returning a normalized list of arguments,
so that all lists with the same normalization will share the same memoized
computation. NIL means no such normalization, which is the same as #’LIST.
Keyword argument CALL-NORMALIZER (alias: NORMALIZATION, default: NIL)
lets you specify a function taking a continuation and the function arguments,
e.g. with lambda-list (CONTINUATION &REST ARGUMENTS)
which may transform the argument list before to call the continuation
with a normalized argument list that will be used to query the computation cache
and invoke the actual computation function; NIL means no such transformation,
which has the same effect as specifying #’APPLY as a transformation.
If the function was already being memoized, any previous memoization arguments, i.e. TABLE and ARGUMENT-NORMALIZER, is replaced with the newly specified values (unspecified arguments are replaced by defaults rather than left as previously specified).
Given a function, return a memoizing version of same function. Keyword arguments TABLE and NORMALIZATION are as per MEMOIZE.
undoing the memoizing function, return the memoization-info record for the function
Forget the memoized result of calling SYMBOL with arguments ARGUMENTS. Do not forget memoized results of calling the function with other arguments. Returns T if a stored result was found and removed, NIL otherwise.
the basic helper for computing with a memoized function described by INFO, being called with arguments ARGUMENTS
the basic helper for computing with a memoized function described by INFO, being called with arguments ARGUMENTS
memoization-info
)) ¶either NIL or a function to normalize arguments before memoization
memoization-info
)) ¶either NIL or a function to normalize arguments before memoization
memoization-info
)) ¶a hash-table containing the memoized computations so far
memoization-info
)) ¶The original, unmemoized, function
memoization-info
)) ¶memoization-info
)) ¶The memoizing version of the function.
information about a function that was memoized
The original, unmemoized, function
common-lisp
.
:function
This slot is read-only.
The memoizing version of the function.
a hash-table containing the memoized computations so far
(make-hash-table :test (quote equal))
:table
This slot is read-only.
either NIL or a function to normalize arguments before memoization
:argument-normalizer
This slot is read-only.
either NIL or a function to normalize arguments before memoization
:normalization
, :call-normalizer
This slot is read-only.
Jump to: | (
C D F G M O U W |
---|
Jump to: | (
C D F G M O U W |
---|
Jump to: | *
A C F S T W |
---|
Jump to: | *
A C F S T W |
---|
Jump to: | C F M P S |
---|
Jump to: | C F M P S |
---|