[eigen] cwise question

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


Sorry to bother you all with a simple question, but I can't figure this out. Code like this used to compile: (2.0.10)

#include "Eigen/Core"
#include "Eigen/Array"
#include "Eigen/Sparse"

using namespace Eigen;

int main() {

    int size = 3;
    VectorXd x;
    x = VectorXd::Zero(size);
   
    VectorXd y;
    y = VectorXd::Ones(size);
    y *= 2;
   
    VectorXd z;
    z = VectorXd::Ones(size);
    z *=3;

    Matrix3d Q;
    Q.setIdentity();//Ones(size,size);
    Q *= 2;

    // Cwise operation
    x +=  y.cwise() * (Q*z);

    return 0;
}


But doesn't with the latest source. I know there has been a lot of discussion about these sorts of things lately, but I didn't follow it all, and didn't find it in the documentation. What is the new way to get coefficient wise access?

Thanks.
 


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