source:
pacpussensors/trunk/Vislab/lib3dv/eigen/doc/snippets/TopicAliasing_block_correct.cpp@
138
Last change on this file since 138 was 136, checked in by , 8 years ago | |
---|---|
File size: 270 bytes |
Line | |
---|---|
1 | MatrixXi mat(3,3); |
2 | mat << 1, 2, 3, 4, 5, 6, 7, 8, 9; |
3 | cout << "Here is the matrix mat:\n" << mat << endl; |
4 | |
5 | // The eval() solves the aliasing problem |
6 | mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2).eval(); |
7 | cout << "After the assignment, mat = \n" << mat << endl; |
Note:
See TracBrowser
for help on using the repository browser.