[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] cwise question
- From: Trevor Irons <trevorirons@xxxxxxxxx>
- Date: Tue, 5 Jan 2010 15:33:59 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=Jwp+DqjQZuvYQ9jmqBd5GkU56atxd78n1lk1OLipz/o=; b=czzC6ll95K8bRs7sxJ+8/Xy3p+kJPjpDq7t1uviTmKzB5byb8tHghTQU/O4PIJoP6M uAPrrshpY4fZsQ4KyNWQmczO5PzrckOX3VqdfEufp1sebfc2F9B6f8bljRu6BQ6siQV+ eX1Tsei2BhG7f2kfVUhtzMFuYdTpLOeU0lFGI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=fhh4iB1h4//FOUo7WeWTSvQEZKUY/y3zPB2viNGvYwpjHZnn2ooV+wv87mUDWAO2tF CPHuk4ZvWEVeJLXqIFxlowgIcTQaO56TrR0nSfH136aFKtZTUdvb9KLs0pArlOzs96OV 4hTODgcE/ADzj1Ku0YvcOSvsLLxqrRBue8Vl8=
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.