memoize {FedIRT}R Documentation

Memoization Function for Speed Optimization

Description

A simple memoization function that stores the results of expensive function calls and reuses those results when the same inputs occur again. This technique greatly speeds up the computation of fedirt function by caching previously computed values.

Usage

memoize(f)

Arguments

f

Function to be memoized.

Value

Returns a memoized version of function f that will cache its previously computed results for faster subsequent evaluations, especially beneficial when applied to fedirt.

Examples

# To memoize a function, simply wrap it with `memoize`:
memoize(function(a,b){return(a+b)})

[Package FedIRT version 0.1.0 Index]