Re: [eigen] Assignment to triangular view fails |

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

On 10.04.2013 18:50, Sameer Agarwal wrote:

Eigen::MatrixXd A(10,10);
A.triangularView<Eigen::Upper>().setConstant(1.0); // Works
A.triangularView<Eigen::Upper>() = 1.0; // Fails to compile
Is this by design or a bug?

That has been discussed several times. The basic point is that
matrix = c; can also be interpreted as matrix = c * Identity();
You can use scalar assignments in array expressions, though.
Christoph
--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen
Tel: +49 (421) 218-64252
----------------------------------------------