Browse Source

# fix issue

- make sure to create M.diagonal().transpose() as M_diag_tr
- using proper type: double -> Scalar
Seung-Tak Noh 6 years ago
parent
commit
a65d3d2bef
1 changed files with 2 additions and 1 deletions
  1. 2 1
      include/igl/heat_geodesics.cpp

+ 2 - 1
include/igl/heat_geodesics.cpp

@@ -84,7 +84,8 @@ IGL_INLINE bool igl::heat_geodesics_precompute(
         return false;
       }
     }
-    const Eigen::SparseMatrix<double> Aeq = M.diagonal().transpose().sparseView();
+    const DerivedV M_diag_tr = M.diagonal().transpose();
+    const Eigen::SparseMatrix<Scalar> Aeq = M_diag_tr.sparseView();
     L *= -0.5;
     if(!igl::min_quad_with_fixed_precompute(
       L,Eigen::VectorXi(),Aeq,true,data.Poisson))