Eigen 3.4.90
doc
snippets
TopicAliasing_mult2.cpp
Go to the documentation of this file.
1
MatrixXf
matA
(2,2),
matB
(2,2);
2
matA
<< 2, 0, 0, 2;
3
4
// Simple but not quite as efficient
5
matB
=
matA
*
matA
;
6
cout <<
matB
<< endl << endl;
7
8
// More complicated but also more efficient
9
matB
.noalias() =
matA
*
matA
;
10
cout <<
matB
;
matA
MatrixXf matA(2, 2)
matB
MatrixXf matB(2, 2)
Eigen::MatrixXf
Matrix< float, Dynamic, Dynamic > MatrixXf
Dynamic×Dynamic matrix of type float.
Definition:
Matrix.h:501