TemporaryEntries - Maple Help

Cache

 TemporaryEntries
 return a sequence of the temporary entries

 Calling Sequence TemporaryEntries( cache )

Parameters

 cache - cache table or procedure: the object whose entries are to be returned

Description

 • The TemporaryEntries command returns the temporary entries of the given cache table.  The cache table can be given directly as cache, or cache can refer to a procedure that has, or can have, a cache remember table.  If such a procedure is given and it has a cache remember table, the temporary entries from that table are returned.  If the procedure does not have a remember table, NULL is returned.
 • TemporaryEntries returns the entries in same format as entries, that is a sequence of lists where the contents of each list is the value of a temporary entry from the table.
 • The TemporaryIndices command can be used to get the indices of the temporary entries.

Examples

 > $\mathrm{c1}≔\mathrm{Cache}\left(\right)$
 ${\mathrm{c1}}{≔}{\mathrm{Cache}}{}\left({512}\right)$ (1)
 > $\mathrm{c1}\left[1\right]≔2$
 ${{\mathrm{c1}}}_{{1}}{≔}{2}$ (2)
 > $\mathrm{c1}\left[2\right]≔3$
 ${{\mathrm{c1}}}_{{2}}{≔}{3}$ (3)
 > $\mathrm{Cache}:-\mathrm{TemporaryEntries}\left(\mathrm{c1}\right)$
 $\left[{2}\right]{,}\left[{3}\right]$ (4)
 > $\mathrm{Cache}:-\mathrm{TemporaryIndices}\left(\mathrm{c1}\right)$
 $\left[{1}\right]{,}\left[{2}\right]$ (5)
 > p := proc( x ) option cache; x^2; end proc;
 ${p}{≔}{\mathbf{proc}}\left({x}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{option}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{cache}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{x}{^}{2}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (6)
 > $p\left(2\right)$
 ${4}$ (7)
 > $p\left(3\right)$
 ${9}$ (8)
 > $\mathrm{Cache}:-\mathrm{TemporaryEntries}\left(p\right)$
 $\left[{4}\right]{,}\left[{9}\right]$ (9)
 > $\mathrm{Cache}:-\mathrm{TemporaryIndices}\left(p\right)$
 $\left[{2}\right]{,}\left[{3}\right]$ (10)