mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 17:17:14 +08:00
Move eigen to third party (#282)
* remove useless statement * Add eigen to third_party dir * remove reducdant lines
This commit is contained in:
13
third_party/eigen/doc/snippets/MatrixBase_eval.cpp
vendored
Normal file
13
third_party/eigen/doc/snippets/MatrixBase_eval.cpp
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
Matrix2f M = Matrix2f::Random();
|
||||
Matrix2f m;
|
||||
m = M;
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "Now we want to copy a column into a row." << endl;
|
||||
cout << "If we do m.col(1) = m.row(0), then m becomes:" << endl;
|
||||
m.col(1) = m.row(0);
|
||||
cout << m << endl << "which is wrong!" << endl;
|
||||
cout << "Now let us instead do m.col(1) = m.row(0).eval(). Then m becomes"
|
||||
<< endl;
|
||||
m = M;
|
||||
m.col(1) = m.row(0).eval();
|
||||
cout << m << endl << "which is right." << endl;
|
Reference in New Issue
Block a user