[eigen] Dot product for complex vectors in Eigen

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

I would like to get a regular “dot product” of two complex vectors a and b without any conjugate : \sum_{k = 0}^{n-1} a_k * b_k

The following code :

Eigen::VectorXcd a(…);
Eigen::VectorXcd b(…);
std::complex<double> ans = a.dot(b);

takes the conjugate of one of the vector which is not what I would like to get. What is the recommended way to do that?

Best regards,
François Fayard


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/