PermanentIndices - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Cache

  

PermanentIndices

  

return a sequence of the permanent indices

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

PermanentIndices( cache )

Parameters

cache

-

cache table or procedure: the object whose indices (keys) are to be returned

Description

• 

The PermanentIndices command returns the indices of the permanent 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 keys of the permanent indices from that table are returned.  If the procedure does not have a table, NULL is returned.

• 

PermanentIndices returns the indices in the same format as indices, that is, a sequence of lists where the contents of each list is an index of a permanent entry from the table.

• 

The PermanentEntries command can be used to get the indices of the permanent entries.

• 

For more information on cache tables, see Cache Package.

Examples

> 

c1≔Cache⁡

c1≔Cache⁡512

(1)
> 

Cache:-AddPermanent⁡c1,x,y

> 

Cache:-AddPermanent⁡c1,y,z

> 

Cache:-PermanentEntries⁡c1

y,z

(2)
> 

Cache:-PermanentIndices⁡c1

x,y

(3)
> 

p := proc( x ) option cache; x^2; end proc;

p ≔ procxoptioncache;x^2end proc

(4)
> 

Cache:-AddPermanent⁡p,2,2

> 

Cache:-AddPermanent⁡p,3,3

> 

Cache:-PermanentEntries⁡p

2,3

(5)
> 

Cache:-PermanentIndices⁡p

2,3

(6)

See Also

Cache

Cache Package

Cache[AddPermanent]

Cache[AddTemporary]

Cache[PermanentEntries]

Cache[RemovePermanent]

Cache[RemoveTemporary]

Cache[Resize]

Cache[TemporaryEntries]

Cache[TemporaryIndices]

option cache