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

@@ -4,13 +4,13 @@
using Eigen::Matrix4d;
// define a custom template binary functor
template<typename Scalar> struct MakeComplexOp {
template <typename Scalar>
struct MakeComplexOp {
typedef std::complex<Scalar> result_type;
result_type operator()(const Scalar& a, const Scalar& b) const { return result_type(a,b); }
result_type operator()(const Scalar& a, const Scalar& b) const { return result_type(a, b); }
};
int main(int, char**)
{
int main(int, char**) {
Matrix4d m1 = Matrix4d::Random(), m2 = Matrix4d::Random();
std::cout << m1.binaryExpr(m2, MakeComplexOp<double>()) << std::endl;
return 0;