Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Memoize.fun

Memoize a function


Description

Before each call of a function, check that the cache holds the results and returns it if available. Otherwise, compute f and cache the result for next evluations.

Usage

Memoize.fun(fun)

Arguments

fun

function to memoize

Value

a function with same behavior than argument one, but using cache.

Examples

f=function(n) rnorm(n);
F=Memoize.fun(f);
F(5); F(6); F(5)

DiceView

Methods for Visualization of Computer Experiments Design and Surrogate

v2.0-1
GPL-3
Authors
Yann Richet, Yves Deville, Clement Chevalier
Initial release
2020-11-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.