How to create Eigen matrix out of 2 vectors

Viewed 3865

I have 2 vectors and a matrix:

VectorXd A;
VectorXd B;
MatrixXd C; 

How should I efficiently (without explicit loops and working fast) compute matrix C values so that

C(i,k) = A(i) * B(k);

Assume that matrix C already has appropriate dimensions.

IMPORTANT: I only need help in using built-in Eigen syntax. Please no CUDA/MKL/BLAS suggestions. Thank you.

1 Answers
Related