/explore
|
You are here |
blog.paulhankin.net | ||
| | | | |
www.jeremykun.com
Problem: Compute the product of two polynomials efficiently. Solution: import numpy from numpy.fft import fft, ifft def poly_mul(p1, p2): """Multiply two polynomials. p1 and p2 are arrays of coefficients in degree-increasing order. """ deg1 = p1.shape[0] - 1 deg2 = p1.shape[0] - 1 # Would be 2*(deg1 + deg2) + 1, but the next-power-of-2 handles the +1 total_num_pts = 2 * (deg1 + deg2) next_power_of_2 = 1 << (total_num_pts - 1). |
|
| | | | | ||
| | | | |
byorgey.wordpress.com
Continuing the series on dynamic programming, I just have a couple challenge problems for you today. I have indeed solved both of these problems in Haskell, but I don't yet know how to write elegant solutions! There is a reason that the techniques covered in my previous posts aren't quite good enough. Honi Assassins Feel... |
|
| | | | | ||
| | | | |
www.haskellforall.com
fibonacci This post illustrates a nifty application of Haskell's standard library to solve a numeric problem. The Fi... |
|
| | | | | ||
| | | | |
blog.martinig.ch
Architecture is an important asset for good programming and the notion of "pattern" is here to help us apply already trusted code architecture solutions to common problems. Jason McDonald has done a wonderful job to group some of them in a document that should be useful to most software developers. Go to his blog to |
|
| | | |||