Read-only forum archive

memoize

memoize

Bahiano · Thu Aug 11, 2005 5:32 pm

Hi everybody.

Does any one knows how to make singular remember the values that was calculated before. I mean, there exist command like the "memoize" from Macaulay2?

the memoize command makes the procedure remember the results it had obtained before.

Thanks for any help.


email: bahiano@ufba.br
Posted in old Singular Forum on: 2004-05-12 20:27:02+02

Re: memoize

levandov · Thu Aug 11, 2005 8:36 pm

Hello, Mr. Bahiano,

Quote:
> Hi everybody.
>
> Does any one knows how to make singular remember the values that was calculated before. I mean, there exist command like the "memoize" from Macaulay2?
>


Not exactly. We have a built-in function, "_", which returns the value of last displayed expression. (See the detailed explanation at http://www.singular.uni-kl.de/Manual/2-0-5/sing_35.htm).
However, we do not recommend to use it while changing rings due to the reason that polynomial-based objects in Singular are ring-dependent.

We can illustrate it with the following code
Code:
ring r=0,(x,y),dp;
poly f=x2-y3;
groebner(jacob(f));
ideal T=_;
T;


Quote:
> the memoize command makes the procedure remember the results it had obtained before.
>
> Thanks for any help.
>


With best regards,