No public description

PiperOrigin-RevId: 588501530
Change-Id: I44fd1429ce59639367931c04ea6ab40edacd698f
diff --git a/doc/examples/CustomizingEigen_Inheritance.cpp b/doc/examples/CustomizingEigen_Inheritance.cpp
index 48df64e..26e1e3c 100644
--- a/doc/examples/CustomizingEigen_Inheritance.cpp
+++ b/doc/examples/CustomizingEigen_Inheritance.cpp
@@ -1,28 +1,23 @@
 #include <Eigen/Core>
 #include <iostream>
 
-class MyVectorType : public Eigen::VectorXd
-{
-public:
-    MyVectorType(void):Eigen::VectorXd() {}
+class MyVectorType : public Eigen::VectorXd {
+ public:
+  MyVectorType(void) : Eigen::VectorXd() {}
 
-    // This constructor allows you to construct MyVectorType from Eigen expressions
-    template<typename OtherDerived>
-    MyVectorType(const Eigen::MatrixBase<OtherDerived>& other)
-        : Eigen::VectorXd(other)
-    { }
+  // This constructor allows you to construct MyVectorType from Eigen expressions
+  template <typename OtherDerived>
+  MyVectorType(const Eigen::MatrixBase<OtherDerived>& other) : Eigen::VectorXd(other) {}
 
-    // This method allows you to assign Eigen expressions to MyVectorType
-    template<typename OtherDerived>
-    MyVectorType& operator=(const Eigen::MatrixBase <OtherDerived>& other)
-    {
-        this->Eigen::VectorXd::operator=(other);
-        return *this;
-    }
+  // This method allows you to assign Eigen expressions to MyVectorType
+  template <typename OtherDerived>
+  MyVectorType& operator=(const Eigen::MatrixBase<OtherDerived>& other) {
+    this->Eigen::VectorXd::operator=(other);
+    return *this;
+  }
 };
 
-int main()
-{
+int main() {
   MyVectorType v = MyVectorType::Ones(4);
   v(2) += 10;
   v = 2 * v;
diff --git a/doc/examples/Cwise_erf.cpp b/doc/examples/Cwise_erf.cpp
index 9ddc57d..598c18c 100644
--- a/doc/examples/Cwise_erf.cpp
+++ b/doc/examples/Cwise_erf.cpp
@@ -1,8 +1,7 @@
 #include <Eigen/Core>
 #include <unsupported/Eigen/SpecialFunctions>
 #include <iostream>
-int main()
-{
-  Eigen::Array4d v(-0.5,2,0,-7);
+int main() {
+  Eigen::Array4d v(-0.5, 2, 0, -7);
   std::cout << v.erf() << std::endl;
 }
diff --git a/doc/examples/Cwise_erfc.cpp b/doc/examples/Cwise_erfc.cpp
index 4b7902c..98b0b75 100644
--- a/doc/examples/Cwise_erfc.cpp
+++ b/doc/examples/Cwise_erfc.cpp
@@ -1,8 +1,7 @@
 #include <Eigen/Core>
 #include <unsupported/Eigen/SpecialFunctions>
 #include <iostream>
-int main()
-{
-  Eigen::Array4d v(-0.5,2,0,-7);
+int main() {
+  Eigen::Array4d v(-0.5, 2, 0, -7);
   std::cout << v.erfc() << std::endl;
 }
diff --git a/doc/examples/Cwise_lgamma.cpp b/doc/examples/Cwise_lgamma.cpp
index f3c9fe6..10866d8 100644
--- a/doc/examples/Cwise_lgamma.cpp
+++ b/doc/examples/Cwise_lgamma.cpp
@@ -1,8 +1,7 @@
 #include <Eigen/Core>
 #include <unsupported/Eigen/SpecialFunctions>
 #include <iostream>
-int main()
-{
-  Eigen::Array4d v(0.5,10,0,-1);
+int main() {
+  Eigen::Array4d v(0.5, 10, 0, -1);
   std::cout << v.lgamma() << std::endl;
 }
diff --git a/doc/examples/DenseBase_middleCols_int.cpp b/doc/examples/DenseBase_middleCols_int.cpp
index d05a552..cb7dace 100644
--- a/doc/examples/DenseBase_middleCols_int.cpp
+++ b/doc/examples/DenseBase_middleCols_int.cpp
@@ -1,12 +1,11 @@
 #include <Eigen/Core>
 #include <iostream>
 
-int main()
-{
-    int const N = 5;
-    Eigen::MatrixXi A(N,N);
-    A.setRandom();
-    std::cout << "A =\n" << A << '\n' << std::endl;
-    std::cout << "A(1..3,:) =\n" << A.middleCols(1,3) << std::endl;
-    return 0;
+int main() {
+  int const N = 5;
+  Eigen::MatrixXi A(N, N);
+  A.setRandom();
+  std::cout << "A =\n" << A << '\n' << std::endl;
+  std::cout << "A(1..3,:) =\n" << A.middleCols(1, 3) << std::endl;
+  return 0;
 }
diff --git a/doc/examples/DenseBase_middleRows_int.cpp b/doc/examples/DenseBase_middleRows_int.cpp
index 8651629..6a25500 100644
--- a/doc/examples/DenseBase_middleRows_int.cpp
+++ b/doc/examples/DenseBase_middleRows_int.cpp
@@ -1,12 +1,11 @@
 #include <Eigen/Core>
 #include <iostream>
 
-int main()
-{
-    int const N = 5;
-    Eigen::MatrixXi A(N,N);
-    A.setRandom();
-    std::cout << "A =\n" << A << '\n' << std::endl;
-    std::cout << "A(2..3,:) =\n" << A.middleRows(2,2) << std::endl;
-    return 0;
+int main() {
+  int const N = 5;
+  Eigen::MatrixXi A(N, N);
+  A.setRandom();
+  std::cout << "A =\n" << A << '\n' << std::endl;
+  std::cout << "A(2..3,:) =\n" << A.middleRows(2, 2) << std::endl;
+  return 0;
 }
diff --git a/doc/examples/DenseBase_template_int_middleCols.cpp b/doc/examples/DenseBase_template_int_middleCols.cpp
index caefabf..52c032c 100644
--- a/doc/examples/DenseBase_template_int_middleCols.cpp
+++ b/doc/examples/DenseBase_template_int_middleCols.cpp
@@ -1,12 +1,11 @@
 #include <Eigen/Core>
 #include <iostream>
 
-int main()
-{
-    int const N = 5;
-    Eigen::MatrixXi A(N,N);
-    A.setRandom();
-    std::cout << "A =\n" << A << '\n' << std::endl;
-    std::cout << "A(:,1..3) =\n" << A.middleCols<3>(1) << std::endl;
-    return 0;
+int main() {
+  int const N = 5;
+  Eigen::MatrixXi A(N, N);
+  A.setRandom();
+  std::cout << "A =\n" << A << '\n' << std::endl;
+  std::cout << "A(:,1..3) =\n" << A.middleCols<3>(1) << std::endl;
+  return 0;
 }
diff --git a/doc/examples/DenseBase_template_int_middleRows.cpp b/doc/examples/DenseBase_template_int_middleRows.cpp
index ed5b295..4db5e70 100644
--- a/doc/examples/DenseBase_template_int_middleRows.cpp
+++ b/doc/examples/DenseBase_template_int_middleRows.cpp
@@ -1,12 +1,11 @@
 #include <Eigen/Core>
 #include <iostream>
 
-int main()
-{
-    int const N = 5;
-    Eigen::MatrixXi A(N,N);
-    A.setRandom();
-    std::cout << "A =\n" << A << '\n' << std::endl;
-    std::cout << "A(1..3,:) =\n" << A.middleRows<3>(1) << std::endl;
-    return 0;
+int main() {
+  int const N = 5;
+  Eigen::MatrixXi A(N, N);
+  A.setRandom();
+  std::cout << "A =\n" << A << '\n' << std::endl;
+  std::cout << "A(1..3,:) =\n" << A.middleRows<3>(1) << std::endl;
+  return 0;
 }
diff --git a/doc/examples/QuickStart_example.cpp b/doc/examples/QuickStart_example.cpp
index 7238c0c..103ddd5 100644
--- a/doc/examples/QuickStart_example.cpp
+++ b/doc/examples/QuickStart_example.cpp
@@ -3,12 +3,11 @@
 
 using Eigen::MatrixXd;
 
-int main()
-{
-  MatrixXd m(2,2);
-  m(0,0) = 3;
-  m(1,0) = 2.5;
-  m(0,1) = -1;
-  m(1,1) = m(1,0) + m(0,1);
+int main() {
+  MatrixXd m(2, 2);
+  m(0, 0) = 3;
+  m(1, 0) = 2.5;
+  m(0, 1) = -1;
+  m(1, 1) = m(1, 0) + m(0, 1);
   std::cout << m << std::endl;
 }
diff --git a/doc/examples/QuickStart_example2_dynamic.cpp b/doc/examples/QuickStart_example2_dynamic.cpp
index bc8d326..c7e7c32 100644
--- a/doc/examples/QuickStart_example2_dynamic.cpp
+++ b/doc/examples/QuickStart_example2_dynamic.cpp
@@ -4,10 +4,9 @@
 using Eigen::MatrixXd;
 using Eigen::VectorXd;
 
-int main()
-{
-  MatrixXd m = MatrixXd::Random(3,3);
-  m = (m + MatrixXd::Constant(3,3,1.2)) * 50;
+int main() {
+  MatrixXd m = MatrixXd::Random(3, 3);
+  m = (m + MatrixXd::Constant(3, 3, 1.2)) * 50;
   std::cout << "m =" << std::endl << m << std::endl;
   VectorXd v(3);
   v << 1, 2, 3;
diff --git a/doc/examples/QuickStart_example2_fixed.cpp b/doc/examples/QuickStart_example2_fixed.cpp
index af6f9a9..e643a47 100644
--- a/doc/examples/QuickStart_example2_fixed.cpp
+++ b/doc/examples/QuickStart_example2_fixed.cpp
@@ -4,12 +4,11 @@
 using Eigen::Matrix3d;
 using Eigen::Vector3d;
 
-int main()
-{
+int main() {
   Matrix3d m = Matrix3d::Random();
   m = (m + Matrix3d::Constant(1.2)) * 50;
   std::cout << "m =" << std::endl << m << std::endl;
-  Vector3d v(1,2,3);
-  
+  Vector3d v(1, 2, 3);
+
   std::cout << "m * v =" << std::endl << m * v << std::endl;
 }
diff --git a/doc/examples/TemplateKeyword_flexible.cpp b/doc/examples/TemplateKeyword_flexible.cpp
index efe458b..09919a3 100644
--- a/doc/examples/TemplateKeyword_flexible.cpp
+++ b/doc/examples/TemplateKeyword_flexible.cpp
@@ -2,19 +2,17 @@
 #include <iostream>
 
 template <typename Derived1, typename Derived2>
-void copyUpperTriangularPart(Eigen::MatrixBase<Derived1>& dst, const Eigen::MatrixBase<Derived2>& src)
-{
+void copyUpperTriangularPart(Eigen::MatrixBase<Derived1>& dst, const Eigen::MatrixBase<Derived2>& src) {
   /* Note the 'template' keywords in the following line! */
   dst.template triangularView<Eigen::Upper>() = src.template triangularView<Eigen::Upper>();
 }
 
-int main()
-{
-  Eigen::MatrixXi m1 = Eigen::MatrixXi::Ones(5,5);
-  Eigen::MatrixXi m2 = Eigen::MatrixXi::Random(4,4);
+int main() {
+  Eigen::MatrixXi m1 = Eigen::MatrixXi::Ones(5, 5);
+  Eigen::MatrixXi m2 = Eigen::MatrixXi::Random(4, 4);
   std::cout << "m2 before copy:" << std::endl;
   std::cout << m2 << std::endl << std::endl;
-  copyUpperTriangularPart(m2, m1.topLeftCorner(4,4));
+  copyUpperTriangularPart(m2, m1.topLeftCorner(4, 4));
   std::cout << "m2 after copy:" << std::endl;
   std::cout << m2 << std::endl << std::endl;
 }
diff --git a/doc/examples/TemplateKeyword_simple.cpp b/doc/examples/TemplateKeyword_simple.cpp
index 6b946ad..4902988 100644
--- a/doc/examples/TemplateKeyword_simple.cpp
+++ b/doc/examples/TemplateKeyword_simple.cpp
@@ -3,15 +3,13 @@
 
 using Eigen::MatrixXf;
 
-void copyUpperTriangularPart(MatrixXf& dst, const MatrixXf& src)
-{
+void copyUpperTriangularPart(MatrixXf& dst, const MatrixXf& src) {
   dst.triangularView<Eigen::Upper>() = src.triangularView<Eigen::Upper>();
 }
 
-int main()
-{
-  MatrixXf m1 = MatrixXf::Ones(4,4);
-  MatrixXf m2 = MatrixXf::Random(4,4);
+int main() {
+  MatrixXf m1 = MatrixXf::Ones(4, 4);
+  MatrixXf m2 = MatrixXf::Random(4, 4);
   std::cout << "m2 before copy:" << std::endl;
   std::cout << m2 << std::endl << std::endl;
   copyUpperTriangularPart(m2, m1);
diff --git a/doc/examples/TutorialInplaceLU.cpp b/doc/examples/TutorialInplaceLU.cpp
index 72bead2..06f7e53 100644
--- a/doc/examples/TutorialInplaceLU.cpp
+++ b/doc/examples/TutorialInplaceLU.cpp
@@ -6,9 +6,8 @@
 // [init]
 #include <Eigen/Dense>
 
-int main()
-{
-  Eigen::MatrixXd A(2,2);
+int main() {
+  Eigen::MatrixXd A(2, 2);
   A << 2, -1, 1, 3;
   std::cout << "Here is the input matrix A before decomposition:\n" << A << "\n";
   std::cout << "[init]\n";
@@ -23,8 +22,10 @@
   std::cout << "[matrixLU]\n";
 
   std::cout << "[solve]\n";
-  Eigen::MatrixXd A0(2,2); A0 << 2, -1, 1, 3;
-  Eigen::VectorXd b(2);    b << 1, 2;
+  Eigen::MatrixXd A0(2, 2);
+  A0 << 2, -1, 1, 3;
+  Eigen::VectorXd b(2);
+  b << 1, 2;
   Eigen::VectorXd x = lu.solve(b);
   std::cout << "Residual: " << (A0 * x - b).norm() << "\n";
   std::cout << "[solve]\n";
@@ -36,15 +37,15 @@
   std::cout << "[modifyA]\n";
 
   std::cout << "[recompute]\n";
-  A0 = A; // save A
+  A0 = A;  // save A
   lu.compute(A);
   x = lu.solve(b);
   std::cout << "Residual: " << (A0 * x - b).norm() << "\n";
   std::cout << "[recompute]\n";
 
   std::cout << "[recompute_bis0]\n";
-  Eigen::MatrixXd A1(2,2);
-  A1 << 5,-2,3,4;
+  Eigen::MatrixXd A1(2, 2);
+  A1 << 5, -2, 3, 4;
   lu.compute(A1);
   std::cout << "Here is the input matrix A1 after decomposition:\n" << A1 << "\n";
   std::cout << "[recompute_bis0]\n";
@@ -53,5 +54,4 @@
   x = lu.solve(b);
   std::cout << "Residual: " << (A1 * x - b).norm() << "\n";
   std::cout << "[recompute_bis1]\n";
-
 }
diff --git a/doc/examples/TutorialLinAlgComputeTwice.cpp b/doc/examples/TutorialLinAlgComputeTwice.cpp
index a561f08..41ff22e 100644
--- a/doc/examples/TutorialLinAlgComputeTwice.cpp
+++ b/doc/examples/TutorialLinAlgComputeTwice.cpp
@@ -1,20 +1,19 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-   Eigen::Matrix2f A, b;
-   Eigen::LLT<Eigen::Matrix2f> llt;
-   A << 2, -1, -1, 3;
-   b << 1, 2, 3, 1;
-   std::cout << "Here is the matrix A:\n" << A << std::endl;
-   std::cout << "Here is the right hand side b:\n" << b << std::endl;
-   std::cout << "Computing LLT decomposition..." << std::endl;
-   llt.compute(A);
-   std::cout << "The solution is:\n" << llt.solve(b) << std::endl;
-   A(1,1)++;
-   std::cout << "The matrix A is now:\n" << A << std::endl;
-   std::cout << "Computing LLT decomposition..." << std::endl;
-   llt.compute(A);
-   std::cout << "The solution is now:\n" << llt.solve(b) << std::endl;
+int main() {
+  Eigen::Matrix2f A, b;
+  Eigen::LLT<Eigen::Matrix2f> llt;
+  A << 2, -1, -1, 3;
+  b << 1, 2, 3, 1;
+  std::cout << "Here is the matrix A:\n" << A << std::endl;
+  std::cout << "Here is the right hand side b:\n" << b << std::endl;
+  std::cout << "Computing LLT decomposition..." << std::endl;
+  llt.compute(A);
+  std::cout << "The solution is:\n" << llt.solve(b) << std::endl;
+  A(1, 1)++;
+  std::cout << "The matrix A is now:\n" << A << std::endl;
+  std::cout << "Computing LLT decomposition..." << std::endl;
+  llt.compute(A);
+  std::cout << "The solution is now:\n" << llt.solve(b) << std::endl;
 }
diff --git a/doc/examples/TutorialLinAlgExComputeSolveError.cpp b/doc/examples/TutorialLinAlgExComputeSolveError.cpp
index 199f3f5..268aa35 100644
--- a/doc/examples/TutorialLinAlgExComputeSolveError.cpp
+++ b/doc/examples/TutorialLinAlgExComputeSolveError.cpp
@@ -3,11 +3,10 @@
 
 using Eigen::MatrixXd;
 
-int main()
-{
-   MatrixXd A = MatrixXd::Random(100,100);
-   MatrixXd b = MatrixXd::Random(100,50);
-   MatrixXd x = A.fullPivLu().solve(b);
-   double relative_error = (A*x - b).norm() / b.norm(); // norm() is L2 norm
-   std::cout << "The relative error is:\n" << relative_error << std::endl;
+int main() {
+  MatrixXd A = MatrixXd::Random(100, 100);
+  MatrixXd b = MatrixXd::Random(100, 50);
+  MatrixXd x = A.fullPivLu().solve(b);
+  double relative_error = (A * x - b).norm() / b.norm();  // norm() is L2 norm
+  std::cout << "The relative error is:\n" << relative_error << std::endl;
 }
diff --git a/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp b/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp
index 5ee6b6a..7caed4a 100644
--- a/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp
+++ b/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp
@@ -1,14 +1,13 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-   Eigen::Matrix3f A;
-   Eigen::Vector3f b;
-   A << 1,2,3,  4,5,6,  7,8,10;
-   b << 3, 3, 4;
-   std::cout << "Here is the matrix A:\n" << A << std::endl;
-   std::cout << "Here is the vector b:\n" << b << std::endl;
-   Eigen::Vector3f x = A.colPivHouseholderQr().solve(b);
-   std::cout << "The solution is:\n" << x << std::endl;
+int main() {
+  Eigen::Matrix3f A;
+  Eigen::Vector3f b;
+  A << 1, 2, 3, 4, 5, 6, 7, 8, 10;
+  b << 3, 3, 4;
+  std::cout << "Here is the matrix A:\n" << A << std::endl;
+  std::cout << "Here is the vector b:\n" << b << std::endl;
+  Eigen::Vector3f x = A.colPivHouseholderQr().solve(b);
+  std::cout << "The solution is:\n" << x << std::endl;
 }
diff --git a/doc/examples/TutorialLinAlgExSolveLDLT.cpp b/doc/examples/TutorialLinAlgExSolveLDLT.cpp
index 82186d4..c11557d 100644
--- a/doc/examples/TutorialLinAlgExSolveLDLT.cpp
+++ b/doc/examples/TutorialLinAlgExSolveLDLT.cpp
@@ -1,13 +1,12 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-   Eigen::Matrix2f A, b;
-   A << 2, -1, -1, 3;
-   b << 1, 2, 3, 1;
-   std::cout << "Here is the matrix A:\n" << A << std::endl;
-   std::cout << "Here is the right hand side b:\n" << b << std::endl;
-   Eigen::Matrix2f x = A.ldlt().solve(b);
-   std::cout << "The solution is:\n" << x << std::endl;
+int main() {
+  Eigen::Matrix2f A, b;
+  A << 2, -1, -1, 3;
+  b << 1, 2, 3, 1;
+  std::cout << "Here is the matrix A:\n" << A << std::endl;
+  std::cout << "Here is the right hand side b:\n" << b << std::endl;
+  Eigen::Matrix2f x = A.ldlt().solve(b);
+  std::cout << "The solution is:\n" << x << std::endl;
 }
diff --git a/doc/examples/TutorialLinAlgInverseDeterminant.cpp b/doc/examples/TutorialLinAlgInverseDeterminant.cpp
index b31a92a..c03fe5c 100644
--- a/doc/examples/TutorialLinAlgInverseDeterminant.cpp
+++ b/doc/examples/TutorialLinAlgInverseDeterminant.cpp
@@ -1,13 +1,10 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-   Eigen::Matrix3f A;
-   A << 1, 2, 1,
-        2, 1, 0,
-        -1, 1, 2;
-   std::cout << "Here is the matrix A:\n" << A << std::endl;
-   std::cout << "The determinant of A is " << A.determinant() << std::endl;
-   std::cout << "The inverse of A is:\n" << A.inverse() << std::endl;
+int main() {
+  Eigen::Matrix3f A;
+  A << 1, 2, 1, 2, 1, 0, -1, 1, 2;
+  std::cout << "Here is the matrix A:\n" << A << std::endl;
+  std::cout << "The determinant of A is " << A.determinant() << std::endl;
+  std::cout << "The inverse of A is:\n" << A.inverse() << std::endl;
 }
diff --git a/doc/examples/TutorialLinAlgRankRevealing.cpp b/doc/examples/TutorialLinAlgRankRevealing.cpp
index fea52ab..1f89146 100644
--- a/doc/examples/TutorialLinAlgRankRevealing.cpp
+++ b/doc/examples/TutorialLinAlgRankRevealing.cpp
@@ -1,17 +1,14 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-   Eigen::Matrix3f A;
-   A << 1, 2, 5,
-        2, 1, 4,
-        3, 0, 3;
-   std::cout << "Here is the matrix A:\n" << A << std::endl;
-   Eigen::FullPivLU<Eigen::Matrix3f> lu_decomp(A);
-   std::cout << "The rank of A is " << lu_decomp.rank() << std::endl;
-   std::cout << "Here is a matrix whose columns form a basis of the null-space of A:\n"
-        << lu_decomp.kernel() << std::endl;
-   std::cout << "Here is a matrix whose columns form a basis of the column-space of A:\n"
-        << lu_decomp.image(A) << std::endl; // yes, have to pass the original A
+int main() {
+  Eigen::Matrix3f A;
+  A << 1, 2, 5, 2, 1, 4, 3, 0, 3;
+  std::cout << "Here is the matrix A:\n" << A << std::endl;
+  Eigen::FullPivLU<Eigen::Matrix3f> lu_decomp(A);
+  std::cout << "The rank of A is " << lu_decomp.rank() << std::endl;
+  std::cout << "Here is a matrix whose columns form a basis of the null-space of A:\n"
+            << lu_decomp.kernel() << std::endl;
+  std::cout << "Here is a matrix whose columns form a basis of the column-space of A:\n"
+            << lu_decomp.image(A) << std::endl;  // yes, have to pass the original A
 }
diff --git a/doc/examples/TutorialLinAlgSVDSolve.cpp b/doc/examples/TutorialLinAlgSVDSolve.cpp
index 23ad422..3cee2b4 100644
--- a/doc/examples/TutorialLinAlgSVDSolve.cpp
+++ b/doc/examples/TutorialLinAlgSVDSolve.cpp
@@ -1,12 +1,11 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-   Eigen::MatrixXf A = Eigen::MatrixXf::Random(3, 2);
-   std::cout << "Here is the matrix A:\n" << A << std::endl;
-   Eigen::VectorXf b = Eigen::VectorXf::Random(3);
-   std::cout << "Here is the right hand side b:\n" << b << std::endl;
-   std::cout << "The least-squares solution is:\n"
-        << A.bdcSvd(Eigen::ComputeThinU | Eigen::ComputeThinV).solve(b) << std::endl;
+int main() {
+  Eigen::MatrixXf A = Eigen::MatrixXf::Random(3, 2);
+  std::cout << "Here is the matrix A:\n" << A << std::endl;
+  Eigen::VectorXf b = Eigen::VectorXf::Random(3);
+  std::cout << "Here is the right hand side b:\n" << b << std::endl;
+  std::cout << "The least-squares solution is:\n"
+            << A.bdcSvd(Eigen::ComputeThinU | Eigen::ComputeThinV).solve(b) << std::endl;
 }
diff --git a/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp b/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp
index fcf2f33..6faccb6 100644
--- a/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp
+++ b/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp
@@ -1,15 +1,14 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-   Eigen::Matrix2f A;
-   A << 1, 2, 2, 3;
-   std::cout << "Here is the matrix A:\n" << A << std::endl;
-   Eigen::SelfAdjointEigenSolver<Eigen::Matrix2f> eigensolver(A);
-   if (eigensolver.info() != Eigen::Success) abort();
-   std::cout << "The eigenvalues of A are:\n" << eigensolver.eigenvalues() << std::endl;
-   std::cout << "Here's a matrix whose columns are eigenvectors of A \n"
-        << "corresponding to these eigenvalues:\n"
-        << eigensolver.eigenvectors() << std::endl;
+int main() {
+  Eigen::Matrix2f A;
+  A << 1, 2, 2, 3;
+  std::cout << "Here is the matrix A:\n" << A << std::endl;
+  Eigen::SelfAdjointEigenSolver<Eigen::Matrix2f> eigensolver(A);
+  if (eigensolver.info() != Eigen::Success) abort();
+  std::cout << "The eigenvalues of A are:\n" << eigensolver.eigenvalues() << std::endl;
+  std::cout << "Here's a matrix whose columns are eigenvectors of A \n"
+            << "corresponding to these eigenvalues:\n"
+            << eigensolver.eigenvectors() << std::endl;
 }
diff --git a/doc/examples/TutorialLinAlgSetThreshold.cpp b/doc/examples/TutorialLinAlgSetThreshold.cpp
index e1335e7..97251f8 100644
--- a/doc/examples/TutorialLinAlgSetThreshold.cpp
+++ b/doc/examples/TutorialLinAlgSetThreshold.cpp
@@ -1,13 +1,11 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-   Eigen::Matrix2d A;
-   A << 2, 1,
-        2, 0.9999999999;
-   Eigen::FullPivLU<Eigen::Matrix2d> lu(A);
-   std::cout << "By default, the rank of A is found to be " << lu.rank() << std::endl;
-   lu.setThreshold(1e-5);
-   std::cout << "With threshold 1e-5, the rank of A is found to be " << lu.rank() << std::endl;
+int main() {
+  Eigen::Matrix2d A;
+  A << 2, 1, 2, 0.9999999999;
+  Eigen::FullPivLU<Eigen::Matrix2d> lu(A);
+  std::cout << "By default, the rank of A is found to be " << lu.rank() << std::endl;
+  lu.setThreshold(1e-5);
+  std::cout << "With threshold 1e-5, the rank of A is found to be " << lu.rank() << std::endl;
 }
diff --git a/doc/examples/Tutorial_ArrayClass_accessors.cpp b/doc/examples/Tutorial_ArrayClass_accessors.cpp
index 0db52a3..5e91deb 100644
--- a/doc/examples/Tutorial_ArrayClass_accessors.cpp
+++ b/doc/examples/Tutorial_ArrayClass_accessors.cpp
@@ -1,21 +1,21 @@
 #include <Eigen/Dense>
 #include <iostream>
 
-int main()
-{
-  Eigen::ArrayXXf  m(2,2);
-  
+int main() {
+  Eigen::ArrayXXf m(2, 2);
+
   // assign some values coefficient by coefficient
-  m(0,0) = 1.0; m(0,1) = 2.0;
-  m(1,0) = 3.0; m(1,1) = m(0,1) + m(1,0);
-  
+  m(0, 0) = 1.0;
+  m(0, 1) = 2.0;
+  m(1, 0) = 3.0;
+  m(1, 1) = m(0, 1) + m(1, 0);
+
   // print values to standard output
   std::cout << m << std::endl << std::endl;
- 
+
   // using the comma-initializer is also allowed
-  m << 1.0,2.0,
-       3.0,4.0;
-     
+  m << 1.0, 2.0, 3.0, 4.0;
+
   // print values to standard output
   std::cout << m << std::endl;
 }
diff --git a/doc/examples/Tutorial_ArrayClass_addition.cpp b/doc/examples/Tutorial_ArrayClass_addition.cpp
index 4a407a7..e9a8f3e 100644
--- a/doc/examples/Tutorial_ArrayClass_addition.cpp
+++ b/doc/examples/Tutorial_ArrayClass_addition.cpp
@@ -1,17 +1,12 @@
 #include <Eigen/Dense>
 #include <iostream>
 
-int main()
-{
-  Eigen::ArrayXXf a(3,3);
-  Eigen::ArrayXXf b(3,3);
-  a << 1,2,3,
-       4,5,6,
-       7,8,9;
-  b << 1,2,3,
-       1,2,3,
-       1,2,3;
-       
+int main() {
+  Eigen::ArrayXXf a(3, 3);
+  Eigen::ArrayXXf b(3, 3);
+  a << 1, 2, 3, 4, 5, 6, 7, 8, 9;
+  b << 1, 2, 3, 1, 2, 3, 1, 2, 3;
+
   // Adding two arrays
   std::cout << "a + b = " << std::endl << a + b << std::endl << std::endl;
 
diff --git a/doc/examples/Tutorial_ArrayClass_cwise_other.cpp b/doc/examples/Tutorial_ArrayClass_cwise_other.cpp
index 12483f3..cbd3238 100644
--- a/doc/examples/Tutorial_ArrayClass_cwise_other.cpp
+++ b/doc/examples/Tutorial_ArrayClass_cwise_other.cpp
@@ -1,16 +1,11 @@
 #include <Eigen/Dense>
 #include <iostream>
 
-int main()
-{
+int main() {
   Eigen::ArrayXf a = Eigen::ArrayXf::Random(5);
   a *= 2;
-  std::cout << "a =" << std::endl
-            << a << std::endl;
-  std::cout << "a.abs() =" << std::endl
-            << a.abs() << std::endl;
-  std::cout << "a.abs().sqrt() =" << std::endl
-            << a.abs().sqrt() << std::endl;
-  std::cout << "a.min(a.abs().sqrt()) =" << std::endl
-            << a.min(a.abs().sqrt()) << std::endl;
+  std::cout << "a =" << std::endl << a << std::endl;
+  std::cout << "a.abs() =" << std::endl << a.abs() << std::endl;
+  std::cout << "a.abs().sqrt() =" << std::endl << a.abs().sqrt() << std::endl;
+  std::cout << "a.min(a.abs().sqrt()) =" << std::endl << a.min(a.abs().sqrt()) << std::endl;
 }
diff --git a/doc/examples/Tutorial_ArrayClass_interop.cpp b/doc/examples/Tutorial_ArrayClass_interop.cpp
index c9a8352..9b02f2a 100644
--- a/doc/examples/Tutorial_ArrayClass_interop.cpp
+++ b/doc/examples/Tutorial_ArrayClass_interop.cpp
@@ -3,17 +3,14 @@
 
 using Eigen::MatrixXf;
 
-int main()
-{
-  MatrixXf m(2,2);
-  MatrixXf n(2,2);
-  MatrixXf result(2,2);
+int main() {
+  MatrixXf m(2, 2);
+  MatrixXf n(2, 2);
+  MatrixXf result(2, 2);
 
-  m << 1,2,
-       3,4;
-  n << 5,6,
-       7,8;
-  
+  m << 1, 2, 3, 4;
+  n << 5, 6, 7, 8;
+
   result = (m.array() + 4).matrix() * m;
   std::cout << "-- Combination 1: --\n" << result << "\n\n";
   result = (m.array() * n.array()).matrix() * m;
diff --git a/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp b/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp
index 07ec9b0..b5bc6ae 100644
--- a/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp
+++ b/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp
@@ -3,16 +3,13 @@
 
 using Eigen::MatrixXf;
 
-int main()
-{
-  MatrixXf m(2,2);
-  MatrixXf n(2,2);
-  MatrixXf result(2,2);
+int main() {
+  MatrixXf m(2, 2);
+  MatrixXf n(2, 2);
+  MatrixXf result(2, 2);
 
-  m << 1,2,
-       3,4;
-  n << 5,6,
-       7,8;
+  m << 1, 2, 3, 4;
+  n << 5, 6, 7, 8;
 
   result = m * n;
   std::cout << "-- Matrix m*n: --\n" << result << "\n\n";
diff --git a/doc/examples/Tutorial_ArrayClass_mult.cpp b/doc/examples/Tutorial_ArrayClass_mult.cpp
index bada36c..39c2300 100644
--- a/doc/examples/Tutorial_ArrayClass_mult.cpp
+++ b/doc/examples/Tutorial_ArrayClass_mult.cpp
@@ -1,13 +1,10 @@
 #include <Eigen/Dense>
 #include <iostream>
 
-int main()
-{
-  Eigen::ArrayXXf a(2,2);
-  Eigen::ArrayXXf b(2,2);
-  a << 1,2,
-       3,4;
-  b << 5,6,
-       7,8;
+int main() {
+  Eigen::ArrayXXf a(2, 2);
+  Eigen::ArrayXXf b(2, 2);
+  a << 1, 2, 3, 4;
+  b << 5, 6, 7, 8;
   std::cout << "a * b = " << std::endl << a * b << std::endl;
 }
diff --git a/doc/examples/Tutorial_BlockOperations_block_assignment.cpp b/doc/examples/Tutorial_BlockOperations_block_assignment.cpp
index 26ad478..27b88b3 100644
--- a/doc/examples/Tutorial_BlockOperations_block_assignment.cpp
+++ b/doc/examples/Tutorial_BlockOperations_block_assignment.cpp
@@ -1,15 +1,13 @@
 #include <Eigen/Dense>
 #include <iostream>
 
-int main()
-{
+int main() {
   Eigen::Array22f m;
-  m << 1,2,
-       3,4;
+  m << 1, 2, 3, 4;
   Eigen::Array44f a = Eigen::Array44f::Constant(0.6);
   std::cout << "Here is the array a:\n" << a << "\n\n";
-  a.block<2,2>(1,1) = m;
+  a.block<2, 2>(1, 1) = m;
   std::cout << "Here is now a with m copied into its central 2x2 block:\n" << a << "\n\n";
-  a.block(0,0,2,3) = a.block(2,1,2,3);
+  a.block(0, 0, 2, 3) = a.block(2, 1, 2, 3);
   std::cout << "Here is now a with bottom-right 2x3 block copied into top-left 2x3 block:\n" << a << "\n\n";
 }
diff --git a/doc/examples/Tutorial_BlockOperations_colrow.cpp b/doc/examples/Tutorial_BlockOperations_colrow.cpp
index 2e7eb00..b236334 100644
--- a/doc/examples/Tutorial_BlockOperations_colrow.cpp
+++ b/doc/examples/Tutorial_BlockOperations_colrow.cpp
@@ -3,12 +3,9 @@
 
 using namespace std;
 
-int main()
-{
-  Eigen::MatrixXf m(3,3);
-  m << 1,2,3,
-       4,5,6,
-       7,8,9;
+int main() {
+  Eigen::MatrixXf m(3, 3);
+  m << 1, 2, 3, 4, 5, 6, 7, 8, 9;
   cout << "Here is the matrix m:" << endl << m << endl;
   cout << "2nd Row: " << m.row(1) << endl;
   m.col(2) += 3 * m.col(0);
diff --git a/doc/examples/Tutorial_BlockOperations_corner.cpp b/doc/examples/Tutorial_BlockOperations_corner.cpp
index 3a31507..cd093fc 100644
--- a/doc/examples/Tutorial_BlockOperations_corner.cpp
+++ b/doc/examples/Tutorial_BlockOperations_corner.cpp
@@ -3,15 +3,11 @@
 
 using namespace std;
 
-int main()
-{
+int main() {
   Eigen::Matrix4f m;
-  m << 1, 2, 3, 4,
-       5, 6, 7, 8,
-       9, 10,11,12,
-       13,14,15,16;
+  m << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16;
   cout << "m.leftCols(2) =" << endl << m.leftCols(2) << endl << endl;
   cout << "m.bottomRows<2>() =" << endl << m.bottomRows<2>() << endl << endl;
-  m.topLeftCorner(1,3) = m.bottomRightCorner(3,1).transpose();
+  m.topLeftCorner(1, 3) = m.bottomRightCorner(3, 1).transpose();
   cout << "After assignment, m = " << endl << m << endl;
 }
diff --git a/doc/examples/Tutorial_BlockOperations_print_block.cpp b/doc/examples/Tutorial_BlockOperations_print_block.cpp
index edea4ae..7c65ddb 100644
--- a/doc/examples/Tutorial_BlockOperations_print_block.cpp
+++ b/doc/examples/Tutorial_BlockOperations_print_block.cpp
@@ -3,18 +3,13 @@
 
 using namespace std;
 
-int main()
-{
-  Eigen::MatrixXf m(4,4);
-  m <<  1, 2, 3, 4,
-        5, 6, 7, 8,
-        9,10,11,12,
-       13,14,15,16;
+int main() {
+  Eigen::MatrixXf m(4, 4);
+  m << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16;
   cout << "Block in the middle" << endl;
-  cout << m.block<2,2>(1,1) << endl << endl;
-  for (int i = 1; i <= 3; ++i)
-  {
+  cout << m.block<2, 2>(1, 1) << endl << endl;
+  for (int i = 1; i <= 3; ++i) {
     cout << "Block of size " << i << "x" << i << endl;
-    cout << m.block(0,0,i,i) << endl << endl;
+    cout << m.block(0, 0, i, i) << endl << endl;
   }
 }
diff --git a/doc/examples/Tutorial_BlockOperations_vector.cpp b/doc/examples/Tutorial_BlockOperations_vector.cpp
index 4a0b023..0ce2b0b 100644
--- a/doc/examples/Tutorial_BlockOperations_vector.cpp
+++ b/doc/examples/Tutorial_BlockOperations_vector.cpp
@@ -3,12 +3,11 @@
 
 using namespace std;
 
-int main()
-{
+int main() {
   Eigen::ArrayXf v(6);
   v << 1, 2, 3, 4, 5, 6;
   cout << "v.head(3) =" << endl << v.head(3) << endl << endl;
   cout << "v.tail<3>() = " << endl << v.tail<3>() << endl << endl;
-  v.segment(1,4) *= 2;
+  v.segment(1, 4) *= 2;
   cout << "after 'v.segment(1,4) *= 2', v =" << endl << v << endl;
 }
diff --git a/doc/examples/Tutorial_PartialLU_solve.cpp b/doc/examples/Tutorial_PartialLU_solve.cpp
index ca72c99..bfc0973 100644
--- a/doc/examples/Tutorial_PartialLU_solve.cpp
+++ b/doc/examples/Tutorial_PartialLU_solve.cpp
@@ -2,14 +2,13 @@
 #include <Eigen/LU>
 #include <iostream>
 
-int main()
-{
-   Eigen::Matrix3f A;
-   Eigen::Vector3f b;
-   A << 1,2,3,  4,5,6,  7,8,10;
-   b << 3, 3, 4;
-   std::cout << "Here is the matrix A:" << std::endl << A << std::endl;
-   std::cout << "Here is the vector b:" << std::endl << b << std::endl;
-   Eigen::Vector3f x = A.lu().solve(b);
-   std::cout << "The solution is:" << std::endl << x << std::endl;
+int main() {
+  Eigen::Matrix3f A;
+  Eigen::Vector3f b;
+  A << 1, 2, 3, 4, 5, 6, 7, 8, 10;
+  b << 3, 3, 4;
+  std::cout << "Here is the matrix A:" << std::endl << A << std::endl;
+  std::cout << "Here is the vector b:" << std::endl << b << std::endl;
+  Eigen::Vector3f x = A.lu().solve(b);
+  std::cout << "The solution is:" << std::endl << x << std::endl;
 }
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp
index 8ef06be..61ab75f 100644
--- a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp
+++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp
@@ -1,16 +1,13 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-  Eigen::MatrixXf m(2,4);
+int main() {
+  Eigen::MatrixXf m(2, 4);
   Eigen::VectorXf v(2);
-  
-  m << 1, 23, 6, 9,
-       3, 11, 7, 2;
-       
-  v << 2,
-       3;
+
+  m << 1, 23, 6, 9, 3, 11, 7, 2;
+
+  v << 2, 3;
 
   Eigen::Index index;
   // find nearest neighbour
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp
index e6c87c6..63ee724 100644
--- a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp
+++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp
@@ -2,20 +2,17 @@
 #include <Eigen/Dense>
 
 using namespace std;
-int main()
-{
-  Eigen::MatrixXf mat(2,4);
+int main() {
+  Eigen::MatrixXf mat(2, 4);
   Eigen::VectorXf v(2);
-  
-  mat << 1, 2, 6, 9,
-         3, 1, 7, 2;
-         
-  v << 0,
-       1;
-       
-  //add v to each column of m
+
+  mat << 1, 2, 6, 9, 3, 1, 7, 2;
+
+  v << 0, 1;
+
+  // add v to each column of m
   mat.colwise() += v;
-  
+
   std::cout << "Broadcasting result: " << std::endl;
   std::cout << mat << std::endl;
 }
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp
index d87c96a..1f937ad 100644
--- a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp
+++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp
@@ -2,19 +2,17 @@
 #include <Eigen/Dense>
 
 using namespace std;
-int main()
-{
-  Eigen::MatrixXf mat(2,4);
+int main() {
+  Eigen::MatrixXf mat(2, 4);
   Eigen::VectorXf v(4);
-  
-  mat << 1, 2, 6, 9,
-         3, 1, 7, 2;
-         
-  v << 0,1,2,3;
-       
-  //add v to each row of m
+
+  mat << 1, 2, 6, 9, 3, 1, 7, 2;
+
+  v << 0, 1, 2, 3;
+
+  // add v to each row of m
   mat.rowwise() += v.transpose();
-  
+
   std::cout << "Broadcasting result: " << std::endl;
   std::cout << mat << std::endl;
 }
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp
index df68256..f40184b 100644
--- a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp
+++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp
@@ -2,12 +2,9 @@
 #include <Eigen/Dense>
 
 using namespace std;
-int main()
-{
-  Eigen::MatrixXf mat(2,4);
-  mat << 1, 2, 6, 9,
-         3, 1, 7, 2;
-  
-  std::cout << "Column's maximum: " << std::endl
-   << mat.colwise().maxCoeff() << std::endl;
+int main() {
+  Eigen::MatrixXf mat(2, 4);
+  mat << 1, 2, 6, 9, 3, 1, 7, 2;
+
+  std::cout << "Column's maximum: " << std::endl << mat.colwise().maxCoeff() << std::endl;
 }
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp
index b5d88c3..88e319d 100644
--- a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp
+++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp
@@ -1,18 +1,16 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-  Eigen::MatrixXf mat(2,4);
-  mat << 1, 2, 6, 9,
-         3, 1, 7, 2;
-  
-  Eigen::Index   maxIndex;
+int main() {
+  Eigen::MatrixXf mat(2, 4);
+  mat << 1, 2, 6, 9, 3, 1, 7, 2;
+
+  Eigen::Index maxIndex;
   float maxNorm = mat.colwise().sum().maxCoeff(&maxIndex);
-  
+
   std::cout << "Maximum sum at position " << maxIndex << std::endl;
 
   std::cout << "The corresponding vector is: " << std::endl;
-  std::cout << mat.col( maxIndex ) << std::endl;
+  std::cout << mat.col(maxIndex) << std::endl;
   std::cout << "And its sum is is: " << maxNorm << std::endl;
 }
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp
index 7b89bcf..71f2030 100644
--- a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp
+++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp
@@ -1,12 +1,10 @@
 #include <Eigen/Dense>
 #include <iostream>
 
-int main()
-{
-  Eigen::ArrayXXf a(2,2);
-  
-  a << 1,2,
-       3,4;
+int main() {
+  Eigen::ArrayXXf a(2, 2);
+
+  a << 1, 2, 3, 4;
 
   std::cout << "(a > 0).all()   = " << (a > 0).all() << std::endl;
   std::cout << "(a > 0).any()   = " << (a > 0).any() << std::endl;
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp
index 7519137..75bfee0 100644
--- a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp
+++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp
@@ -1,16 +1,13 @@
 #include <Eigen/Dense>
 #include <iostream>
 
-int main()
-{
+int main() {
   Eigen::VectorXf v(2);
-  Eigen::MatrixXf m(2,2), n(2,2);
-  
-  v << -1,
-       2;
-  
-  m << 1,-2,
-       -3,4;
+  Eigen::MatrixXf m(2, 2), n(2, 2);
+
+  v << -1, 2;
+
+  m << 1, -2, -3, 4;
 
   std::cout << "v.squaredNorm() = " << v.squaredNorm() << std::endl;
   std::cout << "v.norm() = " << v.norm() << std::endl;
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp
index 8faa5a1..695f538 100644
--- a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp
+++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp
@@ -1,15 +1,13 @@
 #include <Eigen/Dense>
 #include <iostream>
 
-int main()
-{
-  Eigen::MatrixXf m(2,2);
-  m << 1,-2,
-       -3,4;
+int main() {
+  Eigen::MatrixXf m(2, 2);
+  m << 1, -2, -3, 4;
 
   std::cout << "1-norm(m)     = " << m.cwiseAbs().colwise().sum().maxCoeff()
-            << " == "             << m.colwise().lpNorm<1>().maxCoeff() << std::endl;
+            << " == " << m.colwise().lpNorm<1>().maxCoeff() << std::endl;
 
   std::cout << "infty-norm(m) = " << m.cwiseAbs().rowwise().sum().maxCoeff()
-            << " == "             << m.rowwise().lpNorm<1>().maxCoeff() << std::endl;
+            << " == " << m.rowwise().lpNorm<1>().maxCoeff() << std::endl;
 }
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp
index 80427c9..b525b2a 100644
--- a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp
+++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp
@@ -2,12 +2,9 @@
 #include <Eigen/Dense>
 
 using namespace std;
-int main()
-{
-  Eigen::MatrixXf mat(2,4);
-  mat << 1, 2, 6, 9,
-         3, 1, 7, 2;
-  
-  std::cout << "Row's maximum: " << std::endl
-   << mat.rowwise().maxCoeff() << std::endl;
+int main() {
+  Eigen::MatrixXf mat(2, 4);
+  mat << 1, 2, 6, 9, 3, 1, 7, 2;
+
+  std::cout << "Row's maximum: " << std::endl << mat.rowwise().maxCoeff() << std::endl;
 }
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp
index bd294bd..ce3ca7e 100644
--- a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp
+++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp
@@ -1,23 +1,19 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-  Eigen::MatrixXf m(2,2);
-  
-  m << 1, 2,
-       3, 4;
+int main() {
+  Eigen::MatrixXf m(2, 2);
 
-  //get location of maximum
+  m << 1, 2, 3, 4;
+
+  // get location of maximum
   Eigen::Index maxRow, maxCol;
   float max = m.maxCoeff(&maxRow, &maxCol);
 
-  //get location of minimum
+  // get location of minimum
   Eigen::Index minRow, minCol;
   float min = m.minCoeff(&minRow, &minCol);
 
-  std::cout << "Max: " << max <<  ", at: " <<
-     maxRow << "," << maxCol << std::endl;
-  std:: cout << "Min: " << min << ", at: " <<
-     minRow << "," << minCol << std::endl;
+  std::cout << "Max: " << max << ", at: " << maxRow << "," << maxCol << std::endl;
+  std::cout << "Min: " << min << ", at: " << minRow << "," << minCol << std::endl;
 }
diff --git a/doc/examples/Tutorial_simple_example_dynamic_size.cpp b/doc/examples/Tutorial_simple_example_dynamic_size.cpp
index 796bd87..102223f 100644
--- a/doc/examples/Tutorial_simple_example_dynamic_size.cpp
+++ b/doc/examples/Tutorial_simple_example_dynamic_size.cpp
@@ -1,20 +1,21 @@
 #include <Eigen/Core>
 #include <iostream>
 
-int main()
-{
-  for (int size=1; size<=4; ++size)
-  {
-    Eigen::MatrixXi m(size,size+1);         // a (size)x(size+1)-matrix of int's
-    for (int j=0; j<m.cols(); ++j)   // loop over columns
-      for (int i=0; i<m.rows(); ++i) // loop over rows
-        m(i,j) = i+j*size;           // to access matrix coefficients,
-                                     // use operator()(int,int)
+int main() {
+  for (int size = 1; size <= 4; ++size) {
+    Eigen::MatrixXi m(size, size + 1);    // a (size)x(size+1)-matrix of int's
+    for (int j = 0; j < m.cols(); ++j)    // loop over columns
+      for (int i = 0; i < m.rows(); ++i)  // loop over rows
+        m(i, j) = i + j * size;           // to access matrix coefficients,
+                                          // use operator()(int,int)
     std::cout << m << "\n\n";
   }
 
-  Eigen::VectorXf v(4); // a vector of 4 float's
+  Eigen::VectorXf v(4);  // a vector of 4 float's
   // to access vector coefficients, use either operator () or operator []
-  v[0] = 1; v[1] = 2; v(2) = 3; v(3) = 4;
+  v[0] = 1;
+  v[1] = 2;
+  v(2) = 3;
+  v(3) = 4;
   std::cout << "\nv:\n" << v << std::endl;
 }
diff --git a/doc/examples/Tutorial_simple_example_fixed_size.cpp b/doc/examples/Tutorial_simple_example_fixed_size.cpp
index 99a974d..8e20230 100644
--- a/doc/examples/Tutorial_simple_example_fixed_size.cpp
+++ b/doc/examples/Tutorial_simple_example_fixed_size.cpp
@@ -1,13 +1,11 @@
 #include <Eigen/Core>
 #include <iostream>
 
-int main()
-{
+int main() {
   Eigen::Matrix3f m3;
   m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9;
   Eigen::Matrix4f m4 = Eigen::Matrix4f::Identity();
   Eigen::Vector4i v4(1, 2, 3, 4);
 
-  std::cout << "m3\n" << m3 << "\nm4:\n"
-    << m4 << "\nv4:\n" << v4 << std::endl;
+  std::cout << "m3\n" << m3 << "\nm4:\n" << m4 << "\nv4:\n" << v4 << std::endl;
 }
diff --git a/doc/examples/class_Block.cpp b/doc/examples/class_Block.cpp
index 9ace0da..0fb9202 100644
--- a/doc/examples/class_Block.cpp
+++ b/doc/examples/class_Block.cpp
@@ -1,25 +1,20 @@
 #include <Eigen/Core>
 #include <iostream>
 
-template<typename Derived>
-Eigen::Block<Derived>
-topLeftCorner(Eigen::MatrixBase<Derived>& m, int rows, int cols)
-{
+template <typename Derived>
+Eigen::Block<Derived> topLeftCorner(Eigen::MatrixBase<Derived>& m, int rows, int cols) {
   return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols);
 }
 
-template<typename Derived>
-const Eigen::Block<const Derived>
-topLeftCorner(const Eigen::MatrixBase<Derived>& m, int rows, int cols)
-{
+template <typename Derived>
+const Eigen::Block<const Derived> topLeftCorner(const Eigen::MatrixBase<Derived>& m, int rows, int cols) {
   return Eigen::Block<const Derived>(m.derived(), 0, 0, rows, cols);
 }
 
-int main(int, char**)
-{
+int main(int, char**) {
   Eigen::Matrix4d m = Eigen::Matrix4d::Identity();
-  std::cout << topLeftCorner(4*m, 2, 3) << std::endl; // calls the const version
-  topLeftCorner(m, 2, 3) *= 5;              // calls the non-const version
+  std::cout << topLeftCorner(4 * m, 2, 3) << std::endl;  // calls the const version
+  topLeftCorner(m, 2, 3) *= 5;                           // calls the non-const version
   std::cout << "Now the matrix m is:" << std::endl << m << std::endl;
   return 0;
 }
diff --git a/doc/examples/class_CwiseBinaryOp.cpp b/doc/examples/class_CwiseBinaryOp.cpp
index 973befd..f8c1f92 100644
--- a/doc/examples/class_CwiseBinaryOp.cpp
+++ b/doc/examples/class_CwiseBinaryOp.cpp
@@ -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;
diff --git a/doc/examples/class_CwiseUnaryOp.cpp b/doc/examples/class_CwiseUnaryOp.cpp
index 6c65f2e..24177ce 100644
--- a/doc/examples/class_CwiseUnaryOp.cpp
+++ b/doc/examples/class_CwiseUnaryOp.cpp
@@ -2,16 +2,17 @@
 #include <iostream>
 
 // define a custom template unary functor
-template<typename Scalar>
+template <typename Scalar>
 struct CwiseClampOp {
   CwiseClampOp(const Scalar& inf, const Scalar& sup) : m_inf(inf), m_sup(sup) {}
-  const Scalar operator()(const Scalar& x) const { return x<m_inf ? m_inf : (x>m_sup ? m_sup : x); }
+  const Scalar operator()(const Scalar& x) const { return x < m_inf ? m_inf : (x > m_sup ? m_sup : x); }
   Scalar m_inf, m_sup;
 };
 
-int main(int, char**)
-{
+int main(int, char**) {
   Eigen::Matrix4d m1 = Eigen::Matrix4d::Random();
-  std::cout << m1 << std::endl << "becomes: " << std::endl << m1.unaryExpr(CwiseClampOp<double>(-0.5,0.5)) << std::endl;
+  std::cout << m1 << std::endl
+            << "becomes: " << std::endl
+            << m1.unaryExpr(CwiseClampOp<double>(-0.5, 0.5)) << std::endl;
   return 0;
 }
diff --git a/doc/examples/class_CwiseUnaryOp_ptrfun.cpp b/doc/examples/class_CwiseUnaryOp_ptrfun.cpp
index e97095e..279355c 100644
--- a/doc/examples/class_CwiseUnaryOp_ptrfun.cpp
+++ b/doc/examples/class_CwiseUnaryOp_ptrfun.cpp
@@ -2,16 +2,14 @@
 #include <iostream>
 
 // define function to be applied coefficient-wise
-double ramp(double x)
-{
+double ramp(double x) {
   if (x > 0)
     return x;
-  else 
+  else
     return 0;
 }
 
-int main(int, char**)
-{
+int main(int, char**) {
   Eigen::Matrix4d m1 = Eigen::Matrix4d::Random();
   std::cout << m1 << std::endl << "becomes: " << std::endl << m1.unaryExpr(std::ptr_fun(ramp)) << std::endl;
   return 0;
diff --git a/doc/examples/class_FixedBlock.cpp b/doc/examples/class_FixedBlock.cpp
index 4bb2d44..875e779 100644
--- a/doc/examples/class_FixedBlock.cpp
+++ b/doc/examples/class_FixedBlock.cpp
@@ -1,25 +1,20 @@
 #include <Eigen/Core>
 #include <iostream>
 
-template<typename Derived>
-Eigen::Block<Derived, 2, 2>
-topLeft2x2Corner(Eigen::MatrixBase<Derived>& m)
-{
+template <typename Derived>
+Eigen::Block<Derived, 2, 2> topLeft2x2Corner(Eigen::MatrixBase<Derived>& m) {
   return Eigen::Block<Derived, 2, 2>(m.derived(), 0, 0);
 }
 
-template<typename Derived>
-const Eigen::Block<const Derived, 2, 2>
-topLeft2x2Corner(const Eigen::MatrixBase<Derived>& m)
-{
+template <typename Derived>
+const Eigen::Block<const Derived, 2, 2> topLeft2x2Corner(const Eigen::MatrixBase<Derived>& m) {
   return Eigen::Block<const Derived, 2, 2>(m.derived(), 0, 0);
 }
 
-int main(int, char**)
-{
+int main(int, char**) {
   Eigen::Matrix3d m = Eigen::Matrix3d::Identity();
-  std::cout << topLeft2x2Corner(4*m) << std::endl; // calls the const version
-  topLeft2x2Corner(m) *= 2;              // calls the non-const version
+  std::cout << topLeft2x2Corner(4 * m) << std::endl;  // calls the const version
+  topLeft2x2Corner(m) *= 2;                           // calls the non-const version
   std::cout << "Now the matrix m is:" << std::endl << m << std::endl;
   return 0;
 }
diff --git a/doc/examples/class_FixedReshaped.cpp b/doc/examples/class_FixedReshaped.cpp
index be7069d..29a04f6 100644
--- a/doc/examples/class_FixedReshaped.cpp
+++ b/doc/examples/class_FixedReshaped.cpp
@@ -1,18 +1,14 @@
 #include <Eigen/Core>
 #include <iostream>
 
-template<typename Derived>
-Eigen::Reshaped<Derived, 4, 2>
-reshape_helper(Eigen::MatrixBase<Derived>& m)
-{
+template <typename Derived>
+Eigen::Reshaped<Derived, 4, 2> reshape_helper(Eigen::MatrixBase<Derived>& m) {
   return Eigen::Reshaped<Derived, 4, 2>(m.derived());
 }
 
-int main(int, char**)
-{
+int main(int, char**) {
   Eigen::MatrixXd m(2, 4);
-  m << 1, 2, 3, 4,
-       5, 6, 7, 8;
+  m << 1, 2, 3, 4, 5, 6, 7, 8;
   Eigen::MatrixXd n = reshape_helper(m);
   std::cout << "matrix m is:" << std::endl << m << std::endl;
   std::cout << "matrix n is:" << std::endl << n << std::endl;
diff --git a/doc/examples/class_FixedVectorBlock.cpp b/doc/examples/class_FixedVectorBlock.cpp
index eed3007..cee8ac8 100644
--- a/doc/examples/class_FixedVectorBlock.cpp
+++ b/doc/examples/class_FixedVectorBlock.cpp
@@ -1,25 +1,21 @@
 #include <Eigen/Core>
 #include <iostream>
 
-template<typename Derived>
-Eigen::VectorBlock<Derived, 2>
-firstTwo(Eigen::MatrixBase<Derived>& v)
-{
+template <typename Derived>
+Eigen::VectorBlock<Derived, 2> firstTwo(Eigen::MatrixBase<Derived>& v) {
   return Eigen::VectorBlock<Derived, 2>(v.derived(), 0);
 }
 
-template<typename Derived>
-const Eigen::VectorBlock<const Derived, 2>
-firstTwo(const Eigen::MatrixBase<Derived>& v)
-{
+template <typename Derived>
+const Eigen::VectorBlock<const Derived, 2> firstTwo(const Eigen::MatrixBase<Derived>& v) {
   return Eigen::VectorBlock<const Derived, 2>(v.derived(), 0);
 }
 
-int main(int, char**)
-{
-  Eigen::Matrix<int,1,6> v; v << 1,2,3,4,5,6;
-  std::cout << firstTwo(4*v) << std::endl; // calls the const version
-  firstTwo(v) *= 2;              // calls the non-const version
+int main(int, char**) {
+  Eigen::Matrix<int, 1, 6> v;
+  v << 1, 2, 3, 4, 5, 6;
+  std::cout << firstTwo(4 * v) << std::endl;  // calls the const version
+  firstTwo(v) *= 2;                           // calls the non-const version
   std::cout << "Now the vector v is:" << std::endl << v << std::endl;
   return 0;
 }
diff --git a/doc/examples/class_Reshaped.cpp b/doc/examples/class_Reshaped.cpp
index 7219853..a91c3ff 100644
--- a/doc/examples/class_Reshaped.cpp
+++ b/doc/examples/class_Reshaped.cpp
@@ -1,19 +1,14 @@
 #include <Eigen/Core>
 #include <iostream>
 
-template<typename Derived>
-const Eigen::Reshaped<const Derived>
-reshape_helper(const Eigen::MatrixBase<Derived>& m, int rows, int cols)
-{
+template <typename Derived>
+const Eigen::Reshaped<const Derived> reshape_helper(const Eigen::MatrixBase<Derived>& m, int rows, int cols) {
   return Eigen::Reshaped<const Derived>(m.derived(), rows, cols);
 }
 
-int main(int, char**)
-{
+int main(int, char**) {
   Eigen::MatrixXd m(3, 4);
-  m << 1, 4, 7, 10,
-       2, 5, 8, 11,
-       3, 6, 9, 12;
+  m << 1, 4, 7, 10, 2, 5, 8, 11, 3, 6, 9, 12;
   std::cout << m << std::endl;
   Eigen::Ref<const Eigen::MatrixXd> n = reshape_helper(m, 2, 6);
   std::cout << "Matrix m is:" << std::endl << m << std::endl;
diff --git a/doc/examples/class_VectorBlock.cpp b/doc/examples/class_VectorBlock.cpp
index 5cee147..d427fa7 100644
--- a/doc/examples/class_VectorBlock.cpp
+++ b/doc/examples/class_VectorBlock.cpp
@@ -1,25 +1,21 @@
 #include <Eigen/Core>
 #include <iostream>
 
-template<typename Derived>
-Eigen::VectorBlock<Derived>
-segmentFromRange(Eigen::MatrixBase<Derived>& v, int start, int end)
-{
-  return Eigen::VectorBlock<Derived>(v.derived(), start, end-start);
+template <typename Derived>
+Eigen::VectorBlock<Derived> segmentFromRange(Eigen::MatrixBase<Derived>& v, int start, int end) {
+  return Eigen::VectorBlock<Derived>(v.derived(), start, end - start);
 }
 
-template<typename Derived>
-const Eigen::VectorBlock<const Derived>
-segmentFromRange(const Eigen::MatrixBase<Derived>& v, int start, int end)
-{
-  return Eigen::VectorBlock<const Derived>(v.derived(), start, end-start);
+template <typename Derived>
+const Eigen::VectorBlock<const Derived> segmentFromRange(const Eigen::MatrixBase<Derived>& v, int start, int end) {
+  return Eigen::VectorBlock<const Derived>(v.derived(), start, end - start);
 }
 
-int main(int, char**)
-{
-  Eigen::Matrix<int,1,6> v; v << 1,2,3,4,5,6;
-  std::cout << segmentFromRange(2*v, 2, 4) << std::endl; // calls the const version
-  segmentFromRange(v, 1, 3) *= 5;              // calls the non-const version
+int main(int, char**) {
+  Eigen::Matrix<int, 1, 6> v;
+  v << 1, 2, 3, 4, 5, 6;
+  std::cout << segmentFromRange(2 * v, 2, 4) << std::endl;  // calls the const version
+  segmentFromRange(v, 1, 3) *= 5;                           // calls the non-const version
   std::cout << "Now the vector v is:" << std::endl << v << std::endl;
   return 0;
 }
diff --git a/doc/examples/function_taking_eigenbase.cpp b/doc/examples/function_taking_eigenbase.cpp
index 4e1e5a9..524ea18 100644
--- a/doc/examples/function_taking_eigenbase.cpp
+++ b/doc/examples/function_taking_eigenbase.cpp
@@ -2,16 +2,13 @@
 #include <Eigen/Core>
 
 template <typename Derived>
-void print_size(const Eigen::EigenBase<Derived>& b)
-{
-  std::cout << "size (rows, cols): " << b.size() << " (" << b.rows()
-            << ", " << b.cols() << ")" << std::endl;
+void print_size(const Eigen::EigenBase<Derived>& b) {
+  std::cout << "size (rows, cols): " << b.size() << " (" << b.rows() << ", " << b.cols() << ")" << std::endl;
 }
 
-int main()
-{
-    Eigen::Vector3f v;
-    print_size(v);
-    // v.asDiagonal() returns a 3x3 diagonal matrix pseudo-expression
-    print_size(v.asDiagonal());
+int main() {
+  Eigen::Vector3f v;
+  print_size(v);
+  // v.asDiagonal() returns a 3x3 diagonal matrix pseudo-expression
+  print_size(v.asDiagonal());
 }
diff --git a/doc/examples/function_taking_ref.cpp b/doc/examples/function_taking_ref.cpp
index a837e19..8fd8c76 100644
--- a/doc/examples/function_taking_ref.cpp
+++ b/doc/examples/function_taking_ref.cpp
@@ -1,17 +1,15 @@
 #include <iostream>
 #include <Eigen/SVD>
 
-float inv_cond(const Eigen::Ref<const Eigen::MatrixXf>& a)
-{
+float inv_cond(const Eigen::Ref<const Eigen::MatrixXf>& a) {
   const Eigen::VectorXf sing_vals = a.jacobiSvd().singularValues();
-  return sing_vals(sing_vals.size()-1) / sing_vals(0);
+  return sing_vals(sing_vals.size() - 1) / sing_vals(0);
 }
 
-int main()
-{
+int main() {
   Eigen::MatrixXf m = Eigen::MatrixXf::Random(4, 4);
   std::cout << "matrix m:\n" << m << "\n\n";
-  std::cout << "inv_cond(m):          " << inv_cond(m)                      << "\n";
-  std::cout << "inv_cond(m(1:3,1:3)): " << inv_cond(m.topLeftCorner(3,3))   << "\n";
-  std::cout << "inv_cond(m+I):        " << inv_cond(m+Eigen::MatrixXf::Identity(4, 4)) << "\n";
+  std::cout << "inv_cond(m):          " << inv_cond(m) << "\n";
+  std::cout << "inv_cond(m(1:3,1:3)): " << inv_cond(m.topLeftCorner(3, 3)) << "\n";
+  std::cout << "inv_cond(m+I):        " << inv_cond(m + Eigen::MatrixXf::Identity(4, 4)) << "\n";
 }
diff --git a/doc/examples/make_circulant.cpp.entry b/doc/examples/make_circulant.cpp.entry
index f9d2eb8..f5e6910 100644
--- a/doc/examples/make_circulant.cpp.entry
+++ b/doc/examples/make_circulant.cpp.entry
@@ -1,5 +1,4 @@
 template <class ArgType>
-Circulant<ArgType> makeCirculant(const Eigen::MatrixBase<ArgType>& arg)
-{
+Circulant<ArgType> makeCirculant(const Eigen::MatrixBase<ArgType>& arg) {
   return Circulant<ArgType>(arg.derived());
 }
diff --git a/doc/examples/make_circulant.cpp.evaluator b/doc/examples/make_circulant.cpp.evaluator
index cd461b9..3304d89 100644
--- a/doc/examples/make_circulant.cpp.evaluator
+++ b/doc/examples/make_circulant.cpp.evaluator
@@ -1,32 +1,24 @@
 namespace Eigen {
-  namespace internal {
-    template<typename ArgType>
-    struct evaluator<Circulant<ArgType> >
-      : evaluator_base<Circulant<ArgType> >
-    {
-      typedef Circulant<ArgType> XprType;
-      typedef typename nested_eval<ArgType, XprType::ColsAtCompileTime>::type ArgTypeNested;
-      typedef remove_all_t<ArgTypeNested> ArgTypeNestedCleaned;
-      typedef typename XprType::CoeffReturnType CoeffReturnType;
+namespace internal {
+template <typename ArgType>
+struct evaluator<Circulant<ArgType> > : evaluator_base<Circulant<ArgType> > {
+  typedef Circulant<ArgType> XprType;
+  typedef typename nested_eval<ArgType, XprType::ColsAtCompileTime>::type ArgTypeNested;
+  typedef remove_all_t<ArgTypeNested> ArgTypeNestedCleaned;
+  typedef typename XprType::CoeffReturnType CoeffReturnType;
 
-      enum { 
-        CoeffReadCost = evaluator<ArgTypeNestedCleaned>::CoeffReadCost,
-        Flags = Eigen::ColMajor 
-      };
-      
-      evaluator(const XprType& xpr)
-        : m_argImpl(xpr.m_arg), m_rows(xpr.rows())
-      { }
+  enum { CoeffReadCost = evaluator<ArgTypeNestedCleaned>::CoeffReadCost, Flags = Eigen::ColMajor };
 
-      CoeffReturnType coeff(Index row, Index col) const
-      {
-        Index index = row - col;
-        if (index < 0) index += m_rows;
-        return m_argImpl.coeff(index);
-      }
+  evaluator(const XprType& xpr) : m_argImpl(xpr.m_arg), m_rows(xpr.rows()) {}
 
-      evaluator<ArgTypeNestedCleaned> m_argImpl;
-      const Index m_rows;
-    };
+  CoeffReturnType coeff(Index row, Index col) const {
+    Index index = row - col;
+    if (index < 0) index += m_rows;
+    return m_argImpl.coeff(index);
   }
-}
+
+  evaluator<ArgTypeNestedCleaned> m_argImpl;
+  const Index m_rows;
+};
+}  // namespace internal
+}  // namespace Eigen
diff --git a/doc/examples/make_circulant.cpp.expression b/doc/examples/make_circulant.cpp.expression
index 380cd44..9868c1e 100644
--- a/doc/examples/make_circulant.cpp.expression
+++ b/doc/examples/make_circulant.cpp.expression
@@ -1,15 +1,11 @@
 template <class ArgType>
-class Circulant : public Eigen::MatrixBase<Circulant<ArgType> >
-{
-public:
-  Circulant(const ArgType& arg)
-    : m_arg(arg)
-  { 
-    EIGEN_STATIC_ASSERT(ArgType::ColsAtCompileTime == 1,
-                        YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX);
+class Circulant : public Eigen::MatrixBase<Circulant<ArgType> > {
+ public:
+  Circulant(const ArgType& arg) : m_arg(arg) {
+    EIGEN_STATIC_ASSERT(ArgType::ColsAtCompileTime == 1, YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX);
   }
 
-  typedef typename Eigen::internal::ref_selector<Circulant>::type Nested; 
+  typedef typename Eigen::internal::ref_selector<Circulant>::type Nested;
 
   typedef Eigen::Index Index;
   Index rows() const { return m_arg.rows(); }
diff --git a/doc/examples/make_circulant.cpp.main b/doc/examples/make_circulant.cpp.main
index 877f97f..0b6d946 100644
--- a/doc/examples/make_circulant.cpp.main
+++ b/doc/examples/make_circulant.cpp.main
@@ -1,5 +1,4 @@
-int main()
-{
+int main() {
   Eigen::VectorXd vec(4);
   vec << 1, 2, 4, 8;
   Eigen::MatrixXd mat;
diff --git a/doc/examples/make_circulant.cpp.preamble b/doc/examples/make_circulant.cpp.preamble
index e575cce..8906033 100644
--- a/doc/examples/make_circulant.cpp.preamble
+++ b/doc/examples/make_circulant.cpp.preamble
@@ -1,4 +1,5 @@
 #include <Eigen/Core>
 #include <iostream>
 
-template <class ArgType> class Circulant;
+template <class ArgType>
+class Circulant;
diff --git a/doc/examples/make_circulant.cpp.traits b/doc/examples/make_circulant.cpp.traits
index 4e04535..2d5e41b 100644
--- a/doc/examples/make_circulant.cpp.traits
+++ b/doc/examples/make_circulant.cpp.traits
@@ -1,19 +1,18 @@
 namespace Eigen {
-  namespace internal {
-    template <class ArgType>
-    struct traits<Circulant<ArgType> >
-    {
-      typedef Eigen::Dense StorageKind;
-      typedef Eigen::MatrixXpr XprKind;
-      typedef typename ArgType::StorageIndex StorageIndex;
-      typedef typename ArgType::Scalar Scalar;
-      enum { 
-        Flags = Eigen::ColMajor,
-        RowsAtCompileTime = ArgType::RowsAtCompileTime,
-        ColsAtCompileTime = ArgType::RowsAtCompileTime,
-        MaxRowsAtCompileTime = ArgType::MaxRowsAtCompileTime,
-        MaxColsAtCompileTime = ArgType::MaxRowsAtCompileTime
-      };
-    };
-  }
-}
+namespace internal {
+template <class ArgType>
+struct traits<Circulant<ArgType> > {
+  typedef Eigen::Dense StorageKind;
+  typedef Eigen::MatrixXpr XprKind;
+  typedef typename ArgType::StorageIndex StorageIndex;
+  typedef typename ArgType::Scalar Scalar;
+  enum {
+    Flags = Eigen::ColMajor,
+    RowsAtCompileTime = ArgType::RowsAtCompileTime,
+    ColsAtCompileTime = ArgType::RowsAtCompileTime,
+    MaxRowsAtCompileTime = ArgType::MaxRowsAtCompileTime,
+    MaxColsAtCompileTime = ArgType::MaxRowsAtCompileTime
+  };
+};
+}  // namespace internal
+}  // namespace Eigen
diff --git a/doc/examples/make_circulant2.cpp b/doc/examples/make_circulant2.cpp
index d86a66b..b3bbcfc 100644
--- a/doc/examples/make_circulant2.cpp
+++ b/doc/examples/make_circulant2.cpp
@@ -2,13 +2,14 @@
 #include <iostream>
 
 // [circulant_func]
-template<class ArgType>
+template <class ArgType>
 class circulant_functor {
-  const ArgType &m_vec;
-public:
+  const ArgType& m_vec;
+
+ public:
   circulant_functor(const ArgType& arg) : m_vec(arg) {}
 
-  const typename ArgType::Scalar& operator() (Eigen::Index row, Eigen::Index col) const {
+  const typename ArgType::Scalar& operator()(Eigen::Index row, Eigen::Index col) const {
     Eigen::Index index = row - col;
     if (index < 0) index += m_vec.size();
     return m_vec(index);
@@ -17,30 +18,25 @@
 // [circulant_func]
 
 // [square]
-template<class ArgType>
+template <class ArgType>
 struct circulant_helper {
-  typedef Eigen::Matrix<typename ArgType::Scalar,
-                 ArgType::SizeAtCompileTime,
-                 ArgType::SizeAtCompileTime,
-                 Eigen::ColMajor,
-                 ArgType::MaxSizeAtCompileTime,
-                 ArgType::MaxSizeAtCompileTime> MatrixType;
+  typedef Eigen::Matrix<typename ArgType::Scalar, ArgType::SizeAtCompileTime, ArgType::SizeAtCompileTime,
+                        Eigen::ColMajor, ArgType::MaxSizeAtCompileTime, ArgType::MaxSizeAtCompileTime>
+      MatrixType;
 };
 // [square]
 
 // [makeCirculant]
 template <class ArgType>
-Eigen::CwiseNullaryOp<circulant_functor<ArgType>, typename circulant_helper<ArgType>::MatrixType>
-makeCirculant(const Eigen::MatrixBase<ArgType>& arg)
-{
+Eigen::CwiseNullaryOp<circulant_functor<ArgType>, typename circulant_helper<ArgType>::MatrixType> makeCirculant(
+    const Eigen::MatrixBase<ArgType>& arg) {
   typedef typename circulant_helper<ArgType>::MatrixType MatrixType;
   return MatrixType::NullaryExpr(arg.size(), arg.size(), circulant_functor<ArgType>(arg.derived()));
 }
 // [makeCirculant]
 
 // [main]
-int main()
-{
+int main() {
   Eigen::VectorXd vec(4);
   vec << 1, 2, 4, 8;
   Eigen::MatrixXd mat;
diff --git a/doc/examples/matrixfree_cg.cpp b/doc/examples/matrixfree_cg.cpp
index cc0eead..66f2c27 100644
--- a/doc/examples/matrixfree_cg.cpp
+++ b/doc/examples/matrixfree_cg.cpp
@@ -9,81 +9,70 @@
 
 namespace Eigen {
 namespace internal {
-  // MatrixReplacement looks-like a SparseMatrix, so let's inherit its traits:
-  template<>
-  struct traits<MatrixReplacement> :  public Eigen::internal::traits<Eigen::SparseMatrix<double> >
-  {};
-}
-}
+// MatrixReplacement looks-like a SparseMatrix, so let's inherit its traits:
+template <>
+struct traits<MatrixReplacement> : public Eigen::internal::traits<Eigen::SparseMatrix<double> > {};
+}  // namespace internal
+}  // namespace Eigen
 
 // Example of a matrix-free wrapper from a user type to Eigen's compatible type
 // For the sake of simplicity, this example simply wrap a Eigen::SparseMatrix.
 class MatrixReplacement : public Eigen::EigenBase<MatrixReplacement> {
-public:
+ public:
   // Required typedefs, constants, and method:
   typedef double Scalar;
   typedef double RealScalar;
   typedef int StorageIndex;
-  enum {
-    ColsAtCompileTime = Eigen::Dynamic,
-    MaxColsAtCompileTime = Eigen::Dynamic,
-    IsRowMajor = false
-  };
+  enum { ColsAtCompileTime = Eigen::Dynamic, MaxColsAtCompileTime = Eigen::Dynamic, IsRowMajor = false };
 
   Index rows() const { return mp_mat->rows(); }
   Index cols() const { return mp_mat->cols(); }
 
-  template<typename Rhs>
-  Eigen::Product<MatrixReplacement,Rhs,Eigen::AliasFreeProduct> operator*(const Eigen::MatrixBase<Rhs>& x) const {
-    return Eigen::Product<MatrixReplacement,Rhs,Eigen::AliasFreeProduct>(*this, x.derived());
+  template <typename Rhs>
+  Eigen::Product<MatrixReplacement, Rhs, Eigen::AliasFreeProduct> operator*(const Eigen::MatrixBase<Rhs>& x) const {
+    return Eigen::Product<MatrixReplacement, Rhs, Eigen::AliasFreeProduct>(*this, x.derived());
   }
 
   // Custom API:
   MatrixReplacement() : mp_mat(0) {}
 
-  void attachMyMatrix(const SparseMatrix<double> &mat) {
-    mp_mat = &mat;
-  }
+  void attachMyMatrix(const SparseMatrix<double>& mat) { mp_mat = &mat; }
   const SparseMatrix<double> my_matrix() const { return *mp_mat; }
 
-private:
-  const SparseMatrix<double> *mp_mat;
+ private:
+  const SparseMatrix<double>* mp_mat;
 };
 
-
 // Implementation of MatrixReplacement * Eigen::DenseVector though a specialization of internal::generic_product_impl:
 namespace Eigen {
 namespace internal {
 
-  template<typename Rhs>
-  struct generic_product_impl<MatrixReplacement, Rhs, SparseShape, DenseShape, GemvProduct> // GEMV stands for matrix-vector
-  : generic_product_impl_base<MatrixReplacement,Rhs,generic_product_impl<MatrixReplacement,Rhs> >
-  {
-    typedef typename Product<MatrixReplacement,Rhs>::Scalar Scalar;
+template <typename Rhs>
+struct generic_product_impl<MatrixReplacement, Rhs, SparseShape, DenseShape,
+                            GemvProduct>  // GEMV stands for matrix-vector
+    : generic_product_impl_base<MatrixReplacement, Rhs, generic_product_impl<MatrixReplacement, Rhs> > {
+  typedef typename Product<MatrixReplacement, Rhs>::Scalar Scalar;
 
-    template<typename Dest>
-    static void scaleAndAddTo(Dest& dst, const MatrixReplacement& lhs, const Rhs& rhs, const Scalar& alpha)
-    {
-      // This method should implement "dst += alpha * lhs * rhs" inplace,
-      // however, for iterative solvers, alpha is always equal to 1, so let's not bother about it.
-      eigen_assert(alpha==Scalar(1) && "scaling is not implemented");
-      EIGEN_ONLY_USED_FOR_DEBUG(alpha);
+  template <typename Dest>
+  static void scaleAndAddTo(Dest& dst, const MatrixReplacement& lhs, const Rhs& rhs, const Scalar& alpha) {
+    // This method should implement "dst += alpha * lhs * rhs" inplace,
+    // however, for iterative solvers, alpha is always equal to 1, so let's not bother about it.
+    eigen_assert(alpha == Scalar(1) && "scaling is not implemented");
+    EIGEN_ONLY_USED_FOR_DEBUG(alpha);
 
-      // Here we could simply call dst.noalias() += lhs.my_matrix() * rhs,
-      // but let's do something fancier (and less efficient):
-      for(Index i=0; i<lhs.cols(); ++i)
-        dst += rhs(i) * lhs.my_matrix().col(i);
-    }
-  };
+    // Here we could simply call dst.noalias() += lhs.my_matrix() * rhs,
+    // but let's do something fancier (and less efficient):
+    for (Index i = 0; i < lhs.cols(); ++i) dst += rhs(i) * lhs.my_matrix().col(i);
+  }
+};
 
-}
-}
+}  // namespace internal
+}  // namespace Eigen
 
-int main()
-{
+int main() {
   int n = 10;
-  Eigen::SparseMatrix<double> S = Eigen::MatrixXd::Random(n,n).sparseView(0.5,1);
-  S = S.transpose()*S;
+  Eigen::SparseMatrix<double> S = Eigen::MatrixXd::Random(n, n).sparseView(0.5, 1);
+  S = S.transpose() * S;
 
   MatrixReplacement A;
   A.attachMyMatrix(S);
@@ -93,7 +82,7 @@
 
   // Solve Ax = b using various iterative solver with matrix-free version:
   {
-    Eigen::ConjugateGradient<MatrixReplacement, Eigen::Lower|Eigen::Upper, Eigen::IdentityPreconditioner> cg;
+    Eigen::ConjugateGradient<MatrixReplacement, Eigen::Lower | Eigen::Upper, Eigen::IdentityPreconditioner> cg;
     cg.compute(A);
     x = cg.solve(b);
     std::cout << "CG:       #iterations: " << cg.iterations() << ", estimated error: " << cg.error() << std::endl;
@@ -121,9 +110,10 @@
   }
 
   {
-    Eigen::MINRES<MatrixReplacement, Eigen::Lower|Eigen::Upper, Eigen::IdentityPreconditioner> minres;
+    Eigen::MINRES<MatrixReplacement, Eigen::Lower | Eigen::Upper, Eigen::IdentityPreconditioner> minres;
     minres.compute(A);
     x = minres.solve(b);
-    std::cout << "MINRES:   #iterations: " << minres.iterations() << ", estimated error: " << minres.error() << std::endl;
+    std::cout << "MINRES:   #iterations: " << minres.iterations() << ", estimated error: " << minres.error()
+              << std::endl;
   }
 }
diff --git a/doc/examples/nullary_indexing.cpp b/doc/examples/nullary_indexing.cpp
index 38260af..f98e690 100644
--- a/doc/examples/nullary_indexing.cpp
+++ b/doc/examples/nullary_indexing.cpp
@@ -2,24 +2,22 @@
 #include <iostream>
 
 // [functor]
-template<class ArgType, class RowIndexType, class ColIndexType>
+template <class ArgType, class RowIndexType, class ColIndexType>
 class indexing_functor {
-  const ArgType &m_arg;
-  const RowIndexType &m_rowIndices;
-  const ColIndexType &m_colIndices;
-public:
-  typedef Eigen::Matrix<typename ArgType::Scalar,
-                 RowIndexType::SizeAtCompileTime,
-                 ColIndexType::SizeAtCompileTime,
-                 ArgType::Flags&Eigen::RowMajorBit?Eigen::RowMajor:Eigen::ColMajor,
-                 RowIndexType::MaxSizeAtCompileTime,
-                 ColIndexType::MaxSizeAtCompileTime> MatrixType;
+  const ArgType& m_arg;
+  const RowIndexType& m_rowIndices;
+  const ColIndexType& m_colIndices;
+
+ public:
+  typedef Eigen::Matrix<typename ArgType::Scalar, RowIndexType::SizeAtCompileTime, ColIndexType::SizeAtCompileTime,
+                        ArgType::Flags & Eigen::RowMajorBit ? Eigen::RowMajor : Eigen::ColMajor,
+                        RowIndexType::MaxSizeAtCompileTime, ColIndexType::MaxSizeAtCompileTime>
+      MatrixType;
 
   indexing_functor(const ArgType& arg, const RowIndexType& row_indices, const ColIndexType& col_indices)
-    : m_arg(arg), m_rowIndices(row_indices), m_colIndices(col_indices)
-  {}
+      : m_arg(arg), m_rowIndices(row_indices), m_colIndices(col_indices) {}
 
-  const typename ArgType::Scalar& operator() (Eigen::Index row, Eigen::Index col) const {
+  const typename ArgType::Scalar& operator()(Eigen::Index row, Eigen::Index col) const {
     return m_arg(m_rowIndices[row], m_colIndices[col]);
   }
 };
@@ -27,22 +25,21 @@
 
 // [function]
 template <class ArgType, class RowIndexType, class ColIndexType>
-Eigen::CwiseNullaryOp<indexing_functor<ArgType,RowIndexType,ColIndexType>, typename indexing_functor<ArgType,RowIndexType,ColIndexType>::MatrixType>
-mat_indexing(const Eigen::MatrixBase<ArgType>& arg, const RowIndexType& row_indices, const ColIndexType& col_indices)
-{
-  typedef indexing_functor<ArgType,RowIndexType,ColIndexType> Func;
+Eigen::CwiseNullaryOp<indexing_functor<ArgType, RowIndexType, ColIndexType>,
+                      typename indexing_functor<ArgType, RowIndexType, ColIndexType>::MatrixType>
+mat_indexing(const Eigen::MatrixBase<ArgType>& arg, const RowIndexType& row_indices, const ColIndexType& col_indices) {
+  typedef indexing_functor<ArgType, RowIndexType, ColIndexType> Func;
   typedef typename Func::MatrixType MatrixType;
   return MatrixType::NullaryExpr(row_indices.size(), col_indices.size(), Func(arg.derived(), row_indices, col_indices));
 }
 // [function]
 
-
-int main()
-{
+int main() {
   std::cout << "[main1]\n";
-  Eigen::MatrixXi A = Eigen::MatrixXi::Random(4,4);
-  Eigen::Array3i ri(1,2,1);
-  Eigen::ArrayXi ci(6); ci << 3,2,1,0,0,2;
+  Eigen::MatrixXi A = Eigen::MatrixXi::Random(4, 4);
+  Eigen::Array3i ri(1, 2, 1);
+  Eigen::ArrayXi ci(6);
+  ci << 3, 2, 1, 0, 0, 2;
   Eigen::MatrixXi B = mat_indexing(A, ri, ci);
   std::cout << "A =" << std::endl;
   std::cout << A << std::endl << std::endl;
@@ -51,12 +48,13 @@
   std::cout << "[main1]\n";
 
   std::cout << "[main2]\n";
-  B =  mat_indexing(A, ri+1, ci);
+  B = mat_indexing(A, ri + 1, ci);
   std::cout << "A(ri+1,ci) =" << std::endl;
   std::cout << B << std::endl << std::endl;
-  B =  mat_indexing(A, Eigen::ArrayXi::LinSpaced(13,0,12).unaryExpr([](int x){return x%4;}), Eigen::ArrayXi::LinSpaced(4,0,3));
-  std::cout << "A(ArrayXi::LinSpaced(13,0,12).unaryExpr([](int x){return x%4;}), ArrayXi::LinSpaced(4,0,3)) =" << std::endl;
+  B = mat_indexing(A, Eigen::ArrayXi::LinSpaced(13, 0, 12).unaryExpr([](int x) { return x % 4; }),
+                   Eigen::ArrayXi::LinSpaced(4, 0, 3));
+  std::cout << "A(ArrayXi::LinSpaced(13,0,12).unaryExpr([](int x){return x%4;}), ArrayXi::LinSpaced(4,0,3)) ="
+            << std::endl;
   std::cout << B << std::endl << std::endl;
   std::cout << "[main2]\n";
 }
-
diff --git a/doc/examples/tut_arithmetic_add_sub.cpp b/doc/examples/tut_arithmetic_add_sub.cpp
index 95162c0..ceb43ca 100644
--- a/doc/examples/tut_arithmetic_add_sub.cpp
+++ b/doc/examples/tut_arithmetic_add_sub.cpp
@@ -1,20 +1,17 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
+int main() {
   Eigen::Matrix2d a;
-  a << 1, 2,
-       3, 4;
-  Eigen::MatrixXd b(2,2);
-  b << 2, 3,
-       1, 4;
+  a << 1, 2, 3, 4;
+  Eigen::MatrixXd b(2, 2);
+  b << 2, 3, 1, 4;
   std::cout << "a + b =\n" << a + b << std::endl;
   std::cout << "a - b =\n" << a - b << std::endl;
   std::cout << "Doing a += b;" << std::endl;
   a += b;
   std::cout << "Now a =\n" << a << std::endl;
-  Eigen::Vector3d v(1,2,3);
-  Eigen::Vector3d w(1,0,0);
+  Eigen::Vector3d v(1, 2, 3);
+  Eigen::Vector3d w(1, 0, 0);
   std::cout << "-v + w - v =\n" << -v + w - v << std::endl;
 }
diff --git a/doc/examples/tut_arithmetic_dot_cross.cpp b/doc/examples/tut_arithmetic_dot_cross.cpp
index d95e03c..09eea39 100644
--- a/doc/examples/tut_arithmetic_dot_cross.cpp
+++ b/doc/examples/tut_arithmetic_dot_cross.cpp
@@ -1,18 +1,17 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-  Eigen::Vector3d v(1,2,3);
-  Eigen::Vector3d w(0,1,2);
+int main() {
+  Eigen::Vector3d v(1, 2, 3);
+  Eigen::Vector3d w(0, 1, 2);
 
   std::cout << "Dot product: " << v.dot(w) << std::endl;
-  double dp = v.adjoint()*w; // automatic conversion of the inner product to a scalar
+  double dp = v.adjoint() * w;  // automatic conversion of the inner product to a scalar
   std::cout << "Dot product via a matrix product: " << dp << std::endl;
 
   std::cout << "Cross product:\n" << v.cross(w) << std::endl;
-  Eigen::Vector2d v2(1,2);
-  Eigen::Vector2d w2(0,1);
-  double cp = v2.cross(w2); // returning a scalar between size-2 vectors
+  Eigen::Vector2d v2(1, 2);
+  Eigen::Vector2d w2(0, 1);
+  double cp = v2.cross(w2);  // returning a scalar between size-2 vectors
   std::cout << "Cross product for 2D vectors: " << cp << std::endl;
 }
diff --git a/doc/examples/tut_arithmetic_matrix_mul.cpp b/doc/examples/tut_arithmetic_matrix_mul.cpp
index c2d5e2d..ead4800 100644
--- a/doc/examples/tut_arithmetic_matrix_mul.cpp
+++ b/doc/examples/tut_arithmetic_matrix_mul.cpp
@@ -1,18 +1,16 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
+int main() {
   Eigen::Matrix2d mat;
-  mat << 1, 2,
-         3, 4;
-  Eigen::Vector2d u(-1,1), v(2,0);
-  std::cout << "Here is mat*mat:\n" << mat*mat << std::endl;
-  std::cout << "Here is mat*u:\n" << mat*u << std::endl;
-  std::cout << "Here is u^T*mat:\n" << u.transpose()*mat << std::endl;
-  std::cout << "Here is u^T*v:\n" << u.transpose()*v << std::endl;
-  std::cout << "Here is u*v^T:\n" << u*v.transpose() << std::endl;
+  mat << 1, 2, 3, 4;
+  Eigen::Vector2d u(-1, 1), v(2, 0);
+  std::cout << "Here is mat*mat:\n" << mat * mat << std::endl;
+  std::cout << "Here is mat*u:\n" << mat * u << std::endl;
+  std::cout << "Here is u^T*mat:\n" << u.transpose() * mat << std::endl;
+  std::cout << "Here is u^T*v:\n" << u.transpose() * v << std::endl;
+  std::cout << "Here is u*v^T:\n" << u * v.transpose() << std::endl;
   std::cout << "Let's multiply mat by itself" << std::endl;
-  mat = mat*mat;
+  mat = mat * mat;
   std::cout << "Now mat is mat:\n" << mat << std::endl;
 }
diff --git a/doc/examples/tut_arithmetic_redux_basic.cpp b/doc/examples/tut_arithmetic_redux_basic.cpp
index 5632fb5..3140237 100644
--- a/doc/examples/tut_arithmetic_redux_basic.cpp
+++ b/doc/examples/tut_arithmetic_redux_basic.cpp
@@ -2,15 +2,13 @@
 #include <Eigen/Dense>
 
 using namespace std;
-int main()
-{
+int main() {
   Eigen::Matrix2d mat;
-  mat << 1, 2,
-         3, 4;
-  cout << "Here is mat.sum():       " << mat.sum()       << endl;
-  cout << "Here is mat.prod():      " << mat.prod()      << endl;
-  cout << "Here is mat.mean():      " << mat.mean()      << endl;
-  cout << "Here is mat.minCoeff():  " << mat.minCoeff()  << endl;
-  cout << "Here is mat.maxCoeff():  " << mat.maxCoeff()  << endl;
-  cout << "Here is mat.trace():     " << mat.trace()     << endl;
+  mat << 1, 2, 3, 4;
+  cout << "Here is mat.sum():       " << mat.sum() << endl;
+  cout << "Here is mat.prod():      " << mat.prod() << endl;
+  cout << "Here is mat.mean():      " << mat.mean() << endl;
+  cout << "Here is mat.minCoeff():  " << mat.minCoeff() << endl;
+  cout << "Here is mat.maxCoeff():  " << mat.maxCoeff() << endl;
+  cout << "Here is mat.trace():     " << mat.trace() << endl;
 }
diff --git a/doc/examples/tut_arithmetic_scalar_mul_div.cpp b/doc/examples/tut_arithmetic_scalar_mul_div.cpp
index 0ba8d6b..05f1ebd 100644
--- a/doc/examples/tut_arithmetic_scalar_mul_div.cpp
+++ b/doc/examples/tut_arithmetic_scalar_mul_div.cpp
@@ -1,12 +1,10 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
+int main() {
   Eigen::Matrix2d a;
-  a << 1, 2,
-       3, 4;
-  Eigen::Vector3d v(1,2,3);
+  a << 1, 2, 3, 4;
+  Eigen::Vector3d v(1, 2, 3);
   std::cout << "a * 2.5 =\n" << a * 2.5 << std::endl;
   std::cout << "0.1 * v =\n" << 0.1 * v << std::endl;
   std::cout << "Doing v *= 2;" << std::endl;
diff --git a/doc/examples/tut_matrix_coefficient_accessors.cpp b/doc/examples/tut_matrix_coefficient_accessors.cpp
index 040087c..e509a98 100644
--- a/doc/examples/tut_matrix_coefficient_accessors.cpp
+++ b/doc/examples/tut_matrix_coefficient_accessors.cpp
@@ -1,13 +1,12 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-  Eigen::MatrixXd m(2,2);
-  m(0,0) = 3;
-  m(1,0) = 2.5;
-  m(0,1) = -1;
-  m(1,1) = m(1,0) + m(0,1);
+int main() {
+  Eigen::MatrixXd m(2, 2);
+  m(0, 0) = 3;
+  m(1, 0) = 2.5;
+  m(0, 1) = -1;
+  m(1, 1) = m(1, 0) + m(0, 1);
   std::cout << "Here is the matrix m:\n" << m << std::endl;
   Eigen::VectorXd v(2);
   v(0) = 4;
diff --git a/doc/examples/tut_matrix_resize.cpp b/doc/examples/tut_matrix_resize.cpp
index aa80cf5..6e00919 100644
--- a/doc/examples/tut_matrix_resize.cpp
+++ b/doc/examples/tut_matrix_resize.cpp
@@ -1,16 +1,13 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
-  Eigen::MatrixXd m(2,5);
-  m.resize(4,3);
-  std::cout << "The matrix m is of size "
-            << m.rows() << "x" << m.cols() << std::endl;
+int main() {
+  Eigen::MatrixXd m(2, 5);
+  m.resize(4, 3);
+  std::cout << "The matrix m is of size " << m.rows() << "x" << m.cols() << std::endl;
   std::cout << "It has " << m.size() << " coefficients" << std::endl;
   Eigen::VectorXd v(2);
   v.resize(5);
   std::cout << "The vector v is of size " << v.size() << std::endl;
-  std::cout << "As a matrix, v is of size "
-            << v.rows() << "x" << v.cols() << std::endl;
+  std::cout << "As a matrix, v is of size " << v.rows() << "x" << v.cols() << std::endl;
 }
diff --git a/doc/examples/tut_matrix_resize_fixed_size.cpp b/doc/examples/tut_matrix_resize_fixed_size.cpp
index 3df87d2..44645d8 100644
--- a/doc/examples/tut_matrix_resize_fixed_size.cpp
+++ b/doc/examples/tut_matrix_resize_fixed_size.cpp
@@ -1,10 +1,8 @@
 #include <iostream>
 #include <Eigen/Dense>
 
-int main()
-{
+int main() {
   Eigen::Matrix4d m;
-  m.resize(4,4); // no operation
-  std::cout << "The matrix m is of size "
-            << m.rows() << "x" << m.cols() << std::endl;
+  m.resize(4, 4);  // no operation
+  std::cout << "The matrix m is of size " << m.rows() << "x" << m.cols() << std::endl;
 }
diff --git a/doc/snippets/AngleAxis_mimic_euler.cpp b/doc/snippets/AngleAxis_mimic_euler.cpp
index 456de7f..eb27cbf 100644
--- a/doc/snippets/AngleAxis_mimic_euler.cpp
+++ b/doc/snippets/AngleAxis_mimic_euler.cpp
@@ -1,5 +1,4 @@
 Matrix3f m;
-m = AngleAxisf(0.25*M_PI, Vector3f::UnitX())
-  * AngleAxisf(0.5*M_PI,  Vector3f::UnitY())
-  * AngleAxisf(0.33*M_PI, Vector3f::UnitZ());
+m = AngleAxisf(0.25 * M_PI, Vector3f::UnitX()) * AngleAxisf(0.5 * M_PI, Vector3f::UnitY()) *
+    AngleAxisf(0.33 * M_PI, Vector3f::UnitZ());
 cout << m << endl << "is unitary: " << m.isUnitary() << endl;
diff --git a/doc/snippets/Array_initializer_list_23_cxx11.cpp b/doc/snippets/Array_initializer_list_23_cxx11.cpp
index 2c2166e..8f491cb 100644
--- a/doc/snippets/Array_initializer_list_23_cxx11.cpp
+++ b/doc/snippets/Array_initializer_list_23_cxx11.cpp
@@ -1,5 +1,2 @@
-ArrayXXi a {
-  {1, 2, 3},
-  {3, 4, 5}
-};
+ArrayXXi a{{1, 2, 3}, {3, 4, 5}};
 cout << a << endl;
diff --git a/doc/snippets/Array_initializer_list_vector_cxx11.cpp b/doc/snippets/Array_initializer_list_vector_cxx11.cpp
index a668d84..398831f 100644
--- a/doc/snippets/Array_initializer_list_vector_cxx11.cpp
+++ b/doc/snippets/Array_initializer_list_vector_cxx11.cpp
@@ -1,2 +1,2 @@
-Array<int, Dynamic, 1> v {{1, 2, 3, 4, 5}};
+Array<int, Dynamic, 1> v{{1, 2, 3, 4, 5}};
 cout << v << endl;
diff --git a/doc/snippets/Array_variadic_ctor_cxx11.cpp b/doc/snippets/Array_variadic_ctor_cxx11.cpp
index 0e4ec44..6df78a5 100644
--- a/doc/snippets/Array_variadic_ctor_cxx11.cpp
+++ b/doc/snippets/Array_variadic_ctor_cxx11.cpp
@@ -1,3 +1,3 @@
 Array<int, 1, 6> a(1, 2, 3, 4, 5, 6);
-Array<int, 3, 1> b {1, 2, 3};
+Array<int, 3, 1> b{1, 2, 3};
 cout << a << "\n\n" << b << endl;
diff --git a/doc/snippets/BiCGSTAB_simple.cpp b/doc/snippets/BiCGSTAB_simple.cpp
index 8c8829f..68f07c9 100644
--- a/doc/snippets/BiCGSTAB_simple.cpp
+++ b/doc/snippets/BiCGSTAB_simple.cpp
@@ -1,11 +1,11 @@
-  int n = 10000;
-  VectorXd x(n), b(n);
-  SparseMatrix<double> A(n,n);
-  /* ... fill A and b ... */ 
-  BiCGSTAB<SparseMatrix<double> > solver;
-  solver.compute(A);
-  x = solver.solve(b);
-  std::cout << "#iterations:     " << solver.iterations() << std::endl;
-  std::cout << "estimated error: " << solver.error()      << std::endl;
-  /* ... update b ... */
-  x = solver.solve(b); // solve again
+int n = 10000;
+VectorXd x(n), b(n);
+SparseMatrix<double> A(n, n);
+/* ... fill A and b ... */
+BiCGSTAB<SparseMatrix<double> > solver;
+solver.compute(A);
+x = solver.solve(b);
+std::cout << "#iterations:     " << solver.iterations() << std::endl;
+std::cout << "estimated error: " << solver.error() << std::endl;
+/* ... update b ... */
+x = solver.solve(b);  // solve again
diff --git a/doc/snippets/BiCGSTAB_step_by_step.cpp b/doc/snippets/BiCGSTAB_step_by_step.cpp
index 6c95d5a..7fe53a5 100644
--- a/doc/snippets/BiCGSTAB_step_by_step.cpp
+++ b/doc/snippets/BiCGSTAB_step_by_step.cpp
@@ -1,14 +1,14 @@
-  int n = 10000;
-  VectorXd x(n), b(n);
-  SparseMatrix<double> A(n,n);
-  /* ... fill A and b ... */ 
-  BiCGSTAB<SparseMatrix<double> > solver(A);
-  // start from a random solution
-  x = VectorXd::Random(n);
-  solver.setMaxIterations(1);
-  int i = 0;
-  do {
-    x = solver.solveWithGuess(b,x);
-    std::cout << i << " : " << solver.error() << std::endl;
-    ++i;
-  } while (solver.info()!=Success && i<100);
+int n = 10000;
+VectorXd x(n), b(n);
+SparseMatrix<double> A(n, n);
+/* ... fill A and b ... */
+BiCGSTAB<SparseMatrix<double> > solver(A);
+// start from a random solution
+x = VectorXd::Random(n);
+solver.setMaxIterations(1);
+int i = 0;
+do {
+  x = solver.solveWithGuess(b, x);
+  std::cout << i << " : " << solver.error() << std::endl;
+  ++i;
+} while (solver.info() != Success && i < 100);
diff --git a/doc/snippets/ColPivHouseholderQR_solve.cpp b/doc/snippets/ColPivHouseholderQR_solve.cpp
index b7b204a..eb7d1ff 100644
--- a/doc/snippets/ColPivHouseholderQR_solve.cpp
+++ b/doc/snippets/ColPivHouseholderQR_solve.cpp
@@ -4,5 +4,5 @@
 cout << "Here is the matrix y:" << endl << y << endl;
 Matrix3f x;
 x = m.colPivHouseholderQr().solve(y);
-assert(y.isApprox(m*x));
+assert(y.isApprox(m* x));
 cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
diff --git a/doc/snippets/ComplexEigenSolver_compute.cpp b/doc/snippets/ComplexEigenSolver_compute.cpp
index 11d6bd3..e55409d 100644
--- a/doc/snippets/ComplexEigenSolver_compute.cpp
+++ b/doc/snippets/ComplexEigenSolver_compute.cpp
@@ -1,4 +1,4 @@
-MatrixXcf A = MatrixXcf::Random(4,4);
+MatrixXcf A = MatrixXcf::Random(4, 4);
 cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl;
 
 ComplexEigenSolver<MatrixXcf> ces;
diff --git a/doc/snippets/ComplexEigenSolver_eigenvalues.cpp b/doc/snippets/ComplexEigenSolver_eigenvalues.cpp
index 5509bd8..d3bff51 100644
--- a/doc/snippets/ComplexEigenSolver_eigenvalues.cpp
+++ b/doc/snippets/ComplexEigenSolver_eigenvalues.cpp
@@ -1,4 +1,3 @@
-MatrixXcf ones = MatrixXcf::Ones(3,3);
+MatrixXcf ones = MatrixXcf::Ones(3, 3);
 ComplexEigenSolver<MatrixXcf> ces(ones, /* computeEigenvectors = */ false);
-cout << "The eigenvalues of the 3x3 matrix of ones are:" 
-     << endl << ces.eigenvalues() << endl;
+cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << ces.eigenvalues() << endl;
diff --git a/doc/snippets/ComplexEigenSolver_eigenvectors.cpp b/doc/snippets/ComplexEigenSolver_eigenvectors.cpp
index adeed9a..46aab4a 100644
--- a/doc/snippets/ComplexEigenSolver_eigenvectors.cpp
+++ b/doc/snippets/ComplexEigenSolver_eigenvectors.cpp
@@ -1,4 +1,3 @@
-MatrixXcf ones = MatrixXcf::Ones(3,3);
+MatrixXcf ones = MatrixXcf::Ones(3, 3);
 ComplexEigenSolver<MatrixXcf> ces(ones);
-cout << "The first eigenvector of the 3x3 matrix of ones is:" 
-     << endl << ces.eigenvectors().col(0) << endl;
+cout << "The first eigenvector of the 3x3 matrix of ones is:" << endl << ces.eigenvectors().col(0) << endl;
diff --git a/doc/snippets/ComplexSchur_compute.cpp b/doc/snippets/ComplexSchur_compute.cpp
index 3a51701..53b7f8b 100644
--- a/doc/snippets/ComplexSchur_compute.cpp
+++ b/doc/snippets/ComplexSchur_compute.cpp
@@ -1,4 +1,4 @@
-MatrixXcf A = MatrixXcf::Random(4,4);
+MatrixXcf A = MatrixXcf::Random(4, 4);
 ComplexSchur<MatrixXcf> schur(4);
 schur.compute(A);
 cout << "The matrix T in the decomposition of A is:" << endl << schur.matrixT() << endl;
diff --git a/doc/snippets/ComplexSchur_matrixT.cpp b/doc/snippets/ComplexSchur_matrixT.cpp
index 8380571..e1033ad 100644
--- a/doc/snippets/ComplexSchur_matrixT.cpp
+++ b/doc/snippets/ComplexSchur_matrixT.cpp
@@ -1,4 +1,4 @@
-MatrixXcf A = MatrixXcf::Random(4,4);
+MatrixXcf A = MatrixXcf::Random(4, 4);
 cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl;
-ComplexSchur<MatrixXcf> schurOfA(A, false); // false means do not compute U
+ComplexSchur<MatrixXcf> schurOfA(A, false);  // false means do not compute U
 cout << "The triangular matrix T is:" << endl << schurOfA.matrixT() << endl;
diff --git a/doc/snippets/ComplexSchur_matrixU.cpp b/doc/snippets/ComplexSchur_matrixU.cpp
index ba3d9c2..8138394 100644
--- a/doc/snippets/ComplexSchur_matrixU.cpp
+++ b/doc/snippets/ComplexSchur_matrixU.cpp
@@ -1,4 +1,4 @@
-MatrixXcf A = MatrixXcf::Random(4,4);
+MatrixXcf A = MatrixXcf::Random(4, 4);
 cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl;
 ComplexSchur<MatrixXcf> schurOfA(A);
 cout << "The unitary matrix U is:" << endl << schurOfA.matrixU() << endl;
diff --git a/doc/snippets/Cwise_abs.cpp b/doc/snippets/Cwise_abs.cpp
index 0aeec3a..744851a 100644
--- a/doc/snippets/Cwise_abs.cpp
+++ b/doc/snippets/Cwise_abs.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,-2,-3);
+Array3d v(1, -2, -3);
 cout << v.abs() << endl;
diff --git a/doc/snippets/Cwise_abs2.cpp b/doc/snippets/Cwise_abs2.cpp
index 2c4f9b3..71e5cb2 100644
--- a/doc/snippets/Cwise_abs2.cpp
+++ b/doc/snippets/Cwise_abs2.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,-2,-3);
+Array3d v(1, -2, -3);
 cout << v.abs2() << endl;
diff --git a/doc/snippets/Cwise_acos.cpp b/doc/snippets/Cwise_acos.cpp
index 34432cb..bbbbf52 100644
--- a/doc/snippets/Cwise_acos.cpp
+++ b/doc/snippets/Cwise_acos.cpp
@@ -1,2 +1,2 @@
-Array3d v(0, sqrt(2.)/2, 1);
+Array3d v(0, sqrt(2.) / 2, 1);
 cout << v.acos() << endl;
diff --git a/doc/snippets/Cwise_array_atan2_array.cpp b/doc/snippets/Cwise_array_atan2_array.cpp
index ace075a..5742f9a 100644
--- a/doc/snippets/Cwise_array_atan2_array.cpp
+++ b/doc/snippets/Cwise_array_atan2_array.cpp
@@ -1,4 +1,3 @@
-Array<double,1,3> x(8,-25,3),
-                  y(1./3.,0.5,-2.);
-cout << "atan2([" << x << "], [" << y << "]) = " << x.atan2(y) << endl; // using ArrayBase::pow
-cout << "atan2([" << x << "], [" << y << "] = " << atan2(x,y) << endl; // using Eigen::pow
+Array<double, 1, 3> x(8, -25, 3), y(1. / 3., 0.5, -2.);
+cout << "atan2([" << x << "], [" << y << "]) = " << x.atan2(y) << endl;  // using ArrayBase::pow
+cout << "atan2([" << x << "], [" << y << "] = " << atan2(x, y) << endl;  // using Eigen::pow
diff --git a/doc/snippets/Cwise_array_power_array.cpp b/doc/snippets/Cwise_array_power_array.cpp
index 432a76e..ab2d87a 100644
--- a/doc/snippets/Cwise_array_power_array.cpp
+++ b/doc/snippets/Cwise_array_power_array.cpp
@@ -1,4 +1,3 @@
-Array<double,1,3> x(8,25,3),
-                  e(1./3.,0.5,2.);
-cout << "[" << x << "]^[" << e << "] = " << x.pow(e) << endl; // using ArrayBase::pow
-cout << "[" << x << "]^[" << e << "] = " << pow(x,e) << endl; // using Eigen::pow
+Array<double, 1, 3> x(8, 25, 3), e(1. / 3., 0.5, 2.);
+cout << "[" << x << "]^[" << e << "] = " << x.pow(e) << endl;   // using ArrayBase::pow
+cout << "[" << x << "]^[" << e << "] = " << pow(x, e) << endl;  // using Eigen::pow
diff --git a/doc/snippets/Cwise_asin.cpp b/doc/snippets/Cwise_asin.cpp
index 8dad838..3a64671 100644
--- a/doc/snippets/Cwise_asin.cpp
+++ b/doc/snippets/Cwise_asin.cpp
@@ -1,2 +1,2 @@
-Array3d v(0, sqrt(2.)/2, 1);
+Array3d v(0, sqrt(2.) / 2, 1);
 cout << v.asin() << endl;
diff --git a/doc/snippets/Cwise_atan.cpp b/doc/snippets/Cwise_atan.cpp
index 4468447..1b60a9a 100644
--- a/doc/snippets/Cwise_atan.cpp
+++ b/doc/snippets/Cwise_atan.cpp
@@ -1,2 +1,2 @@
-ArrayXd v = ArrayXd::LinSpaced(5,0,1);
+ArrayXd v = ArrayXd::LinSpaced(5, 0, 1);
 cout << v.atan() << endl;
diff --git a/doc/snippets/Cwise_boolean_and.cpp b/doc/snippets/Cwise_boolean_and.cpp
index df6b60d..227ac36 100644
--- a/doc/snippets/Cwise_boolean_and.cpp
+++ b/doc/snippets/Cwise_boolean_and.cpp
@@ -1,2 +1,2 @@
-Array3d v(-1,2,1), w(-3,2,3);
-cout << ((v<w) && (v<0)) << endl;
+Array3d v(-1, 2, 1), w(-3, 2, 3);
+cout << ((v < w) && (v < 0)) << endl;
diff --git a/doc/snippets/Cwise_boolean_not.cpp b/doc/snippets/Cwise_boolean_not.cpp
index 40009f1..404fd94 100644
--- a/doc/snippets/Cwise_boolean_not.cpp
+++ b/doc/snippets/Cwise_boolean_not.cpp
@@ -1,5 +1,5 @@
-Array3d v(1,2,3);
-v(1) *= 0.0/0.0;
+Array3d v(1, 2, 3);
+v(1) *= 0.0 / 0.0;
 v(2) /= 0.0;
 cout << v << endl << endl;
 cout << !isfinite(v) << endl;
diff --git a/doc/snippets/Cwise_boolean_or.cpp b/doc/snippets/Cwise_boolean_or.cpp
index 83eb006..df87f7a 100644
--- a/doc/snippets/Cwise_boolean_or.cpp
+++ b/doc/snippets/Cwise_boolean_or.cpp
@@ -1,2 +1,2 @@
-Array3d v(-1,2,1), w(-3,2,3);
-cout << ((v<w) || (v<0)) << endl;
+Array3d v(-1, 2, 1), w(-3, 2, 3);
+cout << ((v < w) || (v < 0)) << endl;
diff --git a/doc/snippets/Cwise_cbrt.cpp b/doc/snippets/Cwise_cbrt.cpp
index a58c76c..b6dcdfc 100644
--- a/doc/snippets/Cwise_cbrt.cpp
+++ b/doc/snippets/Cwise_cbrt.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,4);
+Array3d v(1, 2, 4);
 cout << v.cbrt() << endl;
diff --git a/doc/snippets/Cwise_ceil.cpp b/doc/snippets/Cwise_ceil.cpp
index 76cf661..6123891 100644
--- a/doc/snippets/Cwise_ceil.cpp
+++ b/doc/snippets/Cwise_ceil.cpp
@@ -1,3 +1,3 @@
-ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
+ArrayXd v = ArrayXd::LinSpaced(7, -2, 2);
 cout << v << endl << endl;
 cout << ceil(v) << endl;
diff --git a/doc/snippets/Cwise_cos.cpp b/doc/snippets/Cwise_cos.cpp
index f589f07..f84f325 100644
--- a/doc/snippets/Cwise_cos.cpp
+++ b/doc/snippets/Cwise_cos.cpp
@@ -1,2 +1,2 @@
-Array3d v(M_PI, M_PI/2, M_PI/3);
+Array3d v(M_PI, M_PI / 2, M_PI / 3);
 cout << v.cos() << endl;
diff --git a/doc/snippets/Cwise_cosh.cpp b/doc/snippets/Cwise_cosh.cpp
index 80ee75d..3cd3304 100644
--- a/doc/snippets/Cwise_cosh.cpp
+++ b/doc/snippets/Cwise_cosh.cpp
@@ -1,2 +1,2 @@
-ArrayXd v = ArrayXd::LinSpaced(5,0,1);
+ArrayXd v = ArrayXd::LinSpaced(5, 0, 1);
 cout << cosh(v) << endl;
diff --git a/doc/snippets/Cwise_cube.cpp b/doc/snippets/Cwise_cube.cpp
index 85e41dc..69f4c34 100644
--- a/doc/snippets/Cwise_cube.cpp
+++ b/doc/snippets/Cwise_cube.cpp
@@ -1,2 +1,2 @@
-Array3d v(2,3,4);
+Array3d v(2, 3, 4);
 cout << v.cube() << endl;
diff --git a/doc/snippets/Cwise_equal_equal.cpp b/doc/snippets/Cwise_equal_equal.cpp
index 0ba96f6..7fdeafa 100644
--- a/doc/snippets/Cwise_equal_equal.cpp
+++ b/doc/snippets/Cwise_equal_equal.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,3), w(3,2,1);
-cout << (v==w) << endl;
+Array3d v(1, 2, 3), w(3, 2, 1);
+cout << (v == w) << endl;
diff --git a/doc/snippets/Cwise_exp.cpp b/doc/snippets/Cwise_exp.cpp
index db23618..9d65259 100644
--- a/doc/snippets/Cwise_exp.cpp
+++ b/doc/snippets/Cwise_exp.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,3);
+Array3d v(1, 2, 3);
 cout << v.exp() << endl;
diff --git a/doc/snippets/Cwise_floor.cpp b/doc/snippets/Cwise_floor.cpp
index 73756b4..8f3ec85 100644
--- a/doc/snippets/Cwise_floor.cpp
+++ b/doc/snippets/Cwise_floor.cpp
@@ -1,3 +1,3 @@
-ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
+ArrayXd v = ArrayXd::LinSpaced(7, -2, 2);
 cout << v << endl << endl;
 cout << floor(v) << endl;
diff --git a/doc/snippets/Cwise_greater.cpp b/doc/snippets/Cwise_greater.cpp
index 40ad029..77d448a 100644
--- a/doc/snippets/Cwise_greater.cpp
+++ b/doc/snippets/Cwise_greater.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,3), w(3,2,1);
-cout << (v>w) << endl;
+Array3d v(1, 2, 3), w(3, 2, 1);
+cout << (v > w) << endl;
diff --git a/doc/snippets/Cwise_greater_equal.cpp b/doc/snippets/Cwise_greater_equal.cpp
index 6a08f89..8aa94e8 100644
--- a/doc/snippets/Cwise_greater_equal.cpp
+++ b/doc/snippets/Cwise_greater_equal.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,3), w(3,2,1);
-cout << (v>=w) << endl;
+Array3d v(1, 2, 3), w(3, 2, 1);
+cout << (v >= w) << endl;
diff --git a/doc/snippets/Cwise_inverse.cpp b/doc/snippets/Cwise_inverse.cpp
index 3967a7e..292daef 100644
--- a/doc/snippets/Cwise_inverse.cpp
+++ b/doc/snippets/Cwise_inverse.cpp
@@ -1,2 +1,2 @@
-Array3d v(2,3,4);
+Array3d v(2, 3, 4);
 cout << v.inverse() << endl;
diff --git a/doc/snippets/Cwise_isFinite.cpp b/doc/snippets/Cwise_isFinite.cpp
index 1da55fd..c3309f2 100644
--- a/doc/snippets/Cwise_isFinite.cpp
+++ b/doc/snippets/Cwise_isFinite.cpp
@@ -1,5 +1,5 @@
-Array3d v(1,2,3);
-v(1) *= 0.0/0.0;
+Array3d v(1, 2, 3);
+v(1) *= 0.0 / 0.0;
 v(2) /= 0.0;
 cout << v << endl << endl;
 cout << isfinite(v) << endl;
diff --git a/doc/snippets/Cwise_isInf.cpp b/doc/snippets/Cwise_isInf.cpp
index be79308..c97b8a6 100644
--- a/doc/snippets/Cwise_isInf.cpp
+++ b/doc/snippets/Cwise_isInf.cpp
@@ -1,5 +1,5 @@
-Array3d v(1,2,3);
-v(1) *= 0.0/0.0;
+Array3d v(1, 2, 3);
+v(1) *= 0.0 / 0.0;
 v(2) /= 0.0;
 cout << v << endl << endl;
 cout << isinf(v) << endl;
diff --git a/doc/snippets/Cwise_isNaN.cpp b/doc/snippets/Cwise_isNaN.cpp
index 7b2a930..ab2b528 100644
--- a/doc/snippets/Cwise_isNaN.cpp
+++ b/doc/snippets/Cwise_isNaN.cpp
@@ -1,5 +1,5 @@
-Array3d v(1,2,3);
-v(1) *= 0.0/0.0;
+Array3d v(1, 2, 3);
+v(1) *= 0.0 / 0.0;
 v(2) /= 0.0;
 cout << v << endl << endl;
 cout << isnan(v) << endl;
diff --git a/doc/snippets/Cwise_less.cpp b/doc/snippets/Cwise_less.cpp
index cafd3b6..95ccb30 100644
--- a/doc/snippets/Cwise_less.cpp
+++ b/doc/snippets/Cwise_less.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,3), w(3,2,1);
-cout << (v<w) << endl;
+Array3d v(1, 2, 3), w(3, 2, 1);
+cout << (v < w) << endl;
diff --git a/doc/snippets/Cwise_less_equal.cpp b/doc/snippets/Cwise_less_equal.cpp
index 1600e39..08d65be 100644
--- a/doc/snippets/Cwise_less_equal.cpp
+++ b/doc/snippets/Cwise_less_equal.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,3), w(3,2,1);
-cout << (v<=w) << endl;
+Array3d v(1, 2, 3), w(3, 2, 1);
+cout << (v <= w) << endl;
diff --git a/doc/snippets/Cwise_log.cpp b/doc/snippets/Cwise_log.cpp
index f7aca72..f3e13d6 100644
--- a/doc/snippets/Cwise_log.cpp
+++ b/doc/snippets/Cwise_log.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,3);
+Array3d v(1, 2, 3);
 cout << v.log() << endl;
diff --git a/doc/snippets/Cwise_log10.cpp b/doc/snippets/Cwise_log10.cpp
index b7ae4a8..8656f48 100644
--- a/doc/snippets/Cwise_log10.cpp
+++ b/doc/snippets/Cwise_log10.cpp
@@ -1,2 +1,2 @@
-Array4d v(-1,0,1,2);
+Array4d v(-1, 0, 1, 2);
 cout << log10(v) << endl;
diff --git a/doc/snippets/Cwise_max.cpp b/doc/snippets/Cwise_max.cpp
index 6602881..ab8d397 100644
--- a/doc/snippets/Cwise_max.cpp
+++ b/doc/snippets/Cwise_max.cpp
@@ -1,2 +1,2 @@
-Array3d v(2,3,4), w(4,2,3);
+Array3d v(2, 3, 4), w(4, 2, 3);
 cout << v.max(w) << endl;
diff --git a/doc/snippets/Cwise_min.cpp b/doc/snippets/Cwise_min.cpp
index 1c01c76..771eaf2 100644
--- a/doc/snippets/Cwise_min.cpp
+++ b/doc/snippets/Cwise_min.cpp
@@ -1,2 +1,2 @@
-Array3d v(2,3,4), w(4,2,3);
+Array3d v(2, 3, 4), w(4, 2, 3);
 cout << v.min(w) << endl;
diff --git a/doc/snippets/Cwise_minus.cpp b/doc/snippets/Cwise_minus.cpp
index b89b9fb..1389b4a 100644
--- a/doc/snippets/Cwise_minus.cpp
+++ b/doc/snippets/Cwise_minus.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,3);
-cout << v-5 << endl;
+Array3d v(1, 2, 3);
+cout << v - 5 << endl;
diff --git a/doc/snippets/Cwise_minus_equal.cpp b/doc/snippets/Cwise_minus_equal.cpp
index dfde49d..33433e0 100644
--- a/doc/snippets/Cwise_minus_equal.cpp
+++ b/doc/snippets/Cwise_minus_equal.cpp
@@ -1,3 +1,3 @@
-Array3d v(1,2,3);
+Array3d v(1, 2, 3);
 v -= 5;
 cout << v << endl;
diff --git a/doc/snippets/Cwise_not_equal.cpp b/doc/snippets/Cwise_not_equal.cpp
index 57a407a..60aea2b 100644
--- a/doc/snippets/Cwise_not_equal.cpp
+++ b/doc/snippets/Cwise_not_equal.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,3), w(3,2,1);
-cout << (v!=w) << endl;
+Array3d v(1, 2, 3), w(3, 2, 1);
+cout << (v != w) << endl;
diff --git a/doc/snippets/Cwise_plus.cpp b/doc/snippets/Cwise_plus.cpp
index 9d47327..7a878d6 100644
--- a/doc/snippets/Cwise_plus.cpp
+++ b/doc/snippets/Cwise_plus.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,3);
-cout << v+5 << endl;
+Array3d v(1, 2, 3);
+cout << v + 5 << endl;
diff --git a/doc/snippets/Cwise_plus_equal.cpp b/doc/snippets/Cwise_plus_equal.cpp
index d744b1e..3e00ba2 100644
--- a/doc/snippets/Cwise_plus_equal.cpp
+++ b/doc/snippets/Cwise_plus_equal.cpp
@@ -1,3 +1,3 @@
-Array3d v(1,2,3);
+Array3d v(1, 2, 3);
 v += 5;
 cout << v << endl;
diff --git a/doc/snippets/Cwise_pow.cpp b/doc/snippets/Cwise_pow.cpp
index a723ed8..28a9dc5 100644
--- a/doc/snippets/Cwise_pow.cpp
+++ b/doc/snippets/Cwise_pow.cpp
@@ -1,2 +1,2 @@
-Array3d v(8,27,64);
+Array3d v(8, 27, 64);
 cout << v.pow(0.333333) << endl;
diff --git a/doc/snippets/Cwise_product.cpp b/doc/snippets/Cwise_product.cpp
index 714d66d..cee5b20 100644
--- a/doc/snippets/Cwise_product.cpp
+++ b/doc/snippets/Cwise_product.cpp
@@ -1,4 +1,3 @@
 Array33i a = Array33i::Random(), b = Array33i::Random();
 Array33i c = a * b;
 cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl;
-
diff --git a/doc/snippets/Cwise_quotient.cpp b/doc/snippets/Cwise_quotient.cpp
index 7cb9f7f..ab8b506 100644
--- a/doc/snippets/Cwise_quotient.cpp
+++ b/doc/snippets/Cwise_quotient.cpp
@@ -1,2 +1,2 @@
-Array3d v(2,3,4), w(4,2,3);
-cout << v/w << endl;
+Array3d v(2, 3, 4), w(4, 2, 3);
+cout << v / w << endl;
diff --git a/doc/snippets/Cwise_rint.cpp b/doc/snippets/Cwise_rint.cpp
index 1dc7b2f..eb8bc84 100644
--- a/doc/snippets/Cwise_rint.cpp
+++ b/doc/snippets/Cwise_rint.cpp
@@ -1,3 +1,3 @@
-ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
+ArrayXd v = ArrayXd::LinSpaced(7, -2, 2);
 cout << v << endl << endl;
 cout << rint(v) << endl;
diff --git a/doc/snippets/Cwise_round.cpp b/doc/snippets/Cwise_round.cpp
index e5c8823..d9ff417 100644
--- a/doc/snippets/Cwise_round.cpp
+++ b/doc/snippets/Cwise_round.cpp
@@ -1,3 +1,3 @@
-ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
+ArrayXd v = ArrayXd::LinSpaced(7, -2, 2);
 cout << v << endl << endl;
 cout << round(v) << endl;
diff --git a/doc/snippets/Cwise_scalar_power_array.cpp b/doc/snippets/Cwise_scalar_power_array.cpp
index c968b2c..65bb478 100644
--- a/doc/snippets/Cwise_scalar_power_array.cpp
+++ b/doc/snippets/Cwise_scalar_power_array.cpp
@@ -1,2 +1,2 @@
-Array<double,1,3> e(2,-3,1./3.);
-cout << "10^[" << e << "] = " << pow(10,e) << endl;
+Array<double, 1, 3> e(2, -3, 1. / 3.);
+cout << "10^[" << e << "] = " << pow(10, e) << endl;
diff --git a/doc/snippets/Cwise_sign.cpp b/doc/snippets/Cwise_sign.cpp
index 49920e4..55d24ab 100644
--- a/doc/snippets/Cwise_sign.cpp
+++ b/doc/snippets/Cwise_sign.cpp
@@ -1,2 +1,2 @@
-Array3d v(-3,5,0);
+Array3d v(-3, 5, 0);
 cout << v.sign() << endl;
diff --git a/doc/snippets/Cwise_sin.cpp b/doc/snippets/Cwise_sin.cpp
index 46fa908..43c4a04 100644
--- a/doc/snippets/Cwise_sin.cpp
+++ b/doc/snippets/Cwise_sin.cpp
@@ -1,2 +1,2 @@
-Array3d v(M_PI, M_PI/2, M_PI/3);
+Array3d v(M_PI, M_PI / 2, M_PI / 3);
 cout << v.sin() << endl;
diff --git a/doc/snippets/Cwise_sinh.cpp b/doc/snippets/Cwise_sinh.cpp
index fac9b19..aefcd6d 100644
--- a/doc/snippets/Cwise_sinh.cpp
+++ b/doc/snippets/Cwise_sinh.cpp
@@ -1,2 +1,2 @@
-ArrayXd v = ArrayXd::LinSpaced(5,0,1);
+ArrayXd v = ArrayXd::LinSpaced(5, 0, 1);
 cout << sinh(v) << endl;
diff --git a/doc/snippets/Cwise_slash_equal.cpp b/doc/snippets/Cwise_slash_equal.cpp
index 2efd32d..cb776b8 100644
--- a/doc/snippets/Cwise_slash_equal.cpp
+++ b/doc/snippets/Cwise_slash_equal.cpp
@@ -1,3 +1,3 @@
-Array3d v(3,2,4), w(5,4,2);
+Array3d v(3, 2, 4), w(5, 4, 2);
 v /= w;
 cout << v << endl;
diff --git a/doc/snippets/Cwise_sqrt.cpp b/doc/snippets/Cwise_sqrt.cpp
index 97bafe8..e0e5d36 100644
--- a/doc/snippets/Cwise_sqrt.cpp
+++ b/doc/snippets/Cwise_sqrt.cpp
@@ -1,2 +1,2 @@
-Array3d v(1,2,4);
+Array3d v(1, 2, 4);
 cout << v.sqrt() << endl;
diff --git a/doc/snippets/Cwise_square.cpp b/doc/snippets/Cwise_square.cpp
index f704c5e..2b3132e 100644
--- a/doc/snippets/Cwise_square.cpp
+++ b/doc/snippets/Cwise_square.cpp
@@ -1,2 +1,2 @@
-Array3d v(2,3,4);
+Array3d v(2, 3, 4);
 cout << v.square() << endl;
diff --git a/doc/snippets/Cwise_tan.cpp b/doc/snippets/Cwise_tan.cpp
index b758ef0..abe8d1c 100644
--- a/doc/snippets/Cwise_tan.cpp
+++ b/doc/snippets/Cwise_tan.cpp
@@ -1,2 +1,2 @@
-Array3d v(M_PI, M_PI/2, M_PI/3);
+Array3d v(M_PI, M_PI / 2, M_PI / 3);
 cout << v.tan() << endl;
diff --git a/doc/snippets/Cwise_tanh.cpp b/doc/snippets/Cwise_tanh.cpp
index 30cd045..ae8fea5 100644
--- a/doc/snippets/Cwise_tanh.cpp
+++ b/doc/snippets/Cwise_tanh.cpp
@@ -1,2 +1,2 @@
-ArrayXd v = ArrayXd::LinSpaced(5,0,1);
+ArrayXd v = ArrayXd::LinSpaced(5, 0, 1);
 cout << tanh(v) << endl;
diff --git a/doc/snippets/Cwise_times_equal.cpp b/doc/snippets/Cwise_times_equal.cpp
index 147556c..45151be 100644
--- a/doc/snippets/Cwise_times_equal.cpp
+++ b/doc/snippets/Cwise_times_equal.cpp
@@ -1,3 +1,3 @@
-Array3d v(1,2,3), w(2,3,0);
+Array3d v(1, 2, 3), w(2, 3, 0);
 v *= w;
 cout << v << endl;
diff --git a/doc/snippets/DenseBase_LinSpaced.cpp b/doc/snippets/DenseBase_LinSpaced.cpp
index 8e54b17..a57053f 100644
--- a/doc/snippets/DenseBase_LinSpaced.cpp
+++ b/doc/snippets/DenseBase_LinSpaced.cpp
@@ -1,2 +1,2 @@
-cout << VectorXi::LinSpaced(4,7,10).transpose() << endl;
-cout << VectorXd::LinSpaced(5,0.0,1.0).transpose() << endl;
+cout << VectorXi::LinSpaced(4, 7, 10).transpose() << endl;
+cout << VectorXd::LinSpaced(5, 0.0, 1.0).transpose() << endl;
diff --git a/doc/snippets/DenseBase_LinSpacedInt.cpp b/doc/snippets/DenseBase_LinSpacedInt.cpp
index 0d7ae06..732d70a 100644
--- a/doc/snippets/DenseBase_LinSpacedInt.cpp
+++ b/doc/snippets/DenseBase_LinSpacedInt.cpp
@@ -1,8 +1,8 @@
 cout << "Even spacing inputs:" << endl;
-cout << VectorXi::LinSpaced(8,1,4).transpose() << endl;
-cout << VectorXi::LinSpaced(8,1,8).transpose() << endl;
-cout << VectorXi::LinSpaced(8,1,15).transpose() << endl;
+cout << VectorXi::LinSpaced(8, 1, 4).transpose() << endl;
+cout << VectorXi::LinSpaced(8, 1, 8).transpose() << endl;
+cout << VectorXi::LinSpaced(8, 1, 15).transpose() << endl;
 cout << "Uneven spacing inputs:" << endl;
-cout << VectorXi::LinSpaced(8,1,7).transpose() << endl;
-cout << VectorXi::LinSpaced(8,1,9).transpose() << endl;
-cout << VectorXi::LinSpaced(8,1,16).transpose() << endl;
+cout << VectorXi::LinSpaced(8, 1, 7).transpose() << endl;
+cout << VectorXi::LinSpaced(8, 1, 9).transpose() << endl;
+cout << VectorXi::LinSpaced(8, 1, 16).transpose() << endl;
diff --git a/doc/snippets/DenseBase_LinSpaced_seq_deprecated.cpp b/doc/snippets/DenseBase_LinSpaced_seq_deprecated.cpp
index f55c508..3c4a565 100644
--- a/doc/snippets/DenseBase_LinSpaced_seq_deprecated.cpp
+++ b/doc/snippets/DenseBase_LinSpaced_seq_deprecated.cpp
@@ -1,2 +1,2 @@
-cout << VectorXi::LinSpaced(Sequential,4,7,10).transpose() << endl;
-cout << VectorXd::LinSpaced(Sequential,5,0.0,1.0).transpose() << endl;
+cout << VectorXi::LinSpaced(Sequential, 4, 7, 10).transpose() << endl;
+cout << VectorXd::LinSpaced(Sequential, 5, 0.0, 1.0).transpose() << endl;
diff --git a/doc/snippets/DenseBase_setLinSpaced.cpp b/doc/snippets/DenseBase_setLinSpaced.cpp
index 46054f2..6c1eca6 100644
--- a/doc/snippets/DenseBase_setLinSpaced.cpp
+++ b/doc/snippets/DenseBase_setLinSpaced.cpp
@@ -1,3 +1,3 @@
 VectorXf v;
-v.setLinSpaced(5,0.5f,1.5f);
+v.setLinSpaced(5, 0.5f, 1.5f);
 cout << v << endl;
diff --git a/doc/snippets/DirectionWise_hnormalized.cpp b/doc/snippets/DirectionWise_hnormalized.cpp
index 2451f6e..8a46652 100644
--- a/doc/snippets/DirectionWise_hnormalized.cpp
+++ b/doc/snippets/DirectionWise_hnormalized.cpp
@@ -1,6 +1,6 @@
-Matrix4Xd M = Matrix4Xd::Random(4,5);
+Matrix4Xd M = Matrix4Xd::Random(4, 5);
 Projective3d P(Matrix4d::Random());
 cout << "The matrix M is:" << endl << M << endl << endl;
 cout << "M.colwise().hnormalized():" << endl << M.colwise().hnormalized() << endl << endl;
-cout << "P*M:" << endl << P*M << endl << endl;
-cout << "(P*M).colwise().hnormalized():" << endl << (P*M).colwise().hnormalized() << endl << endl;
+cout << "P*M:" << endl << P * M << endl << endl;
+cout << "(P*M).colwise().hnormalized():" << endl << (P * M).colwise().hnormalized() << endl << endl;
diff --git a/doc/snippets/DirectionWise_replicate.cpp b/doc/snippets/DirectionWise_replicate.cpp
index d92d4a3..c448307 100644
--- a/doc/snippets/DirectionWise_replicate.cpp
+++ b/doc/snippets/DirectionWise_replicate.cpp
@@ -1,4 +1,4 @@
-MatrixXi m = MatrixXi::Random(2,3);
+MatrixXi m = MatrixXi::Random(2, 3);
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "m.colwise().replicate<3>() = ..." << endl;
 cout << m.colwise().replicate<3>() << endl;
diff --git a/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp b/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp
index c1d9fa8..b54425f 100644
--- a/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp
+++ b/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp
@@ -1,4 +1,4 @@
-MatrixXd A = MatrixXd::Random(6,6);
+MatrixXd A = MatrixXd::Random(6, 6);
 cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
 
 EigenSolver<MatrixXd> es(A);
diff --git a/doc/snippets/EigenSolver_compute.cpp b/doc/snippets/EigenSolver_compute.cpp
index a5c96e9..1652463 100644
--- a/doc/snippets/EigenSolver_compute.cpp
+++ b/doc/snippets/EigenSolver_compute.cpp
@@ -1,6 +1,6 @@
 EigenSolver<MatrixXf> es;
-MatrixXf A = MatrixXf::Random(4,4);
+MatrixXf A = MatrixXf::Random(4, 4);
 es.compute(A, /* computeEigenvectors = */ false);
 cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl;
-es.compute(A + MatrixXf::Identity(4,4), false); // re-use es to compute eigenvalues of A+I
+es.compute(A + MatrixXf::Identity(4, 4), false);  // re-use es to compute eigenvalues of A+I
 cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl;
diff --git a/doc/snippets/EigenSolver_eigenvalues.cpp b/doc/snippets/EigenSolver_eigenvalues.cpp
index ed28869..866183c 100644
--- a/doc/snippets/EigenSolver_eigenvalues.cpp
+++ b/doc/snippets/EigenSolver_eigenvalues.cpp
@@ -1,4 +1,3 @@
-MatrixXd ones = MatrixXd::Ones(3,3);
+MatrixXd ones = MatrixXd::Ones(3, 3);
 EigenSolver<MatrixXd> es(ones, false);
-cout << "The eigenvalues of the 3x3 matrix of ones are:" 
-     << endl << es.eigenvalues() << endl;
+cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << es.eigenvalues() << endl;
diff --git a/doc/snippets/EigenSolver_eigenvectors.cpp b/doc/snippets/EigenSolver_eigenvectors.cpp
index 8355f76..6d4606d 100644
--- a/doc/snippets/EigenSolver_eigenvectors.cpp
+++ b/doc/snippets/EigenSolver_eigenvectors.cpp
@@ -1,4 +1,3 @@
-MatrixXd ones = MatrixXd::Ones(3,3);
+MatrixXd ones = MatrixXd::Ones(3, 3);
 EigenSolver<MatrixXd> es(ones);
-cout << "The first eigenvector of the 3x3 matrix of ones is:"
-     << endl << es.eigenvectors().col(0) << endl;
+cout << "The first eigenvector of the 3x3 matrix of ones is:" << endl << es.eigenvectors().col(0) << endl;
diff --git a/doc/snippets/EigenSolver_pseudoEigenvectors.cpp b/doc/snippets/EigenSolver_pseudoEigenvectors.cpp
index 85e2569..d9f3698 100644
--- a/doc/snippets/EigenSolver_pseudoEigenvectors.cpp
+++ b/doc/snippets/EigenSolver_pseudoEigenvectors.cpp
@@ -1,4 +1,4 @@
-MatrixXd A = MatrixXd::Random(6,6);
+MatrixXd A = MatrixXd::Random(6, 6);
 cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
 
 EigenSolver<MatrixXd> es(A);
diff --git a/doc/snippets/FullPivHouseholderQR_solve.cpp b/doc/snippets/FullPivHouseholderQR_solve.cpp
index 23bc074..621d1d1 100644
--- a/doc/snippets/FullPivHouseholderQR_solve.cpp
+++ b/doc/snippets/FullPivHouseholderQR_solve.cpp
@@ -4,5 +4,5 @@
 cout << "Here is the matrix y:" << endl << y << endl;
 Matrix3f x;
 x = m.fullPivHouseholderQr().solve(y);
-assert(y.isApprox(m*x));
+assert(y.isApprox(m* x));
 cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
diff --git a/doc/snippets/FullPivLU_image.cpp b/doc/snippets/FullPivLU_image.cpp
index 817bc1e..a8f664e 100644
--- a/doc/snippets/FullPivLU_image.cpp
+++ b/doc/snippets/FullPivLU_image.cpp
@@ -1,9 +1,7 @@
 Matrix3d m;
-m << 1,1,0,
-     1,3,2,
-     0,1,1;
+m << 1, 1, 0, 1, 3, 2, 0, 1, 1;
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Notice that the middle column is the sum of the two others, so the "
      << "columns are linearly dependent." << endl;
-cout << "Here is a matrix whose columns have the same span but are linearly independent:"
-     << endl << m.fullPivLu().image(m) << endl;
+cout << "Here is a matrix whose columns have the same span but are linearly independent:" << endl
+     << m.fullPivLu().image(m) << endl;
diff --git a/doc/snippets/FullPivLU_kernel.cpp b/doc/snippets/FullPivLU_kernel.cpp
index 7086e01..448a515 100644
--- a/doc/snippets/FullPivLU_kernel.cpp
+++ b/doc/snippets/FullPivLU_kernel.cpp
@@ -1,7 +1,5 @@
-MatrixXf m = MatrixXf::Random(3,5);
+MatrixXf m = MatrixXf::Random(3, 5);
 cout << "Here is the matrix m:" << endl << m << endl;
 MatrixXf ker = m.fullPivLu().kernel();
-cout << "Here is a matrix whose columns form a basis of the kernel of m:"
-     << endl << ker << endl;
-cout << "By definition of the kernel, m*ker is zero:"
-     << endl << m*ker << endl;
+cout << "Here is a matrix whose columns form a basis of the kernel of m:" << endl << ker << endl;
+cout << "By definition of the kernel, m*ker is zero:" << endl << m * ker << endl;
diff --git a/doc/snippets/FullPivLU_solve.cpp b/doc/snippets/FullPivLU_solve.cpp
index c1f8823..a4ecb83 100644
--- a/doc/snippets/FullPivLU_solve.cpp
+++ b/doc/snippets/FullPivLU_solve.cpp
@@ -1,11 +1,9 @@
-Matrix<float,2,3> m = Matrix<float,2,3>::Random();
+Matrix<float, 2, 3> m = Matrix<float, 2, 3>::Random();
 Matrix2f y = Matrix2f::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is the matrix y:" << endl << y << endl;
-Matrix<float,3,2> x = m.fullPivLu().solve(y);
-if((m*x).isApprox(y))
-{
+Matrix<float, 3, 2> x = m.fullPivLu().solve(y);
+if ((m * x).isApprox(y)) {
   cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
-}
-else
+} else
   cout << "The equation mx=y does not have any solution." << endl;
diff --git a/doc/snippets/GeneralizedEigenSolver.cpp b/doc/snippets/GeneralizedEigenSolver.cpp
index 2acda45..f7a7254 100644
--- a/doc/snippets/GeneralizedEigenSolver.cpp
+++ b/doc/snippets/GeneralizedEigenSolver.cpp
@@ -1,6 +1,6 @@
 GeneralizedEigenSolver<MatrixXf> ges;
-MatrixXf A = MatrixXf::Random(4,4);
-MatrixXf B = MatrixXf::Random(4,4);
+MatrixXf A = MatrixXf::Random(4, 4);
+MatrixXf B = MatrixXf::Random(4, 4);
 ges.compute(A, B);
 cout << "The (complex) numerators of the generalzied eigenvalues are: " << ges.alphas().transpose() << endl;
 cout << "The (real) denominatore of the generalzied eigenvalues are: " << ges.betas().transpose() << endl;
diff --git a/doc/snippets/HessenbergDecomposition_compute.cpp b/doc/snippets/HessenbergDecomposition_compute.cpp
index 50e3783..298b40b 100644
--- a/doc/snippets/HessenbergDecomposition_compute.cpp
+++ b/doc/snippets/HessenbergDecomposition_compute.cpp
@@ -1,6 +1,6 @@
-MatrixXcf A = MatrixXcf::Random(4,4);
+MatrixXcf A = MatrixXcf::Random(4, 4);
 HessenbergDecomposition<MatrixXcf> hd(4);
 hd.compute(A);
 cout << "The matrix H in the decomposition of A is:" << endl << hd.matrixH() << endl;
-hd.compute(2*A); // re-use hd to compute and store decomposition of 2A
+hd.compute(2 * A);  // re-use hd to compute and store decomposition of 2A
 cout << "The matrix H in the decomposition of 2A is:" << endl << hd.matrixH() << endl;
diff --git a/doc/snippets/HessenbergDecomposition_matrixH.cpp b/doc/snippets/HessenbergDecomposition_matrixH.cpp
index af01366..1386feb 100644
--- a/doc/snippets/HessenbergDecomposition_matrixH.cpp
+++ b/doc/snippets/HessenbergDecomposition_matrixH.cpp
@@ -1,4 +1,4 @@
-Matrix4f A = MatrixXf::Random(4,4);
+Matrix4f A = MatrixXf::Random(4, 4);
 cout << "Here is a random 4x4 matrix:" << endl << A << endl;
 HessenbergDecomposition<MatrixXf> hessOfA(A);
 MatrixXf H = hessOfA.matrixH();
diff --git a/doc/snippets/HessenbergDecomposition_packedMatrix.cpp b/doc/snippets/HessenbergDecomposition_packedMatrix.cpp
index 4fa5957..66c1fd0 100644
--- a/doc/snippets/HessenbergDecomposition_packedMatrix.cpp
+++ b/doc/snippets/HessenbergDecomposition_packedMatrix.cpp
@@ -1,9 +1,8 @@
-Matrix4d A = Matrix4d::Random(4,4);
+Matrix4d A = Matrix4d::Random(4, 4);
 cout << "Here is a random 4x4 matrix:" << endl << A << endl;
 HessenbergDecomposition<Matrix4d> hessOfA(A);
 Matrix4d pm = hessOfA.packedMatrix();
 cout << "The packed matrix M is:" << endl << pm << endl;
-cout << "The upper Hessenberg part corresponds to the matrix H, which is:" 
-     << endl << hessOfA.matrixH() << endl;
+cout << "The upper Hessenberg part corresponds to the matrix H, which is:" << endl << hessOfA.matrixH() << endl;
 Vector3d hc = hessOfA.householderCoefficients();
 cout << "The vector of Householder coefficients is:" << endl << hc << endl;
diff --git a/doc/snippets/HouseholderQR_householderQ.cpp b/doc/snippets/HouseholderQR_householderQ.cpp
index e859ce5..6b5cb92 100644
--- a/doc/snippets/HouseholderQR_householderQ.cpp
+++ b/doc/snippets/HouseholderQR_householderQ.cpp
@@ -1,4 +1,4 @@
-MatrixXf A(MatrixXf::Random(5,3)), thinQ(MatrixXf::Identity(5,3)), Q;
+MatrixXf A(MatrixXf::Random(5, 3)), thinQ(MatrixXf::Identity(5, 3)), Q;
 A.setRandom();
 HouseholderQR<MatrixXf> qr(A);
 Q = qr.householderQ();
diff --git a/doc/snippets/HouseholderQR_solve.cpp b/doc/snippets/HouseholderQR_solve.cpp
index 8cce6ce..35d70ba 100644
--- a/doc/snippets/HouseholderQR_solve.cpp
+++ b/doc/snippets/HouseholderQR_solve.cpp
@@ -1,9 +1,9 @@
-typedef Matrix<float,3,3> Matrix3x3;
+typedef Matrix<float, 3, 3> Matrix3x3;
 Matrix3x3 m = Matrix3x3::Random();
 Matrix3f y = Matrix3f::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is the matrix y:" << endl << y << endl;
 Matrix3f x;
 x = m.householderQr().solve(y);
-assert(y.isApprox(m*x));
+assert(y.isApprox(m* x));
 cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
diff --git a/doc/snippets/HouseholderSequence_HouseholderSequence.cpp b/doc/snippets/HouseholderSequence_HouseholderSequence.cpp
index 2632b83..ae088e6 100644
--- a/doc/snippets/HouseholderSequence_HouseholderSequence.cpp
+++ b/doc/snippets/HouseholderSequence_HouseholderSequence.cpp
@@ -2,10 +2,10 @@
 cout << "The matrix v is:" << endl;
 cout << v << endl;
 
-Vector3d v0(1, v(1,0), v(2,0));
+Vector3d v0(1, v(1, 0), v(2, 0));
 cout << "The first Householder vector is: v_0 = " << v0.transpose() << endl;
-Vector3d v1(0, 1, v(2,1));
-cout << "The second Householder vector is: v_1 = " << v1.transpose()  << endl;
+Vector3d v1(0, 1, v(2, 1));
+cout << "The second Householder vector is: v_1 = " << v1.transpose() << endl;
 Vector3d v2(0, 0, 1);
 cout << "The third Householder vector is: v_2 = " << v2.transpose() << endl;
 
diff --git a/doc/snippets/JacobiSVD_basic.cpp b/doc/snippets/JacobiSVD_basic.cpp
index 6c21baf..f451727 100644
--- a/doc/snippets/JacobiSVD_basic.cpp
+++ b/doc/snippets/JacobiSVD_basic.cpp
@@ -1,4 +1,4 @@
-MatrixXf m = MatrixXf::Random(3,2);
+MatrixXf m = MatrixXf::Random(3, 2);
 cout << "Here is the matrix m:" << endl << m << endl;
 JacobiSVD<MatrixXf, ComputeThinU | ComputeThinV> svd(m);
 cout << "Its singular values are:" << endl << svd.singularValues() << endl;
diff --git a/doc/snippets/LLT_example.cpp b/doc/snippets/LLT_example.cpp
index 46fb407..c464ac9 100644
--- a/doc/snippets/LLT_example.cpp
+++ b/doc/snippets/LLT_example.cpp
@@ -1,9 +1,9 @@
-MatrixXd A(3,3);
-A << 4,-1,2, -1,6,0, 2,0,5;
+MatrixXd A(3, 3);
+A << 4, -1, 2, -1, 6, 0, 2, 0, 5;
 cout << "The matrix A is" << endl << A << endl;
 
-LLT<MatrixXd> lltOfA(A); // compute the Cholesky decomposition of A
-MatrixXd L = lltOfA.matrixL(); // retrieve factor L  in the decomposition
+LLT<MatrixXd> lltOfA(A);        // compute the Cholesky decomposition of A
+MatrixXd L = lltOfA.matrixL();  // retrieve factor L  in the decomposition
 // The previous two lines can also be written as "L = A.llt().matrixL()"
 
 cout << "The Cholesky factor L is" << endl << L << endl;
diff --git a/doc/snippets/LLT_solve.cpp b/doc/snippets/LLT_solve.cpp
index 7095d2c..52659ab 100644
--- a/doc/snippets/LLT_solve.cpp
+++ b/doc/snippets/LLT_solve.cpp
@@ -1,8 +1,7 @@
-typedef Matrix<float,Dynamic,2> DataMatrix;
+typedef Matrix<float, Dynamic, 2> DataMatrix;
 // let's generate some samples on the 3D plane of equation z = 2x+3y (with some noise)
-DataMatrix samples = DataMatrix::Random(12,2);
-VectorXf elevations = 2*samples.col(0) + 3*samples.col(1) + VectorXf::Random(12)*0.1;
+DataMatrix samples = DataMatrix::Random(12, 2);
+VectorXf elevations = 2 * samples.col(0) + 3 * samples.col(1) + VectorXf::Random(12) * 0.1;
 // and let's solve samples * [x y]^T = elevations in least square sense:
-Matrix<float,2,1> xy
- = (samples.adjoint() * samples).llt().solve((samples.adjoint()*elevations));
+Matrix<float, 2, 1> xy = (samples.adjoint() * samples).llt().solve((samples.adjoint() * elevations));
 cout << xy << endl;
diff --git a/doc/snippets/LeastSquaresNormalEquations.cpp b/doc/snippets/LeastSquaresNormalEquations.cpp
index 997cf17..00434f7 100644
--- a/doc/snippets/LeastSquaresNormalEquations.cpp
+++ b/doc/snippets/LeastSquaresNormalEquations.cpp
@@ -1,4 +1,3 @@
 MatrixXf A = MatrixXf::Random(3, 2);
 VectorXf b = VectorXf::Random(3);
-cout << "The solution using normal equations is:\n"
-     << (A.transpose() * A).ldlt().solve(A.transpose() * b) << endl;
+cout << "The solution using normal equations is:\n" << (A.transpose() * A).ldlt().solve(A.transpose() * b) << endl;
diff --git a/doc/snippets/LeastSquaresQR.cpp b/doc/snippets/LeastSquaresQR.cpp
index 6c97045..9f8f723 100644
--- a/doc/snippets/LeastSquaresQR.cpp
+++ b/doc/snippets/LeastSquaresQR.cpp
@@ -1,4 +1,3 @@
 MatrixXf A = MatrixXf::Random(3, 2);
 VectorXf b = VectorXf::Random(3);
-cout << "The solution using the QR decomposition is:\n"
-     << A.colPivHouseholderQr().solve(b) << endl;
+cout << "The solution using the QR decomposition is:\n" << A.colPivHouseholderQr().solve(b) << endl;
diff --git a/doc/snippets/Map_general_stride.cpp b/doc/snippets/Map_general_stride.cpp
index 0657e7f..e2677ff 100644
--- a/doc/snippets/Map_general_stride.cpp
+++ b/doc/snippets/Map_general_stride.cpp
@@ -1,5 +1,3 @@
 int array[24];
-for(int i = 0; i < 24; ++i) array[i] = i;
-cout << Map<MatrixXi, 0, Stride<Dynamic,2> >
-         (array, 3, 3, Stride<Dynamic,2>(8, 2))
-     << endl;
+for (int i = 0; i < 24; ++i) array[i] = i;
+cout << Map<MatrixXi, 0, Stride<Dynamic, 2> >(array, 3, 3, Stride<Dynamic, 2>(8, 2)) << endl;
diff --git a/doc/snippets/Map_inner_stride.cpp b/doc/snippets/Map_inner_stride.cpp
index d95ae9b..f315756 100644
--- a/doc/snippets/Map_inner_stride.cpp
+++ b/doc/snippets/Map_inner_stride.cpp
@@ -1,5 +1,4 @@
 int array[12];
-for(int i = 0; i < 12; ++i) array[i] = i;
-cout << Map<VectorXi, 0, InnerStride<2> >
-         (array, 6) // the inner stride has already been passed as template parameter
+for (int i = 0; i < 12; ++i) array[i] = i;
+cout << Map<VectorXi, 0, InnerStride<2> >(array, 6)  // the inner stride has already been passed as template parameter
      << endl;
diff --git a/doc/snippets/Map_outer_stride.cpp b/doc/snippets/Map_outer_stride.cpp
index 2f6f052..75b1655 100644
--- a/doc/snippets/Map_outer_stride.cpp
+++ b/doc/snippets/Map_outer_stride.cpp
@@ -1,3 +1,3 @@
 int array[12];
-for(int i = 0; i < 12; ++i) array[i] = i;
+for (int i = 0; i < 12; ++i) array[i] = i;
 cout << Map<MatrixXi, 0, OuterStride<> >(array, 3, 3, OuterStride<>(4)) << endl;
diff --git a/doc/snippets/Map_placement_new.cpp b/doc/snippets/Map_placement_new.cpp
index 83b83a8..eb5213d 100644
--- a/doc/snippets/Map_placement_new.cpp
+++ b/doc/snippets/Map_placement_new.cpp
@@ -1,5 +1,5 @@
-int data[] = {1,2,3,4,5,6,7,8,9};
-Map<RowVectorXi> v(data,4);
+int data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
+Map<RowVectorXi> v(data, 4);
 cout << "The mapped vector v is: " << v << "\n";
-new (&v) Map<RowVectorXi>(data+4,5);
+new (&v) Map<RowVectorXi>(data + 4, 5);
 cout << "Now v is: " << v << "\n";
diff --git a/doc/snippets/Map_simple.cpp b/doc/snippets/Map_simple.cpp
index 423bb52..3e8fa81 100644
--- a/doc/snippets/Map_simple.cpp
+++ b/doc/snippets/Map_simple.cpp
@@ -1,3 +1,3 @@
 int array[9];
-for(int i = 0; i < 9; ++i) array[i] = i;
+for (int i = 0; i < 9; ++i) array[i] = i;
 cout << Map<Matrix3i>(array) << endl;
diff --git a/doc/snippets/MatrixBase_all.cpp b/doc/snippets/MatrixBase_all.cpp
index 46f26f1..f31d10c 100644
--- a/doc/snippets/MatrixBase_all.cpp
+++ b/doc/snippets/MatrixBase_all.cpp
@@ -1,7 +1,7 @@
 Vector3f boxMin(Vector3f::Zero()), boxMax(Vector3f::Ones());
 Vector3f p0 = Vector3f::Random(), p1 = Vector3f::Random().cwiseAbs();
 // let's check if p0 and p1 are inside the axis aligned box defined by the corners boxMin,boxMax:
-cout << "Is (" << p0.transpose() << ") inside the box: "
-     << ((boxMin.array()<p0.array()).all() && (boxMax.array()>p0.array()).all()) << endl;
-cout << "Is (" << p1.transpose() << ") inside the box: "
-     << ((boxMin.array()<p1.array()).all() && (boxMax.array()>p1.array()).all()) << endl;
+cout << "Is (" << p0.transpose()
+     << ") inside the box: " << ((boxMin.array() < p0.array()).all() && (boxMax.array() > p0.array()).all()) << endl;
+cout << "Is (" << p1.transpose()
+     << ") inside the box: " << ((boxMin.array() < p1.array()).all() && (boxMax.array() > p1.array()).all()) << endl;
diff --git a/doc/snippets/MatrixBase_applyOnTheLeft.cpp b/doc/snippets/MatrixBase_applyOnTheLeft.cpp
index 6398c87..00676a3 100644
--- a/doc/snippets/MatrixBase_applyOnTheLeft.cpp
+++ b/doc/snippets/MatrixBase_applyOnTheLeft.cpp
@@ -1,7 +1,5 @@
-Matrix3f A = Matrix3f::Random(3,3), B;
-B << 0,1,0,  
-     0,0,1,  
-     1,0,0;
+Matrix3f A = Matrix3f::Random(3, 3), B;
+B << 0, 1, 0, 0, 0, 1, 1, 0, 0;
 cout << "At start, A = " << endl << A << endl;
-A.applyOnTheLeft(B); 
+A.applyOnTheLeft(B);
 cout << "After applyOnTheLeft, A = " << endl << A << endl;
diff --git a/doc/snippets/MatrixBase_applyOnTheRight.cpp b/doc/snippets/MatrixBase_applyOnTheRight.cpp
index e4b71b2..a1008c6 100644
--- a/doc/snippets/MatrixBase_applyOnTheRight.cpp
+++ b/doc/snippets/MatrixBase_applyOnTheRight.cpp
@@ -1,7 +1,5 @@
-Matrix3f A = Matrix3f::Random(3,3), B;
-B << 0,1,0,  
-     0,0,1,  
-     1,0,0;
+Matrix3f A = Matrix3f::Random(3, 3), B;
+B << 0, 1, 0, 0, 0, 1, 1, 0, 0;
 cout << "At start, A = " << endl << A << endl;
 A *= B;
 cout << "After A *= B, A = " << endl << A << endl;
diff --git a/doc/snippets/MatrixBase_array.cpp b/doc/snippets/MatrixBase_array.cpp
index f215086..456d1d6 100644
--- a/doc/snippets/MatrixBase_array.cpp
+++ b/doc/snippets/MatrixBase_array.cpp
@@ -1,4 +1,4 @@
-Vector3d v(1,2,3);
+Vector3d v(1, 2, 3);
 v.array() += 3;
 v.array() -= 2;
 cout << v << endl;
diff --git a/doc/snippets/MatrixBase_array_const.cpp b/doc/snippets/MatrixBase_array_const.cpp
index cd3b26a..e662f6c 100644
--- a/doc/snippets/MatrixBase_array_const.cpp
+++ b/doc/snippets/MatrixBase_array_const.cpp
@@ -1,4 +1,4 @@
-Vector3d v(-1,2,-3);
+Vector3d v(-1, 2, -3);
 cout << "the absolute values:" << endl << v.array().abs() << endl;
-cout << "the absolute values plus one:" << endl << v.array().abs()+1 << endl;
+cout << "the absolute values plus one:" << endl << v.array().abs() + 1 << endl;
 cout << "sum of the squares: " << v.array().square().sum() << endl;
diff --git a/doc/snippets/MatrixBase_asDiagonal.cpp b/doc/snippets/MatrixBase_asDiagonal.cpp
index b01082d..637e95b 100644
--- a/doc/snippets/MatrixBase_asDiagonal.cpp
+++ b/doc/snippets/MatrixBase_asDiagonal.cpp
@@ -1 +1 @@
-cout << Matrix3i(Vector3i(2,5,6).asDiagonal()) << endl;
+cout << Matrix3i(Vector3i(2, 5, 6).asDiagonal()) << endl;
diff --git a/doc/snippets/MatrixBase_block_int_int.cpp b/doc/snippets/MatrixBase_block_int_int.cpp
index f99b6d4..ade73ee 100644
--- a/doc/snippets/MatrixBase_block_int_int.cpp
+++ b/doc/snippets/MatrixBase_block_int_int.cpp
@@ -1,5 +1,5 @@
 Matrix4i m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
-cout << "Here is m.block<2,2>(1,1):" << endl << m.block<2,2>(1,1) << endl;
-m.block<2,2>(1,1).setZero();
+cout << "Here is m.block<2,2>(1,1):" << endl << m.block<2, 2>(1, 1) << endl;
+m.block<2, 2>(1, 1).setZero();
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_col.cpp b/doc/snippets/MatrixBase_col.cpp
index 87c91b1..cf0241e 100644
--- a/doc/snippets/MatrixBase_col.cpp
+++ b/doc/snippets/MatrixBase_col.cpp
@@ -1,3 +1,3 @@
 Matrix3d m = Matrix3d::Identity();
-m.col(1) = Vector3d(4,5,6);
+m.col(1) = Vector3d(4, 5, 6);
 cout << m << endl;
diff --git a/doc/snippets/MatrixBase_colwise.cpp b/doc/snippets/MatrixBase_colwise.cpp
index a048bef..a31033d 100644
--- a/doc/snippets/MatrixBase_colwise.cpp
+++ b/doc/snippets/MatrixBase_colwise.cpp
@@ -1,5 +1,4 @@
 Matrix3d m = Matrix3d::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is the sum of each column:" << endl << m.colwise().sum() << endl;
-cout << "Here is the maximum absolute value of each column:"
-     << endl << m.cwiseAbs().colwise().maxCoeff() << endl;
+cout << "Here is the maximum absolute value of each column:" << endl << m.cwiseAbs().colwise().maxCoeff() << endl;
diff --git a/doc/snippets/MatrixBase_colwise_iterator_cxx11.cpp b/doc/snippets/MatrixBase_colwise_iterator_cxx11.cpp
index 116063f..c033043 100644
--- a/doc/snippets/MatrixBase_colwise_iterator_cxx11.cpp
+++ b/doc/snippets/MatrixBase_colwise_iterator_cxx11.cpp
@@ -1,12 +1,11 @@
 Matrix3i m = Matrix3i::Random();
 cout << "Here is the initial matrix m:" << endl << m << endl;
 int i = -1;
-for(auto c: m.colwise()) {
+for (auto c : m.colwise()) {
   c *= i;
   ++i;
 }
 cout << "Here is the matrix m after the for-range-loop:" << endl << m << endl;
 auto cols = m.colwise();
-auto it = std::find_if(cols.cbegin(), cols.cend(),
-                       [](Matrix3i::ConstColXpr x) { return x.squaredNorm() == 0; });
-cout << "The first empty column is: " << distance(cols.cbegin(),it) << endl;
+auto it = std::find_if(cols.cbegin(), cols.cend(), [](Matrix3i::ConstColXpr x) { return x.squaredNorm() == 0; });
+cout << "The first empty column is: " << distance(cols.cbegin(), it) << endl;
diff --git a/doc/snippets/MatrixBase_computeInverseAndDetWithCheck.cpp b/doc/snippets/MatrixBase_computeInverseAndDetWithCheck.cpp
index a7b084f..774d4d4 100644
--- a/doc/snippets/MatrixBase_computeInverseAndDetWithCheck.cpp
+++ b/doc/snippets/MatrixBase_computeInverseAndDetWithCheck.cpp
@@ -3,11 +3,10 @@
 Matrix3d inverse;
 bool invertible;
 double determinant;
-m.computeInverseAndDetWithCheck(inverse,determinant,invertible);
+m.computeInverseAndDetWithCheck(inverse, determinant, invertible);
 cout << "Its determinant is " << determinant << endl;
-if(invertible) {
+if (invertible) {
   cout << "It is invertible, and its inverse is:" << endl << inverse << endl;
-}
-else {
+} else {
   cout << "It is not invertible." << endl;
 }
diff --git a/doc/snippets/MatrixBase_computeInverseWithCheck.cpp b/doc/snippets/MatrixBase_computeInverseWithCheck.cpp
index 873a9f8..7c95100 100644
--- a/doc/snippets/MatrixBase_computeInverseWithCheck.cpp
+++ b/doc/snippets/MatrixBase_computeInverseWithCheck.cpp
@@ -2,10 +2,9 @@
 cout << "Here is the matrix m:" << endl << m << endl;
 Matrix3d inverse;
 bool invertible;
-m.computeInverseWithCheck(inverse,invertible);
-if(invertible) {
+m.computeInverseWithCheck(inverse, invertible);
+if (invertible) {
   cout << "It is invertible, and its inverse is:" << endl << inverse << endl;
-}
-else {
+} else {
   cout << "It is not invertible." << endl;
 }
diff --git a/doc/snippets/MatrixBase_cwiseAbs.cpp b/doc/snippets/MatrixBase_cwiseAbs.cpp
index 28a3160..e424190 100644
--- a/doc/snippets/MatrixBase_cwiseAbs.cpp
+++ b/doc/snippets/MatrixBase_cwiseAbs.cpp
@@ -1,4 +1,3 @@
-MatrixXd m(2,3);
-m << 2, -4, 6,   
-     -5, 1, 0;
+MatrixXd m(2, 3);
+m << 2, -4, 6, -5, 1, 0;
 cout << m.cwiseAbs() << endl;
diff --git a/doc/snippets/MatrixBase_cwiseAbs2.cpp b/doc/snippets/MatrixBase_cwiseAbs2.cpp
index 889a2e2..952ba9d 100644
--- a/doc/snippets/MatrixBase_cwiseAbs2.cpp
+++ b/doc/snippets/MatrixBase_cwiseAbs2.cpp
@@ -1,4 +1,3 @@
-MatrixXd m(2,3);
-m << 2, -4, 6,   
-     -5, 1, 0;
+MatrixXd m(2, 3);
+m << 2, -4, 6, -5, 1, 0;
 cout << m.cwiseAbs2() << endl;
diff --git a/doc/snippets/MatrixBase_cwiseEqual.cpp b/doc/snippets/MatrixBase_cwiseEqual.cpp
index 469af64..dae553c 100644
--- a/doc/snippets/MatrixBase_cwiseEqual.cpp
+++ b/doc/snippets/MatrixBase_cwiseEqual.cpp
@@ -1,7 +1,6 @@
-MatrixXi m(2,2);
-m << 1, 0,
-     1, 1;
+MatrixXi m(2, 2);
+m << 1, 0, 1, 1;
 cout << "Comparing m with identity matrix:" << endl;
-cout << m.cwiseEqual(MatrixXi::Identity(2,2)) << endl;
-Index count = m.cwiseEqual(MatrixXi::Identity(2,2)).count();
+cout << m.cwiseEqual(MatrixXi::Identity(2, 2)) << endl;
+Index count = m.cwiseEqual(MatrixXi::Identity(2, 2)).count();
 cout << "Number of coefficients that are equal: " << count << endl;
diff --git a/doc/snippets/MatrixBase_cwiseInverse.cpp b/doc/snippets/MatrixBase_cwiseInverse.cpp
index 23e08f7..74551cb 100644
--- a/doc/snippets/MatrixBase_cwiseInverse.cpp
+++ b/doc/snippets/MatrixBase_cwiseInverse.cpp
@@ -1,4 +1,3 @@
-MatrixXd m(2,3);
-m << 2, 0.5, 1,   
-     3, 0.25, 1;
+MatrixXd m(2, 3);
+m << 2, 0.5, 1, 3, 0.25, 1;
 cout << m.cwiseInverse() << endl;
diff --git a/doc/snippets/MatrixBase_cwiseMax.cpp b/doc/snippets/MatrixBase_cwiseMax.cpp
index 3c95681..cd613b5 100644
--- a/doc/snippets/MatrixBase_cwiseMax.cpp
+++ b/doc/snippets/MatrixBase_cwiseMax.cpp
@@ -1,2 +1,2 @@
-Vector3d v(2,3,4), w(4,2,3);
+Vector3d v(2, 3, 4), w(4, 2, 3);
 cout << v.cwiseMax(w) << endl;
diff --git a/doc/snippets/MatrixBase_cwiseMin.cpp b/doc/snippets/MatrixBase_cwiseMin.cpp
index 82fc761..6fa93f3 100644
--- a/doc/snippets/MatrixBase_cwiseMin.cpp
+++ b/doc/snippets/MatrixBase_cwiseMin.cpp
@@ -1,2 +1,2 @@
-Vector3d v(2,3,4), w(4,2,3);
+Vector3d v(2, 3, 4), w(4, 2, 3);
 cout << v.cwiseMin(w) << endl;
diff --git a/doc/snippets/MatrixBase_cwiseNotEqual.cpp b/doc/snippets/MatrixBase_cwiseNotEqual.cpp
index 7f0a105..1a3ec73 100644
--- a/doc/snippets/MatrixBase_cwiseNotEqual.cpp
+++ b/doc/snippets/MatrixBase_cwiseNotEqual.cpp
@@ -1,7 +1,6 @@
-MatrixXi m(2,2);
-m << 1, 0,
-     1, 1;
+MatrixXi m(2, 2);
+m << 1, 0, 1, 1;
 cout << "Comparing m with identity matrix:" << endl;
-cout << m.cwiseNotEqual(MatrixXi::Identity(2,2)) << endl;
-Index count = m.cwiseNotEqual(MatrixXi::Identity(2,2)).count();
+cout << m.cwiseNotEqual(MatrixXi::Identity(2, 2)) << endl;
+Index count = m.cwiseNotEqual(MatrixXi::Identity(2, 2)).count();
 cout << "Number of coefficients that are not equal: " << count << endl;
diff --git a/doc/snippets/MatrixBase_cwiseProduct.cpp b/doc/snippets/MatrixBase_cwiseProduct.cpp
index 1db3a11..79540a9 100644
--- a/doc/snippets/MatrixBase_cwiseProduct.cpp
+++ b/doc/snippets/MatrixBase_cwiseProduct.cpp
@@ -1,4 +1,3 @@
 Matrix3i a = Matrix3i::Random(), b = Matrix3i::Random();
 Matrix3i c = a.cwiseProduct(b);
 cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl;
-
diff --git a/doc/snippets/MatrixBase_cwiseQuotient.cpp b/doc/snippets/MatrixBase_cwiseQuotient.cpp
index 9691212..c78110f 100644
--- a/doc/snippets/MatrixBase_cwiseQuotient.cpp
+++ b/doc/snippets/MatrixBase_cwiseQuotient.cpp
@@ -1,2 +1,2 @@
-Vector3d v(2,3,4), w(4,2,3);
+Vector3d v(2, 3, 4), w(4, 2, 3);
 cout << v.cwiseQuotient(w) << endl;
diff --git a/doc/snippets/MatrixBase_cwiseSign.cpp b/doc/snippets/MatrixBase_cwiseSign.cpp
index efd7179..c2ee94d 100644
--- a/doc/snippets/MatrixBase_cwiseSign.cpp
+++ b/doc/snippets/MatrixBase_cwiseSign.cpp
@@ -1,4 +1,3 @@
-MatrixXd m(2,3);
-m <<  2, -4, 6,
-     -5,  1, 0;
+MatrixXd m(2, 3);
+m << 2, -4, 6, -5, 1, 0;
 cout << m.cwiseSign() << endl;
diff --git a/doc/snippets/MatrixBase_cwiseSqrt.cpp b/doc/snippets/MatrixBase_cwiseSqrt.cpp
index 4bfd75d..5bfb5f3 100644
--- a/doc/snippets/MatrixBase_cwiseSqrt.cpp
+++ b/doc/snippets/MatrixBase_cwiseSqrt.cpp
@@ -1,2 +1,2 @@
-Vector3d v(1,2,4);
+Vector3d v(1, 2, 4);
 cout << v.cwiseSqrt() << endl;
diff --git a/doc/snippets/MatrixBase_diagonal.cpp b/doc/snippets/MatrixBase_diagonal.cpp
index cd63413..c15dcf1 100644
--- a/doc/snippets/MatrixBase_diagonal.cpp
+++ b/doc/snippets/MatrixBase_diagonal.cpp
@@ -1,4 +1,3 @@
 Matrix3i m = Matrix3i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
-cout << "Here are the coefficients on the main diagonal of m:" << endl
-     << m.diagonal() << endl;
+cout << "Here are the coefficients on the main diagonal of m:" << endl << m.diagonal() << endl;
diff --git a/doc/snippets/MatrixBase_eigenvalues.cpp b/doc/snippets/MatrixBase_eigenvalues.cpp
index 039f887..010f45d 100644
--- a/doc/snippets/MatrixBase_eigenvalues.cpp
+++ b/doc/snippets/MatrixBase_eigenvalues.cpp
@@ -1,3 +1,3 @@
-MatrixXd ones = MatrixXd::Ones(3,3);
+MatrixXd ones = MatrixXd::Ones(3, 3);
 VectorXcd eivals = ones.eigenvalues();
 cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl;
diff --git a/doc/snippets/MatrixBase_fixedBlock_int_int.cpp b/doc/snippets/MatrixBase_fixedBlock_int_int.cpp
index 3201127..6a3a8cb 100644
--- a/doc/snippets/MatrixBase_fixedBlock_int_int.cpp
+++ b/doc/snippets/MatrixBase_fixedBlock_int_int.cpp
@@ -1,4 +1,4 @@
-Matrix4d m = Vector4d(1,2,3,4).asDiagonal();
+Matrix4d m = Vector4d(1, 2, 3, 4).asDiagonal();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.fixed<2, 2>(2, 2):" << endl << m.block<2, 2>(2, 2) << endl;
 m.block<2, 2>(2, 0) = m.block<2, 2>(2, 2);
diff --git a/doc/snippets/MatrixBase_hnormalized.cpp b/doc/snippets/MatrixBase_hnormalized.cpp
index b714adc..23334ac 100644
--- a/doc/snippets/MatrixBase_hnormalized.cpp
+++ b/doc/snippets/MatrixBase_hnormalized.cpp
@@ -2,5 +2,5 @@
 Projective3d P(Matrix4d::Random());
 cout << "v                   = " << v.transpose() << "]^T" << endl;
 cout << "v.hnormalized()     = " << v.hnormalized().transpose() << "]^T" << endl;
-cout << "P*v                 = " << (P*v).transpose() << "]^T" << endl;
-cout << "(P*v).hnormalized() = " << (P*v).hnormalized().transpose() << "]^T" << endl;
+cout << "P*v                 = " << (P * v).transpose() << "]^T" << endl;
+cout << "(P*v).hnormalized() = " << (P * v).hnormalized().transpose() << "]^T" << endl;
diff --git a/doc/snippets/MatrixBase_homogeneous.cpp b/doc/snippets/MatrixBase_homogeneous.cpp
index 2631960..6818f9b 100644
--- a/doc/snippets/MatrixBase_homogeneous.cpp
+++ b/doc/snippets/MatrixBase_homogeneous.cpp
@@ -3,4 +3,5 @@
 cout << "v                                   = [" << v.transpose() << "]^T" << endl;
 cout << "h.homogeneous()                     = [" << v.homogeneous().transpose() << "]^T" << endl;
 cout << "(P * v.homogeneous())               = [" << (P * v.homogeneous()).transpose() << "]^T" << endl;
-cout << "(P * v.homogeneous()).hnormalized() = [" << (P * v.homogeneous()).eval().hnormalized().transpose() << "]^T" << endl;
+cout << "(P * v.homogeneous()).hnormalized() = [" << (P * v.homogeneous()).eval().hnormalized().transpose() << "]^T"
+     << endl;
diff --git a/doc/snippets/MatrixBase_isDiagonal.cpp b/doc/snippets/MatrixBase_isDiagonal.cpp
index 5b1d599..290654f 100644
--- a/doc/snippets/MatrixBase_isDiagonal.cpp
+++ b/doc/snippets/MatrixBase_isDiagonal.cpp
@@ -1,6 +1,5 @@
 Matrix3d m = 10000 * Matrix3d::Identity();
-m(0,2) = 1;
+m(0, 2) = 1;
 cout << "Here's the matrix m:" << endl << m << endl;
 cout << "m.isDiagonal() returns: " << m.isDiagonal() << endl;
 cout << "m.isDiagonal(1e-3) returns: " << m.isDiagonal(1e-3) << endl;
-
diff --git a/doc/snippets/MatrixBase_isIdentity.cpp b/doc/snippets/MatrixBase_isIdentity.cpp
index 17b756c..ea535c7 100644
--- a/doc/snippets/MatrixBase_isIdentity.cpp
+++ b/doc/snippets/MatrixBase_isIdentity.cpp
@@ -1,5 +1,5 @@
 Matrix3d m = Matrix3d::Identity();
-m(0,2) = 1e-4;
+m(0, 2) = 1e-4;
 cout << "Here's the matrix m:" << endl << m << endl;
 cout << "m.isIdentity() returns: " << m.isIdentity() << endl;
 cout << "m.isIdentity(1e-3) returns: " << m.isIdentity(1e-3) << endl;
diff --git a/doc/snippets/MatrixBase_isOnes.cpp b/doc/snippets/MatrixBase_isOnes.cpp
index f82f628..899230a 100644
--- a/doc/snippets/MatrixBase_isOnes.cpp
+++ b/doc/snippets/MatrixBase_isOnes.cpp
@@ -1,5 +1,5 @@
 Matrix3d m = Matrix3d::Ones();
-m(0,2) += 1e-4;
+m(0, 2) += 1e-4;
 cout << "Here's the matrix m:" << endl << m << endl;
 cout << "m.isOnes() returns: " << m.isOnes() << endl;
 cout << "m.isOnes(1e-3) returns: " << m.isOnes(1e-3) << endl;
diff --git a/doc/snippets/MatrixBase_isOrthogonal.cpp b/doc/snippets/MatrixBase_isOrthogonal.cpp
index b22af06..3e079b4 100644
--- a/doc/snippets/MatrixBase_isOrthogonal.cpp
+++ b/doc/snippets/MatrixBase_isOrthogonal.cpp
@@ -1,6 +1,6 @@
-Vector3d v(1,0,0);
-Vector3d w(1e-4,0,1);
+Vector3d v(1, 0, 0);
+Vector3d w(1e-4, 0, 1);
 cout << "Here's the vector v:" << endl << v << endl;
 cout << "Here's the vector w:" << endl << w << endl;
 cout << "v.isOrthogonal(w) returns: " << v.isOrthogonal(w) << endl;
-cout << "v.isOrthogonal(w,1e-3) returns: " << v.isOrthogonal(w,1e-3) << endl;
+cout << "v.isOrthogonal(w,1e-3) returns: " << v.isOrthogonal(w, 1e-3) << endl;
diff --git a/doc/snippets/MatrixBase_isUnitary.cpp b/doc/snippets/MatrixBase_isUnitary.cpp
index 3877da3..56f1b96 100644
--- a/doc/snippets/MatrixBase_isUnitary.cpp
+++ b/doc/snippets/MatrixBase_isUnitary.cpp
@@ -1,5 +1,5 @@
 Matrix3d m = Matrix3d::Identity();
-m(0,2) = 1e-4;
+m(0, 2) = 1e-4;
 cout << "Here's the matrix m:" << endl << m << endl;
 cout << "m.isUnitary() returns: " << m.isUnitary() << endl;
 cout << "m.isUnitary(1e-3) returns: " << m.isUnitary(1e-3) << endl;
diff --git a/doc/snippets/MatrixBase_isZero.cpp b/doc/snippets/MatrixBase_isZero.cpp
index c2cfe22..c878f1c 100644
--- a/doc/snippets/MatrixBase_isZero.cpp
+++ b/doc/snippets/MatrixBase_isZero.cpp
@@ -1,5 +1,5 @@
 Matrix3d m = Matrix3d::Zero();
-m(0,2) = 1e-4;
+m(0, 2) = 1e-4;
 cout << "Here's the matrix m:" << endl << m << endl;
 cout << "m.isZero() returns: " << m.isZero() << endl;
 cout << "m.isZero(1e-3) returns: " << m.isZero(1e-3) << endl;
diff --git a/doc/snippets/MatrixBase_noalias.cpp b/doc/snippets/MatrixBase_noalias.cpp
index 3b54a79..607d3d5 100644
--- a/doc/snippets/MatrixBase_noalias.cpp
+++ b/doc/snippets/MatrixBase_noalias.cpp
@@ -1,3 +1,5 @@
-Matrix2d a, b, c; a << 1,2,3,4; b << 5,6,7,8;
-c.noalias() = a * b; // this computes the product directly to c
+Matrix2d a, b, c;
+a << 1, 2, 3, 4;
+b << 5, 6, 7, 8;
+c.noalias() = a * b;  // this computes the product directly to c
 cout << c << endl;
diff --git a/doc/snippets/MatrixBase_ones_int_int.cpp b/doc/snippets/MatrixBase_ones_int_int.cpp
index 60f5a31..38bd8cf 100644
--- a/doc/snippets/MatrixBase_ones_int_int.cpp
+++ b/doc/snippets/MatrixBase_ones_int_int.cpp
@@ -1 +1 @@
-cout << MatrixXi::Ones(2,3) << endl;
+cout << MatrixXi::Ones(2, 3) << endl;
diff --git a/doc/snippets/MatrixBase_operatorNorm.cpp b/doc/snippets/MatrixBase_operatorNorm.cpp
index 355246f..99ca14d 100644
--- a/doc/snippets/MatrixBase_operatorNorm.cpp
+++ b/doc/snippets/MatrixBase_operatorNorm.cpp
@@ -1,3 +1,2 @@
-MatrixXd ones = MatrixXd::Ones(3,3);
-cout << "The operator norm of the 3x3 matrix of ones is "
-     << ones.operatorNorm() << endl;
+MatrixXd ones = MatrixXd::Ones(3, 3);
+cout << "The operator norm of the 3x3 matrix of ones is " << ones.operatorNorm() << endl;
diff --git a/doc/snippets/MatrixBase_random_int_int.cpp b/doc/snippets/MatrixBase_random_int_int.cpp
index 3f0f7dd..92f87c8 100644
--- a/doc/snippets/MatrixBase_random_int_int.cpp
+++ b/doc/snippets/MatrixBase_random_int_int.cpp
@@ -1 +1 @@
-cout << MatrixXi::Random(2,3) << endl;
+cout << MatrixXi::Random(2, 3) << endl;
diff --git a/doc/snippets/MatrixBase_replicate.cpp b/doc/snippets/MatrixBase_replicate.cpp
index 3ce52bc..bffd102 100644
--- a/doc/snippets/MatrixBase_replicate.cpp
+++ b/doc/snippets/MatrixBase_replicate.cpp
@@ -1,4 +1,4 @@
-MatrixXi m = MatrixXi::Random(2,3);
+MatrixXi m = MatrixXi::Random(2, 3);
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "m.replicate<3,2>() = ..." << endl;
-cout << m.replicate<3,2>() << endl;
+cout << m.replicate<3, 2>() << endl;
diff --git a/doc/snippets/MatrixBase_replicate_int_int.cpp b/doc/snippets/MatrixBase_replicate_int_int.cpp
index b1dbc70..1aee265 100644
--- a/doc/snippets/MatrixBase_replicate_int_int.cpp
+++ b/doc/snippets/MatrixBase_replicate_int_int.cpp
@@ -1,4 +1,4 @@
 Vector3i v = Vector3i::Random();
 cout << "Here is the vector v:" << endl << v << endl;
 cout << "v.replicate(2,5) = ..." << endl;
-cout << v.replicate(2,5) << endl;
+cout << v.replicate(2, 5) << endl;
diff --git a/doc/snippets/MatrixBase_reshaped_fixed.cpp b/doc/snippets/MatrixBase_reshaped_fixed.cpp
index 3e9e2cf..c1ae2c0 100644
--- a/doc/snippets/MatrixBase_reshaped_fixed.cpp
+++ b/doc/snippets/MatrixBase_reshaped_fixed.cpp
@@ -1,3 +1,3 @@
 Matrix4i m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
-cout << "Here is m.reshaped(fix<2>,fix<8>):" << endl << m.reshaped(fix<2>,fix<8>) << endl;
+cout << "Here is m.reshaped(fix<2>,fix<8>):" << endl << m.reshaped(fix<2>, fix<8>) << endl;
diff --git a/doc/snippets/MatrixBase_reverse.cpp b/doc/snippets/MatrixBase_reverse.cpp
index f545a28..ca12558 100644
--- a/doc/snippets/MatrixBase_reverse.cpp
+++ b/doc/snippets/MatrixBase_reverse.cpp
@@ -1,8 +1,7 @@
-MatrixXi m = MatrixXi::Random(3,4);
+MatrixXi m = MatrixXi::Random(3, 4);
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is the reverse of m:" << endl << m.reverse() << endl;
-cout << "Here is the coefficient (1,0) in the reverse of m:" << endl
-     << m.reverse()(1,0) << endl;
+cout << "Here is the coefficient (1,0) in the reverse of m:" << endl << m.reverse()(1, 0) << endl;
 cout << "Let us overwrite this coefficient with the value 4." << endl;
-m.reverse()(1,0) = 4;
+m.reverse()(1, 0) = 4;
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_row.cpp b/doc/snippets/MatrixBase_row.cpp
index b15e626..481bff8 100644
--- a/doc/snippets/MatrixBase_row.cpp
+++ b/doc/snippets/MatrixBase_row.cpp
@@ -1,3 +1,3 @@
 Matrix3d m = Matrix3d::Identity();
-m.row(1) = Vector3d(4,5,6);
+m.row(1) = Vector3d(4, 5, 6);
 cout << m << endl;
diff --git a/doc/snippets/MatrixBase_rowwise.cpp b/doc/snippets/MatrixBase_rowwise.cpp
index ae93964..b869224 100644
--- a/doc/snippets/MatrixBase_rowwise.cpp
+++ b/doc/snippets/MatrixBase_rowwise.cpp
@@ -1,5 +1,4 @@
 Matrix3d m = Matrix3d::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl;
-cout << "Here is the maximum absolute value of each row:"
-     << endl << m.cwiseAbs().rowwise().maxCoeff() << endl;
+cout << "Here is the maximum absolute value of each row:" << endl << m.cwiseAbs().rowwise().maxCoeff() << endl;
diff --git a/doc/snippets/MatrixBase_select.cpp b/doc/snippets/MatrixBase_select.cpp
index ae5477f..d14941b 100644
--- a/doc/snippets/MatrixBase_select.cpp
+++ b/doc/snippets/MatrixBase_select.cpp
@@ -1,6 +1,4 @@
 MatrixXi m(3, 3);
-m << 1, 2, 3,
-     4, 5, 6,
-     7, 8, 9;
+m << 1, 2, 3, 4, 5, 6, 7, 8, 9;
 m = (m.array() >= 5).select(-m, m);
 cout << m << endl;
diff --git a/doc/snippets/MatrixBase_set.cpp b/doc/snippets/MatrixBase_set.cpp
index 50ecf5f..d392b68 100644
--- a/doc/snippets/MatrixBase_set.cpp
+++ b/doc/snippets/MatrixBase_set.cpp
@@ -1,13 +1,10 @@
 Matrix3i m1;
-m1 << 1, 2, 3,
-      4, 5, 6,
-      7, 8, 9;
+m1 << 1, 2, 3, 4, 5, 6, 7, 8, 9;
 cout << m1 << endl << endl;
 Matrix3i m2 = Matrix3i::Identity();
-m2.block(0,0, 2,2) << 10, 11, 12, 13;
+m2.block(0, 0, 2, 2) << 10, 11, 12, 13;
 cout << m2 << endl << endl;
 Vector2i v1;
 v1 << 14, 15;
-m2 << v1.transpose(), 16,
-      v1, m1.block(1,1,2,2);
+m2 << v1.transpose(), 16, v1, m1.block(1, 1, 2, 2);
 cout << m2 << endl;
diff --git a/doc/snippets/MatrixBase_setIdentity.cpp b/doc/snippets/MatrixBase_setIdentity.cpp
index 4fd0aa2..916b477 100644
--- a/doc/snippets/MatrixBase_setIdentity.cpp
+++ b/doc/snippets/MatrixBase_setIdentity.cpp
@@ -1,3 +1,3 @@
 Matrix4i m = Matrix4i::Zero();
-m.block<3,3>(1,0).setIdentity();
+m.block<3, 3>(1, 0).setIdentity();
 cout << m << endl;
diff --git a/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp b/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp
index 847892a..bf9f0ab 100644
--- a/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp
+++ b/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp
@@ -1,6 +1,6 @@
 Matrix4i m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.bottomLeftCorner<2,2>():" << endl;
-cout << m.bottomLeftCorner<2,2>() << endl;
-m.bottomLeftCorner<2,2>().setZero();
+cout << m.bottomLeftCorner<2, 2>() << endl;
+m.bottomLeftCorner<2, 2>().setZero();
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp b/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp
index a1edcc8..3d22fc2 100644
--- a/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp
+++ b/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp
@@ -1,6 +1,6 @@
 Matrix4i m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.bottomLeftCorner<2,Dynamic>(2,2):" << endl;
-cout << m.bottomLeftCorner<2,Dynamic>(2,2) << endl;
-m.bottomLeftCorner<2,Dynamic>(2,2).setZero();
+cout << m.bottomLeftCorner<2, Dynamic>(2, 2) << endl;
+m.bottomLeftCorner<2, Dynamic>(2, 2).setZero();
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp b/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp
index abacb01..4a78bed5 100644
--- a/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp
+++ b/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp
@@ -1,6 +1,6 @@
 Matrix4i m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.bottomRightCorner<2,2>():" << endl;
-cout << m.bottomRightCorner<2,2>() << endl;
-m.bottomRightCorner<2,2>().setZero();
+cout << m.bottomRightCorner<2, 2>() << endl;
+m.bottomRightCorner<2, 2>().setZero();
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp b/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp
index a65508f..75a3e93 100644
--- a/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp
+++ b/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp
@@ -1,6 +1,6 @@
 Matrix4i m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.bottomRightCorner<2,Dynamic>(2,2):" << endl;
-cout << m.bottomRightCorner<2,Dynamic>(2,2) << endl;
-m.bottomRightCorner<2,Dynamic>(2,2).setZero();
+cout << m.bottomRightCorner<2, Dynamic>(2, 2) << endl;
+m.bottomRightCorner<2, Dynamic>(2, 2).setZero();
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp b/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp
index 1899d90..7c765d4 100644
--- a/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp
+++ b/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp
@@ -1,6 +1,6 @@
 Matrix4i m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.topLeftCorner<2,2>():" << endl;
-cout << m.topLeftCorner<2,2>() << endl;
-m.topLeftCorner<2,2>().setZero();
+cout << m.topLeftCorner<2, 2>() << endl;
+m.topLeftCorner<2, 2>().setZero();
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp b/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp
index fac761f..ae72684 100644
--- a/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp
+++ b/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp
@@ -1,6 +1,6 @@
 Matrix4i m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.topLeftCorner<2,Dynamic>(2,2):" << endl;
-cout << m.topLeftCorner<2,Dynamic>(2,2) << endl;
-m.topLeftCorner<2,Dynamic>(2,2).setZero();
+cout << m.topLeftCorner<2, Dynamic>(2, 2) << endl;
+m.topLeftCorner<2, Dynamic>(2, 2).setZero();
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp b/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp
index c3a1771..9698521 100644
--- a/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp
+++ b/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp
@@ -1,6 +1,6 @@
 Matrix4i m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.topRightCorner<2,2>():" << endl;
-cout << m.topRightCorner<2,2>() << endl;
-m.topRightCorner<2,2>().setZero();
+cout << m.topRightCorner<2, 2>() << endl;
+m.topRightCorner<2, 2>().setZero();
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp b/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp
index a17acc0..4144242 100644
--- a/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp
+++ b/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp
@@ -1,6 +1,6 @@
 Matrix4i m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.topRightCorner<2,Dynamic>(2,2):" << endl;
-cout << m.topRightCorner<2,Dynamic>(2,2) << endl;
-m.topRightCorner<2,Dynamic>(2,2).setZero();
+cout << m.topRightCorner<2, Dynamic>(2, 2) << endl;
+m.topRightCorner<2, Dynamic>(2, 2).setZero();
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_transpose.cpp b/doc/snippets/MatrixBase_transpose.cpp
index 88eea83..8bf2716 100644
--- a/doc/snippets/MatrixBase_transpose.cpp
+++ b/doc/snippets/MatrixBase_transpose.cpp
@@ -1,8 +1,7 @@
 Matrix2i m = Matrix2i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is the transpose of m:" << endl << m.transpose() << endl;
-cout << "Here is the coefficient (1,0) in the transpose of m:" << endl
-     << m.transpose()(1,0) << endl;
+cout << "Here is the coefficient (1,0) in the transpose of m:" << endl << m.transpose()(1, 0) << endl;
 cout << "Let us overwrite this coefficient with the value 0." << endl;
-m.transpose()(1,0) = 0;
+m.transpose()(1, 0) = 0;
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/MatrixBase_zero_int_int.cpp b/doc/snippets/MatrixBase_zero_int_int.cpp
index 4099c5d..a500724 100644
--- a/doc/snippets/MatrixBase_zero_int_int.cpp
+++ b/doc/snippets/MatrixBase_zero_int_int.cpp
@@ -1 +1 @@
-cout << MatrixXi::Zero(2,3) << endl;
+cout << MatrixXi::Zero(2, 3) << endl;
diff --git a/doc/snippets/Matrix_Map_stride.cpp b/doc/snippets/Matrix_Map_stride.cpp
index ae42a12..5125b54 100644
--- a/doc/snippets/Matrix_Map_stride.cpp
+++ b/doc/snippets/Matrix_Map_stride.cpp
@@ -1,7 +1,4 @@
 Matrix4i A;
-A << 1,  2,  3,  4,
-     5,  6,  7,  8,
-     9, 10, 11, 12,
-    13, 14, 15, 16;
+A << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16;
 
-std::cout << Matrix2i::Map(&A(1,1),Stride<8,2>()) << std::endl;
+std::cout << Matrix2i::Map(&A(1, 1), Stride<8, 2>()) << std::endl;
diff --git a/doc/snippets/Matrix_initializer_list_23_cxx11.cpp b/doc/snippets/Matrix_initializer_list_23_cxx11.cpp
index 60280ab..8cde1cb 100644
--- a/doc/snippets/Matrix_initializer_list_23_cxx11.cpp
+++ b/doc/snippets/Matrix_initializer_list_23_cxx11.cpp
@@ -1,5 +1,2 @@
-MatrixXd m {
-  {1, 2, 3},
-  {4, 5, 6}
-};
+MatrixXd m{{1, 2, 3}, {4, 5, 6}};
 cout << m << endl;
diff --git a/doc/snippets/Matrix_initializer_list_vector_cxx11.cpp b/doc/snippets/Matrix_initializer_list_vector_cxx11.cpp
index 325257c..7096deb 100644
--- a/doc/snippets/Matrix_initializer_list_vector_cxx11.cpp
+++ b/doc/snippets/Matrix_initializer_list_vector_cxx11.cpp
@@ -1,2 +1,2 @@
-VectorXi v {{1, 2}};
+VectorXi v{{1, 2}};
 cout << v << endl;
diff --git a/doc/snippets/Matrix_resize_NoChange_int.cpp b/doc/snippets/Matrix_resize_NoChange_int.cpp
index acdf18c..c86ee30 100644
--- a/doc/snippets/Matrix_resize_NoChange_int.cpp
+++ b/doc/snippets/Matrix_resize_NoChange_int.cpp
@@ -1,3 +1,3 @@
-MatrixXd m(3,4);
+MatrixXd m(3, 4);
 m.resize(NoChange, 5);
 cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl;
diff --git a/doc/snippets/Matrix_resize_int.cpp b/doc/snippets/Matrix_resize_int.cpp
index 044c789..7f34df7 100644
--- a/doc/snippets/Matrix_resize_int.cpp
+++ b/doc/snippets/Matrix_resize_int.cpp
@@ -1,6 +1,6 @@
 VectorXd v(10);
 v.resize(3);
 RowVector3d w;
-w.resize(3); // this is legal, but has no effect
+w.resize(3);  // this is legal, but has no effect
 cout << "v: " << v.rows() << " rows, " << v.cols() << " cols" << endl;
 cout << "w: " << w.rows() << " rows, " << w.cols() << " cols" << endl;
diff --git a/doc/snippets/Matrix_resize_int_NoChange.cpp b/doc/snippets/Matrix_resize_int_NoChange.cpp
index 5c37c90..e30763d 100644
--- a/doc/snippets/Matrix_resize_int_NoChange.cpp
+++ b/doc/snippets/Matrix_resize_int_NoChange.cpp
@@ -1,3 +1,3 @@
-MatrixXd m(3,4);
+MatrixXd m(3, 4);
 m.resize(5, NoChange);
 cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl;
diff --git a/doc/snippets/Matrix_resize_int_int.cpp b/doc/snippets/Matrix_resize_int_int.cpp
index bfd4741..5453dbd 100644
--- a/doc/snippets/Matrix_resize_int_int.cpp
+++ b/doc/snippets/Matrix_resize_int_int.cpp
@@ -1,9 +1,9 @@
-MatrixXd m(2,3);
-m << 1,2,3,4,5,6;
+MatrixXd m(2, 3);
+m << 1, 2, 3, 4, 5, 6;
 cout << "here's the 2x3 matrix m:" << endl << m << endl;
 cout << "let's resize m to 3x2. This is a conservative resizing because 2*3==3*2." << endl;
-m.resize(3,2);
+m.resize(3, 2);
 cout << "here's the 3x2 matrix m:" << endl << m << endl;
 cout << "now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized:" << endl;
-m.resize(2,2);
+m.resize(2, 2);
 cout << m << endl;
diff --git a/doc/snippets/Matrix_variadic_ctor_cxx11.cpp b/doc/snippets/Matrix_variadic_ctor_cxx11.cpp
index 06d33f5..45acd99 100644
--- a/doc/snippets/Matrix_variadic_ctor_cxx11.cpp
+++ b/doc/snippets/Matrix_variadic_ctor_cxx11.cpp
@@ -1,3 +1,3 @@
 Matrix<int, 1, 6> a(1, 2, 3, 4, 5, 6);
-Matrix<int, 3, 1> b {1, 2, 3};
+Matrix<int, 3, 1> b{1, 2, 3};
 cout << a << "\n\n" << b << endl;
diff --git a/doc/snippets/PartialPivLU_solve.cpp b/doc/snippets/PartialPivLU_solve.cpp
index fa3570a..ebfa56d 100644
--- a/doc/snippets/PartialPivLU_solve.cpp
+++ b/doc/snippets/PartialPivLU_solve.cpp
@@ -1,7 +1,7 @@
-MatrixXd A = MatrixXd::Random(3,3);
-MatrixXd B = MatrixXd::Random(3,2);
+MatrixXd A = MatrixXd::Random(3, 3);
+MatrixXd B = MatrixXd::Random(3, 2);
 cout << "Here is the invertible matrix A:" << endl << A << endl;
 cout << "Here is the matrix B:" << endl << B << endl;
 MatrixXd X = A.lu().solve(B);
 cout << "Here is the (unique) solution X to the equation AX=B:" << endl << X << endl;
-cout << "Relative error: " << (A*X-B).norm() / B.norm() << endl;
+cout << "Relative error: " << (A * X - B).norm() / B.norm() << endl;
diff --git a/doc/snippets/RealQZ_compute.cpp b/doc/snippets/RealQZ_compute.cpp
index a18da42..10edefc 100644
--- a/doc/snippets/RealQZ_compute.cpp
+++ b/doc/snippets/RealQZ_compute.cpp
@@ -1,17 +1,25 @@
-MatrixXf A = MatrixXf::Random(4,4);
-MatrixXf B = MatrixXf::Random(4,4);
-RealQZ<MatrixXf> qz(4); // preallocate space for 4x4 matrices
-qz.compute(A,B);  // A = Q S Z,  B = Q T Z
+MatrixXf A = MatrixXf::Random(4, 4);
+MatrixXf B = MatrixXf::Random(4, 4);
+RealQZ<MatrixXf> qz(4);  // preallocate space for 4x4 matrices
+qz.compute(A, B);        // A = Q S Z,  B = Q T Z
 
 // print original matrices and result of decomposition
-cout << "A:\n" << A << "\n" << "B:\n" << B << "\n";
-cout << "S:\n" << qz.matrixS() << "\n" << "T:\n" << qz.matrixT() << "\n";
-cout << "Q:\n" << qz.matrixQ() << "\n" << "Z:\n" << qz.matrixZ() << "\n";
+cout << "A:\n"
+     << A << "\n"
+     << "B:\n"
+     << B << "\n";
+cout << "S:\n"
+     << qz.matrixS() << "\n"
+     << "T:\n"
+     << qz.matrixT() << "\n";
+cout << "Q:\n"
+     << qz.matrixQ() << "\n"
+     << "Z:\n"
+     << qz.matrixZ() << "\n";
 
 // verify precision
 cout << "\nErrors:"
-  << "\n|A-QSZ|: " << (A-qz.matrixQ()*qz.matrixS()*qz.matrixZ()).norm()
-  << ", |B-QTZ|: " << (B-qz.matrixQ()*qz.matrixT()*qz.matrixZ()).norm()
-  << "\n|QQ* - I|: " << (qz.matrixQ()*qz.matrixQ().adjoint() - MatrixXf::Identity(4,4)).norm()
-  << ", |ZZ* - I|: " << (qz.matrixZ()*qz.matrixZ().adjoint() - MatrixXf::Identity(4,4)).norm()
-  << "\n";
+     << "\n|A-QSZ|: " << (A - qz.matrixQ() * qz.matrixS() * qz.matrixZ()).norm()
+     << ", |B-QTZ|: " << (B - qz.matrixQ() * qz.matrixT() * qz.matrixZ()).norm()
+     << "\n|QQ* - I|: " << (qz.matrixQ() * qz.matrixQ().adjoint() - MatrixXf::Identity(4, 4)).norm()
+     << ", |ZZ* - I|: " << (qz.matrixZ() * qz.matrixZ().adjoint() - MatrixXf::Identity(4, 4)).norm() << "\n";
diff --git a/doc/snippets/RealSchur_RealSchur_MatrixType.cpp b/doc/snippets/RealSchur_RealSchur_MatrixType.cpp
index a5530dc..485b0ee 100644
--- a/doc/snippets/RealSchur_RealSchur_MatrixType.cpp
+++ b/doc/snippets/RealSchur_RealSchur_MatrixType.cpp
@@ -1,4 +1,4 @@
-MatrixXd A = MatrixXd::Random(6,6);
+MatrixXd A = MatrixXd::Random(6, 6);
 cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
 
 RealSchur<MatrixXd> schur(A);
diff --git a/doc/snippets/RealSchur_compute.cpp b/doc/snippets/RealSchur_compute.cpp
index 20c2611..78c71c8 100644
--- a/doc/snippets/RealSchur_compute.cpp
+++ b/doc/snippets/RealSchur_compute.cpp
@@ -1,4 +1,4 @@
-MatrixXf A = MatrixXf::Random(4,4);
+MatrixXf A = MatrixXf::Random(4, 4);
 RealSchur<MatrixXf> schur(4);
 schur.compute(A, /* computeU = */ false);
 cout << "The matrix T in the decomposition of A is:" << endl << schur.matrixT() << endl;
diff --git a/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp b/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp
index 73a7f62..16f4b23 100644
--- a/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp
+++ b/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp
@@ -1,7 +1,7 @@
 SelfAdjointEigenSolver<Matrix4f> es;
-Matrix4f X = Matrix4f::Random(4,4);
+Matrix4f X = Matrix4f::Random(4, 4);
 Matrix4f A = X + X.transpose();
 es.compute(A);
 cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl;
-es.compute(A + Matrix4f::Identity(4,4)); // re-use es to compute eigenvalues of A+I
+es.compute(A + Matrix4f::Identity(4, 4));  // re-use es to compute eigenvalues of A+I
 cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl;
diff --git a/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp b/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp
index 3599b17..0ed9092 100644
--- a/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp
+++ b/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp
@@ -1,4 +1,4 @@
-MatrixXd X = MatrixXd::Random(5,5);
+MatrixXd X = MatrixXd::Random(5, 5);
 MatrixXd A = X + X.transpose();
 cout << "Here is a random symmetric 5x5 matrix, A:" << endl << A << endl << endl;
 
diff --git a/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp b/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp
index cc0c50e..e2889b7 100644
--- a/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp
+++ b/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp
@@ -1,11 +1,11 @@
-MatrixXd X = MatrixXd::Random(5,5);
+MatrixXd X = MatrixXd::Random(5, 5);
 MatrixXd A = X + X.transpose();
 cout << "Here is a random symmetric matrix, A:" << endl << A << endl;
-X = MatrixXd::Random(5,5);
+X = MatrixXd::Random(5, 5);
 MatrixXd B = X * X.transpose();
 cout << "and a random positive-definite matrix, B:" << endl << B << endl << endl;
 
-GeneralizedSelfAdjointEigenSolver<MatrixXd> es(A,B);
+GeneralizedSelfAdjointEigenSolver<MatrixXd> es(A, B);
 cout << "The eigenvalues of the pencil (A,B) are:" << endl << es.eigenvalues() << endl;
 cout << "The matrix of eigenvectors, V, is:" << endl << es.eigenvectors() << endl << endl;
 
diff --git a/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp b/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp
index 2975cc3..9075db7 100644
--- a/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp
+++ b/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp
@@ -1,7 +1,7 @@
 SelfAdjointEigenSolver<MatrixXf> es(4);
-MatrixXf X = MatrixXf::Random(4,4);
+MatrixXf X = MatrixXf::Random(4, 4);
 MatrixXf A = X + X.transpose();
 es.compute(A);
 cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl;
-es.compute(A + MatrixXf::Identity(4,4)); // re-use es to compute eigenvalues of A+I
+es.compute(A + MatrixXf::Identity(4, 4));  // re-use es to compute eigenvalues of A+I
 cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl;
diff --git a/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType2.cpp b/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType2.cpp
index 07c92a1..88d44c6 100644
--- a/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType2.cpp
+++ b/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType2.cpp
@@ -1,9 +1,9 @@
-MatrixXd X = MatrixXd::Random(5,5);
+MatrixXd X = MatrixXd::Random(5, 5);
 MatrixXd A = X * X.transpose();
-X = MatrixXd::Random(5,5);
+X = MatrixXd::Random(5, 5);
 MatrixXd B = X * X.transpose();
 
-GeneralizedSelfAdjointEigenSolver<MatrixXd> es(A,B,EigenvaluesOnly);
+GeneralizedSelfAdjointEigenSolver<MatrixXd> es(A, B, EigenvaluesOnly);
 cout << "The eigenvalues of the pencil (A,B) are:" << endl << es.eigenvalues() << endl;
-es.compute(B,A,false);
+es.compute(B, A, false);
 cout << "The eigenvalues of the pencil (B,A) are:" << endl << es.eigenvalues() << endl;
diff --git a/doc/snippets/SelfAdjointEigenSolver_eigenvalues.cpp b/doc/snippets/SelfAdjointEigenSolver_eigenvalues.cpp
index 0ff33c6..d80f90c 100644
--- a/doc/snippets/SelfAdjointEigenSolver_eigenvalues.cpp
+++ b/doc/snippets/SelfAdjointEigenSolver_eigenvalues.cpp
@@ -1,4 +1,3 @@
-MatrixXd ones = MatrixXd::Ones(3,3);
+MatrixXd ones = MatrixXd::Ones(3, 3);
 SelfAdjointEigenSolver<MatrixXd> es(ones);
-cout << "The eigenvalues of the 3x3 matrix of ones are:" 
-     << endl << es.eigenvalues() << endl;
+cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << es.eigenvalues() << endl;
diff --git a/doc/snippets/SelfAdjointEigenSolver_eigenvectors.cpp b/doc/snippets/SelfAdjointEigenSolver_eigenvectors.cpp
index 94b0d6e..a91dca1 100644
--- a/doc/snippets/SelfAdjointEigenSolver_eigenvectors.cpp
+++ b/doc/snippets/SelfAdjointEigenSolver_eigenvectors.cpp
@@ -1,4 +1,3 @@
-MatrixXd ones = MatrixXd::Ones(3,3);
+MatrixXd ones = MatrixXd::Ones(3, 3);
 SelfAdjointEigenSolver<MatrixXd> es(ones);
-cout << "The first eigenvector of the 3x3 matrix of ones is:" 
-     << endl << es.eigenvectors().col(0) << endl;
+cout << "The first eigenvector of the 3x3 matrix of ones is:" << endl << es.eigenvectors().col(0) << endl;
diff --git a/doc/snippets/SelfAdjointEigenSolver_operatorInverseSqrt.cpp b/doc/snippets/SelfAdjointEigenSolver_operatorInverseSqrt.cpp
index 114c65f..50e83f3 100644
--- a/doc/snippets/SelfAdjointEigenSolver_operatorInverseSqrt.cpp
+++ b/doc/snippets/SelfAdjointEigenSolver_operatorInverseSqrt.cpp
@@ -1,4 +1,4 @@
-MatrixXd X = MatrixXd::Random(4,4);
+MatrixXd X = MatrixXd::Random(4, 4);
 MatrixXd A = X * X.transpose();
 cout << "Here is a random positive-definite matrix, A:" << endl << A << endl << endl;
 
diff --git a/doc/snippets/SelfAdjointEigenSolver_operatorSqrt.cpp b/doc/snippets/SelfAdjointEigenSolver_operatorSqrt.cpp
index eeacca7..bced567 100644
--- a/doc/snippets/SelfAdjointEigenSolver_operatorSqrt.cpp
+++ b/doc/snippets/SelfAdjointEigenSolver_operatorSqrt.cpp
@@ -1,8 +1,8 @@
-MatrixXd X = MatrixXd::Random(4,4);
+MatrixXd X = MatrixXd::Random(4, 4);
 MatrixXd A = X * X.transpose();
 cout << "Here is a random positive-definite matrix, A:" << endl << A << endl << endl;
 
 SelfAdjointEigenSolver<MatrixXd> es(A);
 MatrixXd sqrtA = es.operatorSqrt();
 cout << "The square root of A is: " << endl << sqrtA << endl;
-cout << "If we square this, we get: " << endl << sqrtA*sqrtA << endl;
+cout << "If we square this, we get: " << endl << sqrtA * sqrtA << endl;
diff --git a/doc/snippets/SelfAdjointView_eigenvalues.cpp b/doc/snippets/SelfAdjointView_eigenvalues.cpp
index be19867..8cef6d8 100644
--- a/doc/snippets/SelfAdjointView_eigenvalues.cpp
+++ b/doc/snippets/SelfAdjointView_eigenvalues.cpp
@@ -1,3 +1,3 @@
-MatrixXd ones = MatrixXd::Ones(3,3);
+MatrixXd ones = MatrixXd::Ones(3, 3);
 VectorXd eivals = ones.selfadjointView<Lower>().eigenvalues();
 cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl;
diff --git a/doc/snippets/SelfAdjointView_operatorNorm.cpp b/doc/snippets/SelfAdjointView_operatorNorm.cpp
index f380f55..c229faf 100644
--- a/doc/snippets/SelfAdjointView_operatorNorm.cpp
+++ b/doc/snippets/SelfAdjointView_operatorNorm.cpp
@@ -1,3 +1,2 @@
-MatrixXd ones = MatrixXd::Ones(3,3);
-cout << "The operator norm of the 3x3 matrix of ones is "
-     << ones.selfadjointView<Lower>().operatorNorm() << endl;
+MatrixXd ones = MatrixXd::Ones(3, 3);
+cout << "The operator norm of the 3x3 matrix of ones is " << ones.selfadjointView<Lower>().operatorNorm() << endl;
diff --git a/doc/snippets/Slicing_arrayexpr.cpp b/doc/snippets/Slicing_arrayexpr.cpp
index 6d09980..b78dbfa 100644
--- a/doc/snippets/Slicing_arrayexpr.cpp
+++ b/doc/snippets/Slicing_arrayexpr.cpp
@@ -1,4 +1,5 @@
-ArrayXi ind(5); ind<<4,2,5,5,3;
-MatrixXi A = MatrixXi::Random(4,6);
+ArrayXi ind(5);
+ind << 4, 2, 5, 5, 3;
+MatrixXi A = MatrixXi::Random(4, 6);
 cout << "Initial matrix A:\n" << A << "\n\n";
-cout << "A(all,ind-1):\n" << A(Eigen::placeholders::all,ind-1) << "\n\n";
+cout << "A(all,ind-1):\n" << A(Eigen::placeholders::all, ind - 1) << "\n\n";
diff --git a/doc/snippets/Slicing_custom_padding_cxx11.cpp b/doc/snippets/Slicing_custom_padding_cxx11.cpp
index 24db98b..4d482f6 100644
--- a/doc/snippets/Slicing_custom_padding_cxx11.cpp
+++ b/doc/snippets/Slicing_custom_padding_cxx11.cpp
@@ -1,12 +1,12 @@
 struct pad {
   Index size() const { return out_size; }
-  Index operator[] (Index i) const { return std::max<Index>(0,i-(out_size-in_size)); }
+  Index operator[](Index i) const { return std::max<Index>(0, i - (out_size - in_size)); }
   Index in_size, out_size;
 };
 
 Matrix3i A;
-A.reshaped() = VectorXi::LinSpaced(9,1,9);
+A.reshaped() = VectorXi::LinSpaced(9, 1, 9);
 cout << "Initial matrix A:\n" << A << "\n\n";
-MatrixXi B(5,5);
-B = A(pad{3,5}, pad{3,5});
+MatrixXi B(5, 5);
+B = A(pad{3, 5}, pad{3, 5});
 cout << "A(pad{3,N}, pad{3,N}):\n" << B << "\n\n";
diff --git a/doc/snippets/Slicing_rawarray_cxx11.cpp b/doc/snippets/Slicing_rawarray_cxx11.cpp
index 7a3e6e5..0495db6 100644
--- a/doc/snippets/Slicing_rawarray_cxx11.cpp
+++ b/doc/snippets/Slicing_rawarray_cxx11.cpp
@@ -1,3 +1,3 @@
-MatrixXi A = MatrixXi::Random(4,6);
+MatrixXi A = MatrixXi::Random(4, 6);
 cout << "Initial matrix A:\n" << A << "\n\n";
-cout << "A(all,{4,2,5,5,3}):\n" << A(Eigen::placeholders::all,{4,2,5,5,3}) << "\n\n";
+cout << "A(all,{4,2,5,5,3}):\n" << A(Eigen::placeholders::all, {4, 2, 5, 5, 3}) << "\n\n";
diff --git a/doc/snippets/Slicing_stdvector_cxx11.cpp b/doc/snippets/Slicing_stdvector_cxx11.cpp
index 74f0727..7d5ad0c 100644
--- a/doc/snippets/Slicing_stdvector_cxx11.cpp
+++ b/doc/snippets/Slicing_stdvector_cxx11.cpp
@@ -1,4 +1,4 @@
-std::vector<int> ind{4,2,5,5,3};
-MatrixXi A = MatrixXi::Random(4,6);
+std::vector<int> ind{4, 2, 5, 5, 3};
+MatrixXi A = MatrixXi::Random(4, 6);
 cout << "Initial matrix A:\n" << A << "\n\n";
-cout << "A(all,ind):\n" << A(Eigen::placeholders::all,ind) << "\n\n";
+cout << "A(all,ind):\n" << A(Eigen::placeholders::all, ind) << "\n\n";
diff --git a/doc/snippets/SparseMatrix_coeffs.cpp b/doc/snippets/SparseMatrix_coeffs.cpp
index f71a69b..266e32d 100644
--- a/doc/snippets/SparseMatrix_coeffs.cpp
+++ b/doc/snippets/SparseMatrix_coeffs.cpp
@@ -1,7 +1,7 @@
-SparseMatrix<double> A(3,3);
-A.insert(1,2) = 0;
-A.insert(0,1) = 1;
-A.insert(2,0) = 2;
+SparseMatrix<double> A(3, 3);
+A.insert(1, 2) = 0;
+A.insert(0, 1) = 1;
+A.insert(2, 0) = 2;
 A.makeCompressed();
 cout << "The matrix A is:" << endl << MatrixXd(A) << endl;
 cout << "it has " << A.nonZeros() << " stored non zero coefficients that are: " << A.coeffs().transpose() << endl;
diff --git a/doc/snippets/TopicAliasing_block.cpp b/doc/snippets/TopicAliasing_block.cpp
index 03282f4..bbb7c2a 100644
--- a/doc/snippets/TopicAliasing_block.cpp
+++ b/doc/snippets/TopicAliasing_block.cpp
@@ -1,7 +1,7 @@
-MatrixXi mat(3,3); 
-mat << 1, 2, 3,   4, 5, 6,   7, 8, 9;
+MatrixXi mat(3, 3);
+mat << 1, 2, 3, 4, 5, 6, 7, 8, 9;
 cout << "Here is the matrix mat:\n" << mat << endl;
 
 // This assignment shows the aliasing problem
-mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2);
+mat.bottomRightCorner(2, 2) = mat.topLeftCorner(2, 2);
 cout << "After the assignment, mat = \n" << mat << endl;
diff --git a/doc/snippets/TopicAliasing_block_correct.cpp b/doc/snippets/TopicAliasing_block_correct.cpp
index 6fee580..6a3002e 100644
--- a/doc/snippets/TopicAliasing_block_correct.cpp
+++ b/doc/snippets/TopicAliasing_block_correct.cpp
@@ -1,7 +1,7 @@
-MatrixXi mat(3,3); 
-mat << 1, 2, 3,   4, 5, 6,   7, 8, 9;
+MatrixXi mat(3, 3);
+mat << 1, 2, 3, 4, 5, 6, 7, 8, 9;
 cout << "Here is the matrix mat:\n" << mat << endl;
 
 // The eval() solves the aliasing problem
-mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2).eval();
+mat.bottomRightCorner(2, 2) = mat.topLeftCorner(2, 2).eval();
 cout << "After the assignment, mat = \n" << mat << endl;
diff --git a/doc/snippets/TopicAliasing_cwise.cpp b/doc/snippets/TopicAliasing_cwise.cpp
index 7049f6c..cb9d08a 100644
--- a/doc/snippets/TopicAliasing_cwise.cpp
+++ b/doc/snippets/TopicAliasing_cwise.cpp
@@ -1,20 +1,18 @@
-MatrixXf mat(2,2); 
-mat << 1, 2,  4, 7;
+MatrixXf mat(2, 2);
+mat << 1, 2, 4, 7;
 cout << "Here is the matrix mat:\n" << mat << endl << endl;
 
 mat = 2 * mat;
 cout << "After 'mat = 2 * mat', mat = \n" << mat << endl << endl;
 
-
-mat = mat - MatrixXf::Identity(2,2);
+mat = mat - MatrixXf::Identity(2, 2);
 cout << "After the subtraction, it becomes\n" << mat << endl << endl;
 
-
 ArrayXXf arr = mat;
 arr = arr.square();
 cout << "After squaring, it becomes\n" << arr << endl << endl;
 
 // Combining all operations in one statement:
-mat << 1, 2,  4, 7;
-mat = (2 * mat - MatrixXf::Identity(2,2)).array().square();
+mat << 1, 2, 4, 7;
+mat = (2 * mat - MatrixXf::Identity(2, 2)).array().square();
 cout << "Doing everything at once yields\n" << mat << endl << endl;
diff --git a/doc/snippets/TopicAliasing_mult1.cpp b/doc/snippets/TopicAliasing_mult1.cpp
index cd7e900..4ae2a47 100644
--- a/doc/snippets/TopicAliasing_mult1.cpp
+++ b/doc/snippets/TopicAliasing_mult1.cpp
@@ -1,4 +1,4 @@
-MatrixXf matA(2,2); 
-matA << 2, 0,  0, 2;
+MatrixXf matA(2, 2);
+matA << 2, 0, 0, 2;
 matA = matA * matA;
 cout << matA;
diff --git a/doc/snippets/TopicAliasing_mult2.cpp b/doc/snippets/TopicAliasing_mult2.cpp
index a3ff568..52c9987 100644
--- a/doc/snippets/TopicAliasing_mult2.cpp
+++ b/doc/snippets/TopicAliasing_mult2.cpp
@@ -1,5 +1,5 @@
-MatrixXf matA(2,2), matB(2,2); 
-matA << 2, 0,  0, 2;
+MatrixXf matA(2, 2), matB(2, 2);
+matA << 2, 0, 0, 2;
 
 // Simple but not quite as efficient
 matB = matA * matA;
diff --git a/doc/snippets/TopicAliasing_mult3.cpp b/doc/snippets/TopicAliasing_mult3.cpp
index 1d12a6c..b2bed6f 100644
--- a/doc/snippets/TopicAliasing_mult3.cpp
+++ b/doc/snippets/TopicAliasing_mult3.cpp
@@ -1,4 +1,4 @@
-MatrixXf matA(2,2); 
-matA << 2, 0,  0, 2;
+MatrixXf matA(2, 2);
+matA << 2, 0, 0, 2;
 matA.noalias() = matA * matA;
 cout << matA;
diff --git a/doc/snippets/TopicAliasing_mult4.cpp b/doc/snippets/TopicAliasing_mult4.cpp
index 01c1c6d..9a82322 100644
--- a/doc/snippets/TopicAliasing_mult4.cpp
+++ b/doc/snippets/TopicAliasing_mult4.cpp
@@ -1,5 +1,5 @@
-MatrixXf A(2,2), B(3,2);
-B << 2, 0,  0, 3, 1, 1;
+MatrixXf A(2, 2), B(3, 2);
+B << 2, 0, 0, 3, 1, 1;
 A << 2, 0, 0, -2;
 A = (B * A).cwiseAbs();
 cout << A;
diff --git a/doc/snippets/TopicAliasing_mult5.cpp b/doc/snippets/TopicAliasing_mult5.cpp
index 1a36def..79a94c8 100644
--- a/doc/snippets/TopicAliasing_mult5.cpp
+++ b/doc/snippets/TopicAliasing_mult5.cpp
@@ -1,5 +1,5 @@
-MatrixXf A(2,2), B(3,2);
-B << 2, 0,  0, 3, 1, 1;
+MatrixXf A(2, 2), B(3, 2);
+B << 2, 0, 0, 3, 1, 1;
 A << 2, 0, 0, -2;
 A = (B * A).eval().cwiseAbs();
 cout << A;
diff --git a/doc/snippets/TopicStorageOrders_example.cpp b/doc/snippets/TopicStorageOrders_example.cpp
index 0623ef0..64e2123 100644
--- a/doc/snippets/TopicStorageOrders_example.cpp
+++ b/doc/snippets/TopicStorageOrders_example.cpp
@@ -1,18 +1,13 @@
 Matrix<int, 3, 4, ColMajor> Acolmajor;
-Acolmajor << 8, 2, 2, 9,
-             9, 1, 4, 4,
-	     3, 5, 4, 5;
+Acolmajor << 8, 2, 2, 9, 9, 1, 4, 4, 3, 5, 4, 5;
 cout << "The matrix A:" << endl;
-cout << Acolmajor << endl << endl; 
+cout << Acolmajor << endl << endl;
 
 cout << "In memory (column-major):" << endl;
-for (int i = 0; i < Acolmajor.size(); i++)
-  cout << *(Acolmajor.data() + i) << "  ";
+for (int i = 0; i < Acolmajor.size(); i++) cout << *(Acolmajor.data() + i) << "  ";
 cout << endl << endl;
 
 Matrix<int, 3, 4, RowMajor> Arowmajor = Acolmajor;
 cout << "In memory (row-major):" << endl;
-for (int i = 0; i < Arowmajor.size(); i++)
-  cout << *(Arowmajor.data() + i) << "  ";
+for (int i = 0; i < Arowmajor.size(); i++) cout << *(Arowmajor.data() + i) << "  ";
 cout << endl;
-
diff --git a/doc/snippets/Triangular_solve.cpp b/doc/snippets/Triangular_solve.cpp
index 5484424..2da806b 100644
--- a/doc/snippets/Triangular_solve.cpp
+++ b/doc/snippets/Triangular_solve.cpp
@@ -7,5 +7,4 @@
 cout << "And now here is m.inverse()*n, taking advantage of the fact that"
         " m is upper-triangular:\n"
      << m.triangularView<Eigen::Upper>().solve(n) << endl;
-cout << "And this is n*m.inverse():\n"
-     << m.triangularView<Eigen::Upper>().solve<Eigen::OnTheRight>(n);
+cout << "And this is n*m.inverse():\n" << m.triangularView<Eigen::Upper>().solve<Eigen::OnTheRight>(n);
diff --git a/doc/snippets/Tridiagonalization_Tridiagonalization_MatrixType.cpp b/doc/snippets/Tridiagonalization_Tridiagonalization_MatrixType.cpp
index a260124..087b1ec 100644
--- a/doc/snippets/Tridiagonalization_Tridiagonalization_MatrixType.cpp
+++ b/doc/snippets/Tridiagonalization_Tridiagonalization_MatrixType.cpp
@@ -1,4 +1,4 @@
-MatrixXd X = MatrixXd::Random(5,5);
+MatrixXd X = MatrixXd::Random(5, 5);
 MatrixXd A = X + X.transpose();
 cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl;
 Tridiagonalization<MatrixXd> triOfA(A);
diff --git a/doc/snippets/Tridiagonalization_compute.cpp b/doc/snippets/Tridiagonalization_compute.cpp
index 0062a99..ecaee15 100644
--- a/doc/snippets/Tridiagonalization_compute.cpp
+++ b/doc/snippets/Tridiagonalization_compute.cpp
@@ -1,9 +1,9 @@
 Tridiagonalization<MatrixXf> tri;
-MatrixXf X = MatrixXf::Random(4,4);
+MatrixXf X = MatrixXf::Random(4, 4);
 MatrixXf A = X + X.transpose();
 tri.compute(A);
 cout << "The matrix T in the tridiagonal decomposition of A is: " << endl;
 cout << tri.matrixT() << endl;
-tri.compute(2*A); // re-use tri to compute eigenvalues of 2A
+tri.compute(2 * A);  // re-use tri to compute eigenvalues of 2A
 cout << "The matrix T in the tridiagonal decomposition of 2A is: " << endl;
 cout << tri.matrixT() << endl;
diff --git a/doc/snippets/Tridiagonalization_decomposeInPlace.cpp b/doc/snippets/Tridiagonalization_decomposeInPlace.cpp
index 9a66baa..b28c935 100644
--- a/doc/snippets/Tridiagonalization_decomposeInPlace.cpp
+++ b/doc/snippets/Tridiagonalization_decomposeInPlace.cpp
@@ -1,4 +1,4 @@
-MatrixXd X = MatrixXd::Random(5,5);
+MatrixXd X = MatrixXd::Random(5, 5);
 MatrixXd A = X + X.transpose();
 cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl;
 
diff --git a/doc/snippets/Tridiagonalization_diagonal.cpp b/doc/snippets/Tridiagonalization_diagonal.cpp
index 6eec821..18edc1e 100644
--- a/doc/snippets/Tridiagonalization_diagonal.cpp
+++ b/doc/snippets/Tridiagonalization_diagonal.cpp
@@ -1,4 +1,4 @@
-MatrixXcd X = MatrixXcd::Random(4,4);
+MatrixXcd X = MatrixXcd::Random(4, 4);
 MatrixXcd A = X + X.adjoint();
 cout << "Here is a random self-adjoint 4x4 matrix:" << endl << A << endl << endl;
 
@@ -8,6 +8,6 @@
 
 cout << "We can also extract the diagonals of T directly ..." << endl;
 VectorXd diag = triOfA.diagonal();
-cout << "The diagonal is:" << endl << diag << endl; 
+cout << "The diagonal is:" << endl << diag << endl;
 VectorXd subdiag = triOfA.subDiagonal();
 cout << "The subdiagonal is:" << endl << subdiag << endl;
diff --git a/doc/snippets/Tridiagonalization_householderCoefficients.cpp b/doc/snippets/Tridiagonalization_householderCoefficients.cpp
index e5d8728..f880f1d 100644
--- a/doc/snippets/Tridiagonalization_householderCoefficients.cpp
+++ b/doc/snippets/Tridiagonalization_householderCoefficients.cpp
@@ -1,4 +1,4 @@
-Matrix4d X = Matrix4d::Random(4,4);
+Matrix4d X = Matrix4d::Random(4, 4);
 Matrix4d A = X + X.transpose();
 cout << "Here is a random symmetric 4x4 matrix:" << endl << A << endl;
 Tridiagonalization<Matrix4d> triOfA(A);
diff --git a/doc/snippets/Tridiagonalization_packedMatrix.cpp b/doc/snippets/Tridiagonalization_packedMatrix.cpp
index 0f55d0c..3b186a8 100644
--- a/doc/snippets/Tridiagonalization_packedMatrix.cpp
+++ b/doc/snippets/Tridiagonalization_packedMatrix.cpp
@@ -1,8 +1,7 @@
-Matrix4d X = Matrix4d::Random(4,4);
+Matrix4d X = Matrix4d::Random(4, 4);
 Matrix4d A = X + X.transpose();
 cout << "Here is a random symmetric 4x4 matrix:" << endl << A << endl;
 Tridiagonalization<Matrix4d> triOfA(A);
 Matrix4d pm = triOfA.packedMatrix();
 cout << "The packed matrix M is:" << endl << pm << endl;
-cout << "The diagonal and subdiagonal corresponds to the matrix T, which is:" 
-     << endl << triOfA.matrixT() << endl;
+cout << "The diagonal and subdiagonal corresponds to the matrix T, which is:" << endl << triOfA.matrixT() << endl;
diff --git a/doc/snippets/Tutorial_AdvancedInitialization_Block.cpp b/doc/snippets/Tutorial_AdvancedInitialization_Block.cpp
index 96e40ac..752c522 100644
--- a/doc/snippets/Tutorial_AdvancedInitialization_Block.cpp
+++ b/doc/snippets/Tutorial_AdvancedInitialization_Block.cpp
@@ -1,5 +1,5 @@
 MatrixXf matA(2, 2);
 matA << 1, 2, 3, 4;
 MatrixXf matB(4, 4);
-matB << matA, matA/10, matA/10, matA;
+matB << matA, matA / 10, matA / 10, matA;
 std::cout << matB << std::endl;
diff --git a/doc/snippets/Tutorial_AdvancedInitialization_CommaTemporary.cpp b/doc/snippets/Tutorial_AdvancedInitialization_CommaTemporary.cpp
index 50cff4c..8af3d74 100644
--- a/doc/snippets/Tutorial_AdvancedInitialization_CommaTemporary.cpp
+++ b/doc/snippets/Tutorial_AdvancedInitialization_CommaTemporary.cpp
@@ -1,4 +1,4 @@
 MatrixXf mat = MatrixXf::Random(2, 3);
 std::cout << mat << std::endl << std::endl;
-mat = (MatrixXf(2,2) << 0, 1, 1, 0).finished() * mat;
+mat = (MatrixXf(2, 2) << 0, 1, 1, 0).finished() * mat;
 std::cout << mat << std::endl;
diff --git a/doc/snippets/Tutorial_AdvancedInitialization_ThreeWays.cpp b/doc/snippets/Tutorial_AdvancedInitialization_ThreeWays.cpp
index cb74576..4878dd7 100644
--- a/doc/snippets/Tutorial_AdvancedInitialization_ThreeWays.cpp
+++ b/doc/snippets/Tutorial_AdvancedInitialization_ThreeWays.cpp
@@ -1,20 +1,19 @@
 const int size = 6;
 MatrixXd mat1(size, size);
-mat1.topLeftCorner(size/2, size/2)     = MatrixXd::Zero(size/2, size/2);
-mat1.topRightCorner(size/2, size/2)    = MatrixXd::Identity(size/2, size/2);
-mat1.bottomLeftCorner(size/2, size/2)  = MatrixXd::Identity(size/2, size/2);
-mat1.bottomRightCorner(size/2, size/2) = MatrixXd::Zero(size/2, size/2);
+mat1.topLeftCorner(size / 2, size / 2) = MatrixXd::Zero(size / 2, size / 2);
+mat1.topRightCorner(size / 2, size / 2) = MatrixXd::Identity(size / 2, size / 2);
+mat1.bottomLeftCorner(size / 2, size / 2) = MatrixXd::Identity(size / 2, size / 2);
+mat1.bottomRightCorner(size / 2, size / 2) = MatrixXd::Zero(size / 2, size / 2);
 std::cout << mat1 << std::endl << std::endl;
 
 MatrixXd mat2(size, size);
-mat2.topLeftCorner(size/2, size/2).setZero();
-mat2.topRightCorner(size/2, size/2).setIdentity();
-mat2.bottomLeftCorner(size/2, size/2).setIdentity();
-mat2.bottomRightCorner(size/2, size/2).setZero();
+mat2.topLeftCorner(size / 2, size / 2).setZero();
+mat2.topRightCorner(size / 2, size / 2).setIdentity();
+mat2.bottomLeftCorner(size / 2, size / 2).setIdentity();
+mat2.bottomRightCorner(size / 2, size / 2).setZero();
 std::cout << mat2 << std::endl << std::endl;
 
 MatrixXd mat3(size, size);
-mat3 << MatrixXd::Zero(size/2, size/2), MatrixXd::Identity(size/2, size/2),
-        MatrixXd::Identity(size/2, size/2), MatrixXd::Zero(size/2, size/2);
+mat3 << MatrixXd::Zero(size / 2, size / 2),
+    MatrixXd::Identity(size / 2, size / 2), MatrixXd::Identity(size / 2, size / 2), MatrixXd::Zero(size / 2, size / 2);
 std::cout << mat3 << std::endl;
-
diff --git a/doc/snippets/Tutorial_AdvancedInitialization_Zero.cpp b/doc/snippets/Tutorial_AdvancedInitialization_Zero.cpp
index 76a36a3..03fb899 100644
--- a/doc/snippets/Tutorial_AdvancedInitialization_Zero.cpp
+++ b/doc/snippets/Tutorial_AdvancedInitialization_Zero.cpp
@@ -2,12 +2,10 @@
 Array33f a1 = Array33f::Zero();
 std::cout << a1 << "\n\n";
 
-
 std::cout << "A one-dimensional dynamic-size array:\n";
 ArrayXf a2 = ArrayXf::Zero(3);
 std::cout << a2 << "\n\n";
 
-
 std::cout << "A two-dimensional dynamic-size array:\n";
 ArrayXXf a3 = ArrayXXf::Zero(3, 4);
 std::cout << a3 << "\n";
diff --git a/doc/snippets/Tutorial_Map_rowmajor.cpp b/doc/snippets/Tutorial_Map_rowmajor.cpp
index fd45ace..f1b9a2f 100644
--- a/doc/snippets/Tutorial_Map_rowmajor.cpp
+++ b/doc/snippets/Tutorial_Map_rowmajor.cpp
@@ -1,7 +1,5 @@
 int array[8];
-for(int i = 0; i < 8; ++i) array[i] = i;
-cout << "Column-major:\n" << Map<Matrix<int,2,4> >(array) << endl;
-cout << "Row-major:\n" << Map<Matrix<int,2,4,RowMajor> >(array) << endl;
-cout << "Row-major using stride:\n" <<
-  Map<Matrix<int,2,4>, Unaligned, Stride<1,4> >(array) << endl;
-
+for (int i = 0; i < 8; ++i) array[i] = i;
+cout << "Column-major:\n" << Map<Matrix<int, 2, 4> >(array) << endl;
+cout << "Row-major:\n" << Map<Matrix<int, 2, 4, RowMajor> >(array) << endl;
+cout << "Row-major using stride:\n" << Map<Matrix<int, 2, 4>, Unaligned, Stride<1, 4> >(array) << endl;
diff --git a/doc/snippets/Tutorial_Map_using.cpp b/doc/snippets/Tutorial_Map_using.cpp
index e5e499f..6fd6ea8 100644
--- a/doc/snippets/Tutorial_Map_using.cpp
+++ b/doc/snippets/Tutorial_Map_using.cpp
@@ -1,21 +1,20 @@
-typedef Matrix<float,1,Dynamic> MatrixType;
+typedef Matrix<float, 1, Dynamic> MatrixType;
 typedef Map<MatrixType> MapType;
-typedef Map<const MatrixType> MapTypeConst;   // a read-only map
+typedef Map<const MatrixType> MapTypeConst;  // a read-only map
 const int n_dims = 5;
-  
+
 MatrixType m1(n_dims), m2(n_dims);
 m1.setRandom();
 m2.setRandom();
-float *p = &m2(0);  // get the address storing the data for m2
-MapType m2map(p,m2.size());   // m2map shares data with m2
-MapTypeConst m2mapconst(p,m2.size());  // a read-only accessor for m2
+float *p = &m2(0);                      // get the address storing the data for m2
+MapType m2map(p, m2.size());            // m2map shares data with m2
+MapTypeConst m2mapconst(p, m2.size());  // a read-only accessor for m2
 
 cout << "m1: " << m1 << endl;
 cout << "m2: " << m2 << endl;
-cout << "Squared euclidean distance: " << (m1-m2).squaredNorm() << endl;
-cout << "Squared euclidean distance, using map: " <<
-  (m1-m2map).squaredNorm() << endl;
-m2map(3) = 7;   // this will change m2, since they share the same array
+cout << "Squared euclidean distance: " << (m1 - m2).squaredNorm() << endl;
+cout << "Squared euclidean distance, using map: " << (m1 - m2map).squaredNorm() << endl;
+m2map(3) = 7;  // this will change m2, since they share the same array
 cout << "Updated m2: " << m2 << endl;
 cout << "m2 coefficient 2, constant accessor: " << m2mapconst(2) << endl;
-/* m2mapconst(2) = 5; */   // this yields a compile-time error
+/* m2mapconst(2) = 5; */  // this yields a compile-time error
diff --git a/doc/snippets/Tutorial_ReshapeMat2Mat.cpp b/doc/snippets/Tutorial_ReshapeMat2Mat.cpp
index 737afec..855af31 100644
--- a/doc/snippets/Tutorial_ReshapeMat2Mat.cpp
+++ b/doc/snippets/Tutorial_ReshapeMat2Mat.cpp
@@ -1,6 +1,5 @@
-MatrixXf M1(2,6);    // Column-major storage
-M1 << 1, 2, 3,  4,  5,  6,
-      7, 8, 9, 10, 11, 12;
+MatrixXf M1(2, 6);  // Column-major storage
+M1 << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
 
-Map<MatrixXf> M2(M1.data(), 6,2);
+Map<MatrixXf> M2(M1.data(), 6, 2);
 cout << "M2:" << endl << M2 << endl;
diff --git a/doc/snippets/Tutorial_ReshapeMat2Vec.cpp b/doc/snippets/Tutorial_ReshapeMat2Vec.cpp
index 32980a7..9a2df01 100644
--- a/doc/snippets/Tutorial_ReshapeMat2Vec.cpp
+++ b/doc/snippets/Tutorial_ReshapeMat2Vec.cpp
@@ -1,11 +1,9 @@
-MatrixXf M1(3,3);    // Column-major storage
-M1 << 1, 2, 3,
-      4, 5, 6,
-      7, 8, 9;
+MatrixXf M1(3, 3);  // Column-major storage
+M1 << 1, 2, 3, 4, 5, 6, 7, 8, 9;
 
 Map<RowVectorXf> v1(M1.data(), M1.size());
 cout << "v1:" << endl << v1 << endl;
 
-Matrix<float,Dynamic,Dynamic,RowMajor> M2(M1);
+Matrix<float, Dynamic, Dynamic, RowMajor> M2(M1);
 Map<RowVectorXf> v2(M2.data(), M2.size());
 cout << "v2:" << endl << v2 << endl;
diff --git a/doc/snippets/Tutorial_SlicingCol.cpp b/doc/snippets/Tutorial_SlicingCol.cpp
index 695d130..bfaec50 100644
--- a/doc/snippets/Tutorial_SlicingCol.cpp
+++ b/doc/snippets/Tutorial_SlicingCol.cpp
@@ -1,11 +1,11 @@
-MatrixXf M1 = MatrixXf::Random(3,8);
+MatrixXf M1 = MatrixXf::Random(3, 8);
 cout << "Column major input:" << endl << M1 << "\n";
-Map<MatrixXf,0,OuterStride<> > M2(M1.data(), M1.rows(), (M1.cols()+2)/3, OuterStride<>(M1.outerStride()*3));
+Map<MatrixXf, 0, OuterStride<> > M2(M1.data(), M1.rows(), (M1.cols() + 2) / 3, OuterStride<>(M1.outerStride() * 3));
 cout << "1 column over 3:" << endl << M2 << "\n";
 
-typedef Matrix<float,Dynamic,Dynamic,RowMajor> RowMajorMatrixXf;
+typedef Matrix<float, Dynamic, Dynamic, RowMajor> RowMajorMatrixXf;
 RowMajorMatrixXf M3(M1);
 cout << "Row major input:" << endl << M3 << "\n";
-Map<RowMajorMatrixXf,0,Stride<Dynamic,3> > M4(M3.data(), M3.rows(), (M3.cols()+2)/3,
-                                              Stride<Dynamic,3>(M3.outerStride(),3));
+Map<RowMajorMatrixXf, 0, Stride<Dynamic, 3> > M4(M3.data(), M3.rows(), (M3.cols() + 2) / 3,
+                                                 Stride<Dynamic, 3>(M3.outerStride(), 3));
 cout << "1 column over 3:" << endl << M4 << "\n";
diff --git a/doc/snippets/Tutorial_SlicingVec.cpp b/doc/snippets/Tutorial_SlicingVec.cpp
index 9b82246..d0c81c6 100644
--- a/doc/snippets/Tutorial_SlicingVec.cpp
+++ b/doc/snippets/Tutorial_SlicingVec.cpp
@@ -1,4 +1,4 @@
-RowVectorXf v = RowVectorXf::LinSpaced(20,0,19);
+RowVectorXf v = RowVectorXf::LinSpaced(20, 0, 19);
 cout << "Input:" << endl << v << endl;
-Map<RowVectorXf,0,InnerStride<2> > v2(v.data(), v.size()/2);
+Map<RowVectorXf, 0, InnerStride<2> > v2(v.data(), v.size() / 2);
 cout << "Even:" << v2 << endl;
diff --git a/doc/snippets/Tutorial_commainit_01.cpp b/doc/snippets/Tutorial_commainit_01.cpp
index 47ba31d..36728a7 100644
--- a/doc/snippets/Tutorial_commainit_01.cpp
+++ b/doc/snippets/Tutorial_commainit_01.cpp
@@ -1,5 +1,3 @@
 Matrix3f m;
-m << 1, 2, 3,
-     4, 5, 6,
-     7, 8, 9;
+m << 1, 2, 3, 4, 5, 6, 7, 8, 9;
 std::cout << m;
diff --git a/doc/snippets/Tutorial_commainit_01b.cpp b/doc/snippets/Tutorial_commainit_01b.cpp
index 2adb2e2..126277b 100644
--- a/doc/snippets/Tutorial_commainit_01b.cpp
+++ b/doc/snippets/Tutorial_commainit_01b.cpp
@@ -1,5 +1,5 @@
 Matrix3f m;
 m.row(0) << 1, 2, 3;
-m.block(1,0,2,2) << 4, 5, 7, 8;
-m.col(2).tail(2) << 6, 9;		    
+m.block(1, 0, 2, 2) << 4, 5, 7, 8;
+m.col(2).tail(2) << 6, 9;
 std::cout << m;
diff --git a/doc/snippets/Tutorial_commainit_02.cpp b/doc/snippets/Tutorial_commainit_02.cpp
index c960d6a..3437237 100644
--- a/doc/snippets/Tutorial_commainit_02.cpp
+++ b/doc/snippets/Tutorial_commainit_02.cpp
@@ -1,7 +1,5 @@
-int rows=5, cols=5;
-MatrixXf m(rows,cols);
+int rows = 5, cols = 5;
+MatrixXf m(rows, cols);
 m << (Matrix3f() << 1, 2, 3, 4, 5, 6, 7, 8, 9).finished(),
-     MatrixXf::Zero(3,cols-3),
-     MatrixXf::Zero(rows-3,3),
-     MatrixXf::Identity(rows-3,cols-3);
+    MatrixXf::Zero(3, cols - 3), MatrixXf::Zero(rows - 3, 3), MatrixXf::Identity(rows - 3, cols - 3);
 cout << m;
diff --git a/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp b/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp
index e72e715..ee3af86 100644
--- a/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp
+++ b/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp
@@ -1,4 +1,4 @@
 VectorXi v = VectorXi::Random(4);
 cout << "Here is the vector v:\n";
-for(auto x : v) cout << x << " ";
+for (auto x : v) cout << x << " ";
 cout << "\n";
diff --git a/doc/snippets/Tutorial_range_for_loop_2d_cxx11.cpp b/doc/snippets/Tutorial_range_for_loop_2d_cxx11.cpp
index 4a12d26..27e1f8a 100644
--- a/doc/snippets/Tutorial_range_for_loop_2d_cxx11.cpp
+++ b/doc/snippets/Tutorial_range_for_loop_2d_cxx11.cpp
@@ -1,5 +1,4 @@
 Matrix2i A = Matrix2i::Random();
 cout << "Here are the coeffs of the 2x2 matrix A:\n";
-for(auto x : A.reshaped())
-  cout << x << " ";
+for (auto x : A.reshaped()) cout << x << " ";
 cout << "\n";
diff --git a/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp b/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp
index e520e8e..41a5d99 100644
--- a/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp
+++ b/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp
@@ -1,5 +1,5 @@
 MatrixXi m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.reshaped(2, 8):" << endl << m.reshaped(2, 8) << endl;
-m.resize(2,8);
+m.resize(2, 8);
 cout << "Here is the matrix m after m.resize(2,8):" << endl << m << endl;
diff --git a/doc/snippets/Tutorial_reshaped_vs_resize_2.cpp b/doc/snippets/Tutorial_reshaped_vs_resize_2.cpp
index 50dc454..c5d3929 100644
--- a/doc/snippets/Tutorial_reshaped_vs_resize_2.cpp
+++ b/doc/snippets/Tutorial_reshaped_vs_resize_2.cpp
@@ -1,6 +1,6 @@
-Matrix<int,Dynamic,Dynamic,RowMajor> m = Matrix4i::Random();
+Matrix<int, Dynamic, Dynamic, RowMajor> m = Matrix4i::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is m.reshaped(2, 8):" << endl << m.reshaped(2, 8) << endl;
 cout << "Here is m.reshaped<AutoOrder>(2, 8):" << endl << m.reshaped<AutoOrder>(2, 8) << endl;
-m.resize(2,8);
+m.resize(2, 8);
 cout << "Here is the matrix m after m.resize(2,8):" << endl << m << endl;
diff --git a/doc/snippets/Tutorial_solve_matrix_inverse.cpp b/doc/snippets/Tutorial_solve_matrix_inverse.cpp
index fff3244..e39696f 100644
--- a/doc/snippets/Tutorial_solve_matrix_inverse.cpp
+++ b/doc/snippets/Tutorial_solve_matrix_inverse.cpp
@@ -1,6 +1,6 @@
 Matrix3f A;
 Vector3f b;
-A << 1,2,3,  4,5,6,  7,8,10;
+A << 1, 2, 3, 4, 5, 6, 7, 8, 10;
 b << 3, 3, 4;
 Vector3f x = A.inverse() * b;
 cout << "The solution is:" << endl << x << endl;
diff --git a/doc/snippets/Tutorial_solve_multiple_rhs.cpp b/doc/snippets/Tutorial_solve_multiple_rhs.cpp
index 5411a44..b08100a 100644
--- a/doc/snippets/Tutorial_solve_multiple_rhs.cpp
+++ b/doc/snippets/Tutorial_solve_multiple_rhs.cpp
@@ -1,8 +1,8 @@
-Matrix3f A(3,3);
-A << 1,2,3,  4,5,6,  7,8,10;
-Matrix<float,3,2> B;
-B << 3,1, 3,1, 4,1;
-Matrix<float,3,2> X;
+Matrix3f A(3, 3);
+A << 1, 2, 3, 4, 5, 6, 7, 8, 10;
+Matrix<float, 3, 2> B;
+B << 3, 1, 3, 1, 4, 1;
+Matrix<float, 3, 2> X;
 X = A.fullPivLu().solve(B);
 cout << "The solution with right-hand side (3,3,4) is:" << endl;
 cout << X.col(0) << endl;
diff --git a/doc/snippets/Tutorial_solve_reuse_decomposition.cpp b/doc/snippets/Tutorial_solve_reuse_decomposition.cpp
index 3ca0645..d47c6ca 100644
--- a/doc/snippets/Tutorial_solve_reuse_decomposition.cpp
+++ b/doc/snippets/Tutorial_solve_reuse_decomposition.cpp
@@ -1,13 +1,13 @@
-Matrix3f A(3,3);
-A << 1,2,3,  4,5,6,  7,8,10;
-PartialPivLU<Matrix3f> luOfA(A); // compute LU decomposition of A
+Matrix3f A(3, 3);
+A << 1, 2, 3, 4, 5, 6, 7, 8, 10;
+PartialPivLU<Matrix3f> luOfA(A);  // compute LU decomposition of A
 Vector3f b;
-b << 3,3,4;
+b << 3, 3, 4;
 Vector3f x;
 x = luOfA.solve(b);
 cout << "The solution with right-hand side (3,3,4) is:" << endl;
 cout << x << endl;
-b << 1,1,1;
+b << 1, 1, 1;
 x = luOfA.solve(b);
 cout << "The solution with right-hand side (1,1,1) is:" << endl;
 cout << x << endl;
diff --git a/doc/snippets/Tutorial_solve_singular.cpp b/doc/snippets/Tutorial_solve_singular.cpp
index abff1ef..4d168df 100644
--- a/doc/snippets/Tutorial_solve_singular.cpp
+++ b/doc/snippets/Tutorial_solve_singular.cpp
@@ -1,6 +1,6 @@
 Matrix3f A;
 Vector3f b;
-A << 1,2,3,  4,5,6,  7,8,9;
+A << 1, 2, 3, 4, 5, 6, 7, 8, 9;
 b << 3, 3, 4;
 cout << "Here is the matrix A:" << endl << A << endl;
 cout << "Here is the vector b:" << endl << b << endl;
diff --git a/doc/snippets/Tutorial_solve_triangular.cpp b/doc/snippets/Tutorial_solve_triangular.cpp
index 9d13f22..b422f24 100644
--- a/doc/snippets/Tutorial_solve_triangular.cpp
+++ b/doc/snippets/Tutorial_solve_triangular.cpp
@@ -1,6 +1,6 @@
 Matrix3f A;
 Vector3f b;
-A << 1,2,3,  0,5,6,  0,0,10;
+A << 1, 2, 3, 0, 5, 6, 0, 0, 10;
 b << 3, 3, 4;
 cout << "Here is the matrix A:" << endl << A << endl;
 cout << "Here is the vector b:" << endl << b << endl;
diff --git a/doc/snippets/Tutorial_solve_triangular_inplace.cpp b/doc/snippets/Tutorial_solve_triangular_inplace.cpp
index 16ae633..f928e78 100644
--- a/doc/snippets/Tutorial_solve_triangular_inplace.cpp
+++ b/doc/snippets/Tutorial_solve_triangular_inplace.cpp
@@ -1,6 +1,6 @@
 Matrix3f A;
 Vector3f b;
-A << 1,2,3,  0,5,6,  0,0,10;
+A << 1, 2, 3, 0, 5, 6, 0, 0, 10;
 b << 3, 3, 4;
 A.triangularView<Upper>().solveInPlace(b);
 cout << "The solution is:" << endl << b << endl;
diff --git a/doc/snippets/Tutorial_std_sort_rows_cxx11.cpp b/doc/snippets/Tutorial_std_sort_rows_cxx11.cpp
index 0364160..d948949 100644
--- a/doc/snippets/Tutorial_std_sort_rows_cxx11.cpp
+++ b/doc/snippets/Tutorial_std_sort_rows_cxx11.cpp
@@ -1,5 +1,4 @@
-ArrayXXi A = ArrayXXi::Random(4,4).abs();
+ArrayXXi A = ArrayXXi::Random(4, 4).abs();
 cout << "Here is the initial matrix A:\n" << A << "\n";
-for(auto row : A.rowwise())
-  std::sort(row.begin(), row.end());
+for (auto row : A.rowwise()) std::sort(row.begin(), row.end());
 cout << "Here is the sorted matrix A:\n" << A << "\n";
diff --git a/doc/snippets/VectorwiseOp_homogeneous.cpp b/doc/snippets/VectorwiseOp_homogeneous.cpp
index 67cf573..3d2c8fd 100644
--- a/doc/snippets/VectorwiseOp_homogeneous.cpp
+++ b/doc/snippets/VectorwiseOp_homogeneous.cpp
@@ -1,6 +1,8 @@
-Matrix3Xd M = Matrix3Xd::Random(3,5);
+Matrix3Xd M = Matrix3Xd::Random(3, 5);
 Projective3d P(Matrix4d::Random());
 cout << "The matrix M is:" << endl << M << endl << endl;
 cout << "M.colwise().homogeneous():" << endl << M.colwise().homogeneous() << endl << endl;
 cout << "P * M.colwise().homogeneous():" << endl << P * M.colwise().homogeneous() << endl << endl;
-cout << "P * M.colwise().homogeneous().hnormalized(): " << endl << (P * M.colwise().homogeneous()).colwise().hnormalized() << endl << endl;
+cout << "P * M.colwise().homogeneous().hnormalized(): " << endl
+     << (P * M.colwise().homogeneous()).colwise().hnormalized() << endl
+     << endl;
diff --git a/doc/snippets/Vectorwise_reverse.cpp b/doc/snippets/Vectorwise_reverse.cpp
index 2f6a350..85a0065 100644
--- a/doc/snippets/Vectorwise_reverse.cpp
+++ b/doc/snippets/Vectorwise_reverse.cpp
@@ -1,10 +1,9 @@
-MatrixXi m = MatrixXi::Random(3,4);
+MatrixXi m = MatrixXi::Random(3, 4);
 cout << "Here is the matrix m:" << endl << m << endl;
 cout << "Here is the rowwise reverse of m:" << endl << m.rowwise().reverse() << endl;
 cout << "Here is the colwise reverse of m:" << endl << m.colwise().reverse() << endl;
 
-cout << "Here is the coefficient (1,0) in the rowise reverse of m:" << endl
-<< m.rowwise().reverse()(1,0) << endl;
+cout << "Here is the coefficient (1,0) in the rowise reverse of m:" << endl << m.rowwise().reverse()(1, 0) << endl;
 cout << "Let us overwrite this coefficient with the value 4." << endl;
-//m.colwise().reverse()(1,0) = 4;
+// m.colwise().reverse()(1,0) = 4;
 cout << "Now the matrix m is:" << endl << m << endl;
diff --git a/doc/snippets/class_FullPivLU.cpp b/doc/snippets/class_FullPivLU.cpp
index fce7fac..2951c8d 100644
--- a/doc/snippets/class_FullPivLU.cpp
+++ b/doc/snippets/class_FullPivLU.cpp
@@ -3,11 +3,10 @@
 Matrix5x3 m = Matrix5x3::Random();
 cout << "Here is the matrix m:" << endl << m << endl;
 Eigen::FullPivLU<Matrix5x3> lu(m);
-cout << "Here is, up to permutations, its LU decomposition matrix:"
-     << endl << lu.matrixLU() << endl;
+cout << "Here is, up to permutations, its LU decomposition matrix:" << endl << lu.matrixLU() << endl;
 cout << "Here is the L part:" << endl;
 Matrix5x5 l = Matrix5x5::Identity();
-l.block<5,3>(0,0).triangularView<StrictlyLower>() = lu.matrixLU();
+l.block<5, 3>(0, 0).triangularView<StrictlyLower>() = lu.matrixLU();
 cout << l << endl;
 cout << "Here is the U part:" << endl;
 Matrix5x3 u = lu.matrixLU().triangularView<Upper>();
diff --git a/doc/snippets/compile_snippet.cpp.in b/doc/snippets/compile_snippet.cpp.in
index 04f276d..e841f43 100644
--- a/doc/snippets/compile_snippet.cpp.in
+++ b/doc/snippets/compile_snippet.cpp.in
@@ -1,5 +1,10 @@
 static bool eigen_did_assert = false;
-#define eigen_assert(X) if(!eigen_did_assert && !(X)){ std::cout << "### Assertion raised in " << __FILE__ << ":" << __LINE__ << ":\n" #X << "\n### The following would happen without assertions:\n"; eigen_did_assert = true;}
+#define eigen_assert(X)                                                                \
+  if (!eigen_did_assert && !(X)) {                                                     \
+    std::cout << "### Assertion raised in " << __FILE__ << ":" << __LINE__ << ":\n" #X \
+              << "\n### The following would happen without assertions:\n";             \
+    eigen_did_assert = true;                                                           \
+  }
 
 #include <iostream>
 #include <cassert>
@@ -9,12 +14,10 @@
 #define M_PI 3.1415926535897932384626433832795
 #endif
 
-
 using namespace Eigen;
 using namespace std;
 
-int main(int, char**)
-{
+int main(int, char**) {
   cout.precision(3);
 // intentionally remove indentation of snippet
 {
diff --git a/doc/snippets/tut_arithmetic_redux_minmax.cpp b/doc/snippets/tut_arithmetic_redux_minmax.cpp
index f4ae7f4..dc43358 100644
--- a/doc/snippets/tut_arithmetic_redux_minmax.cpp
+++ b/doc/snippets/tut_arithmetic_redux_minmax.cpp
@@ -1,12 +1,10 @@
-  Matrix3f m = Matrix3f::Random();
-  std::ptrdiff_t i, j;
-  float minOfM = m.minCoeff(&i,&j);
-  cout << "Here is the matrix m:\n" << m << endl;
-  cout << "Its minimum coefficient (" << minOfM 
-       << ") is at position (" << i << "," << j << ")\n\n";
+Matrix3f m = Matrix3f::Random();
+std::ptrdiff_t i, j;
+float minOfM = m.minCoeff(&i, &j);
+cout << "Here is the matrix m:\n" << m << endl;
+cout << "Its minimum coefficient (" << minOfM << ") is at position (" << i << "," << j << ")\n\n";
 
-  RowVector4i v = RowVector4i::Random();
-  int maxOfV = v.maxCoeff(&i);
-  cout << "Here is the vector v: " << v << endl;
-  cout << "Its maximum coefficient (" << maxOfV 
-       << ") is at position " << i << endl;
+RowVector4i v = RowVector4i::Random();
+int maxOfV = v.maxCoeff(&i);
+cout << "Here is the vector v: " << v << endl;
+cout << "Its maximum coefficient (" << maxOfV << ") is at position " << i << endl;
diff --git a/doc/snippets/tut_arithmetic_transpose_aliasing.cpp b/doc/snippets/tut_arithmetic_transpose_aliasing.cpp
index f82e6f2..75d46cf 100644
--- a/doc/snippets/tut_arithmetic_transpose_aliasing.cpp
+++ b/doc/snippets/tut_arithmetic_transpose_aliasing.cpp
@@ -1,5 +1,6 @@
-Matrix2i a; a << 1, 2, 3, 4;
+Matrix2i a;
+a << 1, 2, 3, 4;
 cout << "Here is the matrix a:\n" << a << endl;
 
-a = a.transpose(); // !!! do NOT do this !!!
+a = a.transpose();  // !!! do NOT do this !!!
 cout << "and the result of the aliasing effect:\n" << a << endl;
diff --git a/doc/snippets/tut_arithmetic_transpose_conjugate.cpp b/doc/snippets/tut_arithmetic_transpose_conjugate.cpp
index 88496b2..3b356d2 100644
--- a/doc/snippets/tut_arithmetic_transpose_conjugate.cpp
+++ b/doc/snippets/tut_arithmetic_transpose_conjugate.cpp
@@ -1,12 +1,8 @@
-MatrixXcf a = MatrixXcf::Random(2,2);
+MatrixXcf a = MatrixXcf::Random(2, 2);
 cout << "Here is the matrix a\n" << a << endl;
 
 cout << "Here is the matrix a^T\n" << a.transpose() << endl;
 
-
 cout << "Here is the conjugate of a\n" << a.conjugate() << endl;
 
-
 cout << "Here is the matrix a^*\n" << a.adjoint() << endl;
-
-
diff --git a/doc/snippets/tut_arithmetic_transpose_inplace.cpp b/doc/snippets/tut_arithmetic_transpose_inplace.cpp
index 5c81c9e..dbf8bc4 100644
--- a/doc/snippets/tut_arithmetic_transpose_inplace.cpp
+++ b/doc/snippets/tut_arithmetic_transpose_inplace.cpp
@@ -1,6 +1,6 @@
-MatrixXf a(2,3); a << 1, 2, 3, 4, 5, 6;
+MatrixXf a(2, 3);
+a << 1, 2, 3, 4, 5, 6;
 cout << "Here is the initial matrix a:\n" << a << endl;
 
-
 a.transposeInPlace();
 cout << "and after being transposed:\n" << a << endl;
diff --git a/doc/snippets/tut_matrix_assignment_resizing.cpp b/doc/snippets/tut_matrix_assignment_resizing.cpp
index cf18998..9f5da43 100644
--- a/doc/snippets/tut_matrix_assignment_resizing.cpp
+++ b/doc/snippets/tut_matrix_assignment_resizing.cpp
@@ -1,5 +1,5 @@
-MatrixXf a(2,2);
+MatrixXf a(2, 2);
 std::cout << "a is of size " << a.rows() << "x" << a.cols() << std::endl;
-MatrixXf b(3,3);
+MatrixXf b(3, 3);
 a = b;
 std::cout << "a is now of size " << a.rows() << "x" << a.cols() << std::endl;
diff --git a/doc/special_examples/Tutorial_sparse_example.cpp b/doc/special_examples/Tutorial_sparse_example.cpp
index 8850db0..b8994ba 100644
--- a/doc/special_examples/Tutorial_sparse_example.cpp
+++ b/doc/special_examples/Tutorial_sparse_example.cpp
@@ -2,28 +2,27 @@
 #include <vector>
 #include <iostream>
 
-typedef Eigen::SparseMatrix<double> SpMat; // declares a column-major sparse matrix type of double
+typedef Eigen::SparseMatrix<double> SpMat;  // declares a column-major sparse matrix type of double
 typedef Eigen::Triplet<double> T;
 
 void buildProblem(std::vector<T>& coefficients, Eigen::VectorXd& b, int n);
 void saveAsBitmap(const Eigen::VectorXd& x, int n, const char* filename);
 
-int main(int argc, char** argv)
-{
-  if(argc!=2) {
+int main(int argc, char** argv) {
+  if (argc != 2) {
     std::cerr << "Error: expected one and only one argument.\n";
     return -1;
   }
-  
-  int n = 300;  // size of the image
-  int m = n*n;  // number of unknowns (=number of pixels)
+
+  int n = 300;    // size of the image
+  int m = n * n;  // number of unknowns (=number of pixels)
 
   // Assembly:
-  std::vector<T> coefficients;            // list of non-zeros coefficients
-  Eigen::VectorXd b(m);                   // the right hand side-vector resulting from the constraints
+  std::vector<T> coefficients;  // list of non-zeros coefficients
+  Eigen::VectorXd b(m);         // the right hand side-vector resulting from the constraints
   buildProblem(coefficients, b, n);
 
-  SpMat A(m,m);
+  SpMat A(m, m);
   A.setFromTriplets(coefficients.begin(), coefficients.end());
 
   // Solving:
@@ -35,4 +34,3 @@
 
   return 0;
 }
-
diff --git a/doc/special_examples/Tutorial_sparse_example_details.cpp b/doc/special_examples/Tutorial_sparse_example_details.cpp
index bc18b01..18abd6f 100644
--- a/doc/special_examples/Tutorial_sparse_example_details.cpp
+++ b/doc/special_examples/Tutorial_sparse_example_details.cpp
@@ -2,43 +2,41 @@
 #include <vector>
 #include <QImage>
 
-typedef Eigen::SparseMatrix<double> SpMat; // declares a column-major sparse matrix type of double
+typedef Eigen::SparseMatrix<double> SpMat;  // declares a column-major sparse matrix type of double
 typedef Eigen::Triplet<double> T;
 
-void insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs,
-                       Eigen::VectorXd& b, const Eigen::VectorXd& boundary)
-{
+void insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs, Eigen::VectorXd& b,
+                       const Eigen::VectorXd& boundary) {
   int n = int(boundary.size());
-  int id1 = i+j*n;
+  int id1 = i + j * n;
 
-        if(i==-1 || i==n) b(id) -= w * boundary(j); // constrained coefficient
-  else  if(j==-1 || j==n) b(id) -= w * boundary(i); // constrained coefficient
-  else  coeffs.push_back(T(id,id1,w));              // unknown coefficient
+  if (i == -1 || i == n)
+    b(id) -= w * boundary(j);  // constrained coefficient
+  else if (j == -1 || j == n)
+    b(id) -= w * boundary(i);  // constrained coefficient
+  else
+    coeffs.push_back(T(id, id1, w));  // unknown coefficient
 }
 
-void buildProblem(std::vector<T>& coefficients, Eigen::VectorXd& b, int n)
-{
+void buildProblem(std::vector<T>& coefficients, Eigen::VectorXd& b, int n) {
   b.setZero();
-  Eigen::ArrayXd boundary = Eigen::ArrayXd::LinSpaced(n, 0,M_PI).sin().pow(2);
-  for(int j=0; j<n; ++j)
-  {
-    for(int i=0; i<n; ++i)
-    {
-      int id = i+j*n;
-      insertCoefficient(id, i-1,j, -1, coefficients, b, boundary);
-      insertCoefficient(id, i+1,j, -1, coefficients, b, boundary);
-      insertCoefficient(id, i,j-1, -1, coefficients, b, boundary);
-      insertCoefficient(id, i,j+1, -1, coefficients, b, boundary);
-      insertCoefficient(id, i,j,    4, coefficients, b, boundary);
+  Eigen::ArrayXd boundary = Eigen::ArrayXd::LinSpaced(n, 0, M_PI).sin().pow(2);
+  for (int j = 0; j < n; ++j) {
+    for (int i = 0; i < n; ++i) {
+      int id = i + j * n;
+      insertCoefficient(id, i - 1, j, -1, coefficients, b, boundary);
+      insertCoefficient(id, i + 1, j, -1, coefficients, b, boundary);
+      insertCoefficient(id, i, j - 1, -1, coefficients, b, boundary);
+      insertCoefficient(id, i, j + 1, -1, coefficients, b, boundary);
+      insertCoefficient(id, i, j, 4, coefficients, b, boundary);
     }
   }
 }
 
-void saveAsBitmap(const Eigen::VectorXd& x, int n, const char* filename)
-{
-  Eigen::Array<unsigned char,Eigen::Dynamic,Eigen::Dynamic> bits = (x*255).cast<unsigned char>();
-  QImage img(bits.data(), n,n,QImage::Format_Indexed8);
+void saveAsBitmap(const Eigen::VectorXd& x, int n, const char* filename) {
+  Eigen::Array<unsigned char, Eigen::Dynamic, Eigen::Dynamic> bits = (x * 255).cast<unsigned char>();
+  QImage img(bits.data(), n, n, QImage::Format_Indexed8);
   img.setColorCount(256);
-  for(int i=0;i<256;i++) img.setColor(i,qRgb(i,i,i));
+  for (int i = 0; i < 256; i++) img.setColor(i, qRgb(i, i, i));
   img.save(filename);
 }
diff --git a/doc/special_examples/random_cpp11.cpp b/doc/special_examples/random_cpp11.cpp
index bd73800..a59613a 100644
--- a/doc/special_examples/random_cpp11.cpp
+++ b/doc/special_examples/random_cpp11.cpp
@@ -5,8 +5,8 @@
 int main() {
   std::default_random_engine generator;
   std::poisson_distribution<int> distribution(4.1);
-  auto poisson = [&] () {return distribution(generator);};
+  auto poisson = [&]() { return distribution(generator); };
 
-  Eigen::RowVectorXi v = Eigen::RowVectorXi::NullaryExpr(10, poisson );
+  Eigen::RowVectorXi v = Eigen::RowVectorXi::NullaryExpr(10, poisson);
   std::cout << v << "\n";
 }
diff --git a/doc/tutorial.cpp b/doc/tutorial.cpp
index 62be7c2..7e58b61 100644
--- a/doc/tutorial.cpp
+++ b/doc/tutorial.cpp
@@ -1,7 +1,6 @@
 #include <Eigen/Array>
 
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
   std::cout.precision(2);
 
   // demo static functions
@@ -13,29 +12,29 @@
   // demo non-static set... functions
   m4.setZero();
   m3.diagonal().setOnes();
-  
+
   std::cout << "*** Step 2 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl;
 
   // demo fixed-size block() expression as lvalue and as rvalue
-  m4.block<3,3>(0,1) = m3;
-  m3.row(2) = m4.block<1,3>(2,0);
+  m4.block<3, 3>(0, 1) = m3;
+  m3.row(2) = m4.block<1, 3>(2, 0);
 
   std::cout << "*** Step 3 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl;
 
   // demo dynamic-size block()
   {
     int rows = 3, cols = 3;
-    m4.block(0,1,3,3).setIdentity();
+    m4.block(0, 1, 3, 3).setIdentity();
     std::cout << "*** Step 4 ***\nm4:\n" << m4 << std::endl;
   }
 
   // demo vector blocks
-  m4.diagonal().block(1,2).setOnes();
+  m4.diagonal().block(1, 2).setOnes();
   std::cout << "*** Step 5 ***\nm4.diagonal():\n" << m4.diagonal() << std::endl;
   std::cout << "m4.diagonal().start(3)\n" << m4.diagonal().start(3) << std::endl;
 
   // demo coeff-wise operations
-  m4 = m4.cwise()*m4;
+  m4 = m4.cwise() * m4;
   m3 = m3.cwise().cos();
   std::cout << "*** Step 6 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl;
 
@@ -46,17 +45,17 @@
   std::cout << "m4.rowwise().sum():\n" << m4.rowwise().sum() << std::endl;
 
   // demo intelligent auto-evaluation
-  m4 = m4 * m4; // auto-evaluates so no aliasing problem (performance penalty is low)
-  Eigen::Matrix4f other = (m4 * m4).lazy(); // forces lazy evaluation
-  m4 = m4 + m4; // here Eigen goes for lazy evaluation, as with most expressions
-  m4 = -m4 + m4 + 5 * m4; // same here, Eigen chooses lazy evaluation for all that.
-  m4 = m4 * (m4 + m4); // here Eigen chooses to first evaluate m4 + m4 into a temporary.
-                       // indeed, here it is an optimization to cache this intermediate result.
-  m3 = m3 * m4.block<3,3>(1,1); // here Eigen chooses NOT to evaluate block() into a temporary
-    // because accessing coefficients of that block expression is not more costly than accessing
-    // coefficients of a plain matrix.
-  m4 = m4 * m4.transpose(); // same here, lazy evaluation of the transpose.
-  m4 = m4 * m4.transpose().eval(); // forces immediate evaluation of the transpose
+  m4 = m4 * m4;                              // auto-evaluates so no aliasing problem (performance penalty is low)
+  Eigen::Matrix4f other = (m4 * m4).lazy();  // forces lazy evaluation
+  m4 = m4 + m4;                              // here Eigen goes for lazy evaluation, as with most expressions
+  m4 = -m4 + m4 + 5 * m4;                    // same here, Eigen chooses lazy evaluation for all that.
+  m4 = m4 * (m4 + m4);                       // here Eigen chooses to first evaluate m4 + m4 into a temporary.
+                                             // indeed, here it is an optimization to cache this intermediate result.
+  m3 = m3 * m4.block<3, 3>(1, 1);            // here Eigen chooses NOT to evaluate block() into a temporary
+                                   // because accessing coefficients of that block expression is not more costly than
+                                   // accessing coefficients of a plain matrix.
+  m4 = m4 * m4.transpose();         // same here, lazy evaluation of the transpose.
+  m4 = m4 * m4.transpose().eval();  // forces immediate evaluation of the transpose
 
   std::cout << "*** Step 8 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl;
 }