Resize - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Cache

  

Resize

  

resize a cache table

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Resize( n, c )

Parameters

n

-

integer: new size for the cache table

c

-

cache table or procedure: cache table to resize

Description

• 

The Resize command creates a new cache table that is a resized version of an existing table.  The new cache table is created so that it can store at least n elements.  If c is a cache table, the new cache table is returned.  If c is a procedure with a cache remember table, the remember table is resized and the new table replaces the old one.  A reference to the new table is returned.

• 

All the permanent elements of the existing table are added to the new table.  Each temporary element of the existing table is inserted into the new table.  However, due to the nature of cache tables there is no guarantee that all temporary elements from the existing table will be present in the new table.

• 

For more information on cache tables, see Cache Package.

Examples

c1Cache60,permanent=1=2,2=3,temporary=3=4,4=5

c1Cache64,temporary=3=4,4=5,permanent=1=2,2=3

(1)

c2Cache:-Resize200,c1

c2Cache256,temporary=3=4,4=5,permanent=1=2,2=3

(2)

p := proc(x) return 1; end proc;

pprocxreturn1end proc

(3)

Cachec2,procedure=p

Cache256,temporary=3=4,4=5,permanent=1=2,2=3

(4)

p1

2

(5)

pa

1

(6)

Cache:-Resize50,p

Cache64,temporary=3=4,4=5,permanent=1=2,2=3

(7)

op4,evalp

Cache64,temporary=3=4,4=5,permanent=1=2,2=3

(8)

See Also

Cache

Cache Command

Cache Package

Cache[AddPermanent]

Cache[AddTemporary]

Cache[PermanentEntries]

Cache[PermanentIndices]

Cache[RemovePermanent]

Cache[RemovePermanent]

Cache[RemoveTemporary]

Cache[RemoveTemporary]

Cache[TemporaryEntries]

Cache[TemporaryIndices]

option cache