GPLv3

Pari/GP Memoize

memoize.gp "memoizes" a Pari/GP function so values returned by it on each call are cached and re-used. This is good for recursions, slow calculations, or initializations. See the comments in memoize.gp for details.

read("memoize.gp");
foo(x,y) = some_hairy_code(); ...;
foo = memoize(foo);

memoize.gp is free software (free as in freedom), published under the terms of the GNU General Public License (v3 or higher). Download version 4 here,

memoize.gp (18k, and sig)
memoize-4.tar.gz (24k, and sig)

The tar file has some self-tests but just memoize.gp is enough to run. The sig files are Gnu PG ascii armoured signatures generated from my key.


This page Copyright 2014, 2015, 2016, 2017 Kevin Ryde, except for the GPLv3 logo which is Copyright Free Software Foundation and used here in accordance with its terms.

(Back to the sitemap.)