浏览代码

Enforcing 80 character rule

Former-commit-id: a87a530b634dcddee1143f0d2ab5633c4fdcb6f1
Oded Stein 7 年之前
父节点
当前提交
8d398f2306
共有 4 个文件被更改,包括 24 次插入12 次删除
  1. 10 5
      include/igl/hessian.cpp
  2. 4 2
      include/igl/hessian.h
  3. 6 3
      include/igl/hessian_energy.cpp
  4. 4 2
      include/igl/hessian_energy.h

+ 10 - 5
include/igl/hessian.cpp

@@ -1,6 +1,7 @@
 // This file is part of libigl, a simple c++ geometry processing library.
 //
-// Copyright (C) 2017 Alec Jacobson <alecjacobson@gmail.com> and Oded Stein <oded.stein@columbia.edu>
+// Copyright (C) 2017 Alec Jacobson <alecjacobson@gmail.com>
+//  and Oded Stein <oded.stein@columbia.edu>
 //
 // This Source Code Form is subject to the terms of the Mozilla Public License
 // v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -24,18 +25,22 @@ IGL_INLINE void igl::hessian(
     typedef typename DerivedV::Scalar denseScalar;
     typedef typename Eigen::Matrix<denseScalar, Eigen::Dynamic, 1> VecXd;
     typedef typename Eigen::SparseMatrix<Scalar> SparseMat;
-    typedef typename Eigen::DiagonalMatrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> DiagMat;
+    typedef typename Eigen::DiagonalMatrix
+                       <Scalar, Eigen::Dynamic, Eigen::Dynamic> DiagMat;
     
     int dim = V.cols();
-    assert((dim==2 || dim==3) && "The dimension of the vertices should be 2 or 3");
+    assert((dim==2 || dim==3) &&
+           "The dimension of the vertices should be 2 or 3");
     
     //Construct the combined gradient matric
     SparseMat G;
-    igl::grad(Eigen::PlainObjectBase<DerivedV>(V), Eigen::PlainObjectBase<DerivedF>(F), G, false);
+    igl::grad(Eigen::PlainObjectBase<DerivedV>(V),
+              Eigen::PlainObjectBase<DerivedF>(F),
+              G, false);
     SparseMat GG(F.rows(), dim*V.rows());
     GG.reserve(G.nonZeros());
     for(int i=0; i<dim; ++i)
-        GG.middleCols(i*G.cols(), G.cols()) = G.middleRows(i*F.rows(), F.rows());
+        GG.middleCols(i*G.cols(),G.cols()) = G.middleRows(i*F.rows(),F.rows());
     SparseMat D;
     igl::repdiag(GG,dim,D);
     

+ 4 - 2
include/igl/hessian.h

@@ -1,6 +1,7 @@
 // This file is part of libigl, a simple c++ geometry processing library.
 //
-// Copyright (C) 2017 Alec Jacobson <alecjacobson@gmail.com> and Oded Stein <oded.stein@columbia.edu>
+// Copyright (C) 2017 Alec Jacobson <alecjacobson@gmail.com>
+//  and Oded Stein <oded.stein@columbia.edu>
 //
 // This Source Code Form is subject to the terms of the Mozilla Public License
 // v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -26,7 +27,8 @@ namespace igl
     //   V  #V by dim list of mesh vertex positions
     //   F  #F by 3 list of mesh faces (must be triangles)
     // Outputs:
-    //   H  #V by #V Hessian energy matrix, each column i corresponding to V(i,:)
+    //   H  #V by #V Hessian energy matrix, each column i
+    //     corresponding to V(i,:)
     //
     //
     //

+ 6 - 3
include/igl/hessian_energy.cpp

@@ -1,6 +1,7 @@
 // This file is part of libigl, a simple c++ geometry processing library.
 //
-// Copyright (C) 2017 Alec Jacobson <alecjacobson@gmail.com> and Oded Stein <oded.stein@columbia.edu>
+// Copyright (C) 2017 Alec Jacobson <alecjacobson@gmail.com>
+//   and Oded Stein <oded.stein@columbia.edu>
 //
 // This Source Code Form is subject to the terms of the Mozilla Public License
 // v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -22,10 +23,12 @@ IGL_INLINE void igl::hessian_energy(
     typedef typename DerivedV::Scalar denseScalar;
     typedef typename Eigen::Matrix<denseScalar, Eigen::Dynamic, 1> VecXd;
     typedef typename Eigen::SparseMatrix<Scalar> SparseMat;
-    typedef typename Eigen::DiagonalMatrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> DiagMat;
+    typedef typename Eigen::DiagonalMatrix
+                       <Scalar, Eigen::Dynamic, Eigen::Dynamic> DiagMat;
     
     int dim = V.cols();
-    assert((dim==2 || dim==3) && "The dimension of the vertices should be 2 or 3");
+    assert((dim==2 || dim==3) &&
+           "The dimension of the vertices should be 2 or 3");
     
     SparseMat M;
     igl::massmatrix(V,F,igl::MASSMATRIX_TYPE_VORONOI,M);

+ 4 - 2
include/igl/hessian_energy.h

@@ -1,6 +1,7 @@
 // This file is part of libigl, a simple c++ geometry processing library.
 //
-// Copyright (C) 2017 Alec Jacobson <alecjacobson@gmail.com> and Oded Stein <oded.stein@columbia.edu>
+// Copyright (C) 2017 Alec Jacobson <alecjacobson@gmail.com>
+//  and Oded Stein <oded.stein@columbia.edu>
 //
 // This Source Code Form is subject to the terms of the Mozilla Public License
 // v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -24,7 +25,8 @@ namespace igl
     //   V  #V by dim list of mesh vertex positions
     //   F  #F by 3 list of mesh faces (must be triangles)
     // Outputs:
-    //   Q  #V by #V Hessian energy matrix, each row/column i corresponding to V(i,:)
+    //   Q  #V by #V Hessian energy matrix, each row/column i
+    //     corresponding to V(i,:)
     //
     //
     //