mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clang-format tests, examples, libraries, benchmarks, etc.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
3252ecc7a4
commit
46e9cdb7fe
@@ -3,21 +3,14 @@
|
||||
|
||||
using namespace Eigen;
|
||||
|
||||
std::complex<double> expfn(std::complex<double> x, int)
|
||||
{
|
||||
return std::exp(x);
|
||||
}
|
||||
std::complex<double> expfn(std::complex<double> x, int) { return std::exp(x); }
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
const double pi = std::acos(-1.0);
|
||||
|
||||
MatrixXd A(3,3);
|
||||
A << 0, -pi/4, 0,
|
||||
pi/4, 0, 0,
|
||||
0, 0, 0;
|
||||
MatrixXd A(3, 3);
|
||||
A << 0, -pi / 4, 0, pi / 4, 0, 0, 0, 0, 0;
|
||||
|
||||
std::cout << "The matrix A is:\n" << A << "\n\n";
|
||||
std::cout << "The matrix exponential of A is:\n"
|
||||
<< A.matrixFunction(expfn) << "\n\n";
|
||||
std::cout << "The matrix exponential of A is:\n" << A.matrixFunction(expfn) << "\n\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user