Mike Bantegui
Reputation
1,235
Top tag
Next privilege 2,000 Rep.
 Jan18 comment How can I implement dynamic programming for a function with more than one argument? @LeonidShifrin: Just for the record, the way you did this is very cool and borderline black magic. Jan18 answered Is there a way to Collect[] for more than one symbol? Jan18 awarded Scholar Jan18 accepted Texture mapping and resizing a sphere primitive in Mathematica Jan18 awarded Commentator Jan18 revised How can I implement dynamic programming for a function with more than one argument? added 517 characters in body Jan18 comment How can I implement dynamic programming for a function with more than one argument? @LeonidShifrin: If you want to vary a and x, you can simply evaluate it and attach it to a variable: poly = CharlierC[100, a, x] and then evaluate it for any arbitrary {a, x}. You just have to be careful to only evaluate CharlierC[n, a, x] for sybmolic a and x for my version, and always attach it to something beforehand. Jan18 revised How can I implement dynamic programming for a function with more than one argument? added 350 characters in body Jan17 comment How can I implement dynamic programming for a function with more than one argument? I timed both versions, and yours is significantly slower on my machine. 0.016 seconds (mine) vs 1.185 seconds (yours) for n = 20. Still, very cool idea you have. Jan17 revised How to symbolically do matrix “Block Inversion”? added 71 characters in body Jan17 awarded Editor Jan17 awarded Precognitive Jan17 revised How can I implement dynamic programming for a function with more than one argument? added 350 characters in body Jan17 answered How can I implement dynamic programming for a function with more than one argument? Jan17 awarded Teacher Jan17 comment Texture mapping and resizing a sphere primitive in Mathematica D'oh. Graphics in Mathematica is wonderful, but it's never obvious how you can do things. Jan17 answered How to symbolically do matrix “Block Inversion”? Jan17 comment How to symbolically do matrix “Block Inversion”? I'll add an answer that demonstrates this. Jan17 comment File-backed lists/variables for handling large data This is one of the times that I've taken the brute force approach: Just throw more memory at the problem. On my last update I upgraded my machine to 12 GB of RAM. On some simulations I was running it was easily eating up in excess of 2 GB per kernel (= 8 GB total). It would be convenient to have some way of streaming data in and out of kernels though. Jan17 comment How to symbolically do matrix “Block Inversion”? The simplest way may be to define a function which does exactly that. OF course in the general case this is complicated, but if you're doing only 2x2 or 2^n x 2^n matrices it shouldn't be terribly hard.