mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +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:
@@ -0,0 +1,20 @@
|
||||
#include <iostream>
|
||||
#include <unsupported/Eigen/MatrixFunctions>
|
||||
|
||||
using namespace Eigen;
|
||||
|
||||
int main() {
|
||||
MatrixXd A = MatrixXd::Random(3, 3);
|
||||
std::cout << "A = \n" << A << "\n\n";
|
||||
|
||||
MatrixXd sinA = A.sin();
|
||||
std::cout << "sin(A) = \n" << sinA << "\n\n";
|
||||
|
||||
MatrixXd cosA = A.cos();
|
||||
std::cout << "cos(A) = \n" << cosA << "\n\n";
|
||||
|
||||
// The matrix functions satisfy sin^2(A) + cos^2(A) = I,
|
||||
// like the scalar functions.
|
||||
std::cout << "sin^2(A) + cos^2(A) = \n"
|
||||
<< sinA * sinA + cosA * cosA << "\n\n";
|
||||
}
|
||||
Reference in New Issue
Block a user