Close
Close window
RemovePermanent - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

Cache

RemovePermanent

remove a permanent entry from the cache table

Calling Sequence

RemovePermanent( cache, key )

Parameters

cache

-

cache table or procedure: the object the entry is removed from

key

-

list: the key to remove

Description

The RemovePermanent command removes the permanent entry for which key is the key. 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 permanent entry is removed from that table. If the procedure does not have a table, no action is taken.

To handle an expression sequence as a key, key must be given in a list . The actual key used for the entry is op(key).

Calling RemovePermanent is the only way to remove a permanent entry from a cache table.

To add a permanent entry to a cache table, use AddPermanent .

For more information on cache tables, see Cache Package .

Examples

>

c1Cache

c1Cache512

(1)
>

Cache:-AddPermanentc1,x,y

>

Cache:-AddPermanentc1,y,z

>

evalc1

Cache512,permanent=y=z,x=y

(2)
>

Cache:-RemovePermanentc1,x

>

evalc1

Cache512,permanent=y=z

(3)
>

Cache:-RemovePermanentc1,y

>

evalc1

Cache512

(4)
>

p := proc(x,y) option cache; x+y; end proc;

pprocx,yoptioncache;x+yend proc

(5)
>

p1,1

2

(6)
>

Cache:-AddPermanentp,2,2,8

>

Cache:-AddPermanentp,1,2,5

>

p2,2

8

(7)
>

p1,2

5

(8)
>

Cache:-RemovePermanentp,2,2

>

p2,2

4

(9)
>

op4,evalp

Cache512,temporary=2,2=4,1,1=2,permanent=1,2=5

(10)
>

Cache:-RemovePermanentp,1,2

>

p1,2

3

(11)
>

op4,evalp

Cache512,temporary=2,2=4,1,1=2,1,2=3

(12)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /