RE: [eigen] Question regarding an operation |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Hi Trevor,
Thanks for the feedback. Your suggestion issues a problem: error: cannot convert 'const SqrtReturnType {aka const Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<float>, const Eigen::ArrayWrapper<const Eigen::Product<Eigen::Matrix<float, 2, 1>, Eigen::Product<Eigen::Matrix<float, 2, 2>, Eigen::Matrix<float, 2, 1>, 0>, 0> > >}' to 'float' in initialization float beta = (r * (S_I * r)).array().sqrt(); ^ compilation terminated due to -Wfatal-errors. Any idea? --- +351 912 090 991 Azambuja | Portugal As the creation appears, the path is driven in the conscious feeling of madness and happiness, which returns, in multiple ways, to what we achieve in greatness... Follow me in: This message and any files herewith attached may contain confidential or privileged information and is intended solely for the use of the entity to which it is addressed. If you receive this message in error, please notify the sender immediately and delete this message and any files attached without copying them in any way. From: tirons@xxxxxxxxxxxx To: eigen@xxxxxxxxxxxxxxxxxxx Subject: RE: [eigen] Question regarding an operation Date: Mon, 24 Aug 2015 21:43:10 +0000 You need to read up about array's to understand this:
As long as your algebra is correct,
float beta = (r*(S_I*R)).array().sqrt();
should work.
/*************************************************
* Trevor P. Irons, PhD
* Mobile: +1 720.635.8218
* EM Modelling API: http://lemmasoftware.org
*************************************************/
From: Nuno Marques [n.marques21@xxxxxxxxxxx]
Sent: Monday, August 24, 2015 3:39 PM To: eigen@xxxxxxxxxxxxxxxxxxx Subject: [eigen] Question regarding an operation Hello there,
I want to question the community regarding the following:
Matrix<float,
n_y, n_x> C;
Vector2f r = y - C * _x;
Matrix<float,
n_y, n_y> S_I = (C * _P * C.transpose() + R).inverse();
I want to compute,
float beta =
sqrt(r * (S_I * r));
... but I'm not being able to. Can anyone suggest a solution to this? I tried many combinations, but without luck.
Thanks in advance! Best regards,
---
+351 912 090 991
Azambuja | Portugal
As the creation appears, the path is driven in the conscious
feeling of madness and happiness, which returns, in multiple ways, to what we achieve in greatness...
Follow me in:
This message and any files herewith attached may contain confidential or privileged information and is intended solely for the use of the
entity to which it is addressed. If you receive this message in error, please notify the sender immediately and delete this message
and any files attached without copying them in any way.
|
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |