# Questions tagged [memoization]

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

74 questions
Filter by
Sorted by
Tagged with
189 views

### How to remember evaluation across sessions?

I am performing a very time-consuming symbolic calculation. When I reopen a saved Mathematica notebook, it takes quite a long time to evaluate. Is there an option to tell Mathematica to remember the ...
78 views

### Memoization and recursions

My question is bolded within the text below. Memoization speeds up a recursion that needs to recall a prior rule other than the last one calculated. For instance, on my machine, the following take 0....
178 views

### Why is a function of two functions that use memoization still slow?

I have two functions that I both use memoization for. My goal is to plot the ratio of these two functions. Since I already plot the functions by themselves, and I use memoization, it would seem to me ...
1 vote
39 views

### RegionPlot3D incorrectly plots regions defined by memoized functions

RegionPlot3D incorrectly plots regions defined by memoized functions. A memoizer: ...
120 views

### Memoization of functions with optional arguments

Consider the following function that generates a sparse diagonal matrix: ...
1 vote
36 views

### Creating a library of saved function values [duplicate]

I have a command of the form J[b,c,n] which outputs a list of complex numbers, obtained by using FindRoot. Some outputs take ...
66 views

### Memoization Involving More than one Variable [duplicate]

Good morning. I would like to know if there is a way to implement memoization if there is more than one variable involved in the memoization; or more accurately, for my problem, have the memoization ...
18 views

### How to memoize with patterns? [duplicate]

Here is an artificial example to explain what I am up to. Define ClearAll[f] f[x_, y_] := f[x, y] = If[x == 0, g[y], g[f[x - 1, y]]] Then ...
40 views

### Optimising tensor operations under memory constraints

Let riem is a free variable with riem ∈ Arrays[{4, 4, 4, 4} as assumption. Let: ...
114 views

### Why does this memoized function cause the kernel to quit? [closed]

The following memoized recursive function causes the kernel to beep and quit. ...
149 views

### Recursive solution to the extended Josephus problem [duplicate]

The Josephus Problem is described here, with extension of killing every $k$th problem. In the simple case where every other person is killed, we can also use the binary trick. ...
1 vote
136 views

### Save part of memoized function

I have a function whose performing a series of expansions of a complicated function, which can take a lot of time. To avoid bottlenecks, I use memoization so I need to evaluate it only once. For ...