Questions tagged [memoization]

For questions related to user defined caching mechanisms, memoization, in particular.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
95 views

Time complexity to choose the right overload from the memoized function

If we want to save some outputs of the function, we often use the memoization pattern as follows, f[x_]:=f[x]=x f/@Range[10^5] If I call this function many times ...
6
votes
0answers
526 views

Increasing recursion speed in Hull-White trinomial tree calculation

First timer here and have been finding these boards very useful in learning Mathematica. I'm trying to implement a numerical procedure for the Hull-White trinomial tree in Mathematica. Despite using ...
5
votes
0answers
306 views

Change of basis of polynomials

Suppose I have a favourite basis for polynomials in $x_1,\dotsc,x_n$, say non-symmetric Macdonald polynomials to be specific. I can easily compute these, and thus the change-of-basis matrix that takes ...
5
votes
0answers
212 views

Dropbox datastore

Dropbox seems to have a feature where it can be used as a database. This would be really cool to use for memoized functions, that can be restored on several computers and sessions. I have a function ...
3
votes
0answers
123 views

Memoization of built in function

What is the best way to let mathematica memoize built-in function like e.g. SphericalHarmonicY[l,m,th,ph] One possibility would be for sure: ...
0
votes
0answers
85 views

How to create a listable, memoized function

Suppose I have a known real constant $a$, and I want to calculate $f(n) = \prod_{k=1}^{n}(a-k)$. I know I could memoize this function ...
0
votes
0answers
70 views

Reuse symbolic polynomial

Suppose I have a function that returns a polynomial in x, GetPoly[params_,x_]:=GetPoly[params,x]... but it is quite slow, so ...