rbmatlab 0.10.01
Functions
general/filecaching/filecache_function.m File Reference

function used for file-caching other function calls. More...

Go to the source code of this file.

Functions

function
varargout
filecache_function ( funcptr, varargin)
 function used for file-caching other function calls.

Detailed Description

function used for file-caching other function calls.

Definition in file filecache_function.m.


Function Documentation

function varargout = filecache_function (   funcptr,
  varargin 
)

function used for file-caching other function calls.

If an expensive function

         [E, F] = myfunction(A,B,C)

is called frequently during a program run, a filecaching can be used, i.e. one calls the function instead as

         [E, F] = filecache_function(@myfunction,A,B,C);

If the function result exists in the cache, this is loaded, otherwise the function is called, the result saved in the cache and the result returned.

  • The cache-directory is assumed to be in RBMATLABTEMP/cache
  • The cache-directory can be cleared with the function filecache_clear()
Parameters:
funcptris the pointer to a function whose calls are to be cached.
vararginis parameter list of the cached function call
Return values:
varargoutreturn values of the cached function call

Definition at line 1 of file filecache_function.m.

All Classes Namespaces Files Functions Variables