New to Incanter, and was wondering what a vectorized solution to creating a matrix based on the results of the pair-wise product of two lists, would look like. To be clearer, I have two lists that I create with
(def x (pdf-poisson (range 4) :lambda 2.2))
(def y (pdf-poisson (range 4) :lambda 1.5)).
I would now like a 4x4 matrix M such that M(1,1) is the product of x(1) and y(1), M(1,2) is the product of x(1) and y(2) etc.
Taking the outer product in Octave is easy, so was hoping that Incanter supported this also.
I can easily hand code this by mapping a function across the vectors, but wanted an idiomatic or vectorized approach, if that is possible.
Thanks, JT