Clang-format tests, examples, libraries, benchmarks, etc.

This commit is contained in:
Antonio Sánchez
2023-12-05 21:22:55 +00:00
committed by Rasmus Munk Larsen
parent 3252ecc7a4
commit 46e9cdb7fe
876 changed files with 33453 additions and 37795 deletions

View File

@@ -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";
}