- cacheFunc
cacheFunc
Works with all licenses.
Defines a function that remembers its last arguments and value, and avoids recalculation if possible.
cacheFunc Parameters
- STFunc (block, required)
The function to be cached.
- timeIsIrrelevant (bool)
Whether the change is time is relevant to the function.
- irrelevantDirs (integer vector)
Any direction where the change is irrelevant to the function.
Example cacheFunc Block
<STFunc memDrive>
kind = cacheFunc
irrelevantDirs = [1 2]
<STFunc drive>
kind = expression
expression = amp*H(T_DRIVE-t)*cos(K*x)*sin(OMEGA*t)
</STFunc>
</STFunc>