Browse Source

Merge pull request #917 from unclejimbo/fix-redux

Fix redux

Former-commit-id: ae30d97242c2c974352adc631d1480b1f9e0bdf8
Alec Jacobson 6 năm trước cách đây
mục cha
commit
5f428b210e
2 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 2 2
      include/igl/redux.h
  2. 0 1
      tutorial/505_MIQ/main.cpp

+ 2 - 2
include/igl/redux.h

@@ -34,7 +34,6 @@ namespace igl
 
 // Implementation
 
-#include "redux.h"
 #include "for_each.h"
 
 template <typename AType, typename Func, typename DerivedB>
@@ -44,13 +43,14 @@ inline void igl::redux(
   const Func & func,
   Eigen::PlainObjectBase<DerivedB> & B)
 {
+  typedef typename Eigen::SparseMatrix<AType>::StorageIndex Index;
   assert((dim == 1 || dim == 2) && "dim must be 2 or 1");
   // Get size of input
   int m = A.rows();
   int n = A.cols();
   // resize output
   B = DerivedB::Zero(dim==1?n:m);
-  const auto func_wrap = [&func,&B,&dim](const int i, const int j, const int v)
+  const auto func_wrap = [&func,&B,&dim](const Index i, const Index j, const AType v)
   {
     if(dim == 1)
     {

+ 0 - 1
tutorial/505_MIQ/main.cpp

@@ -240,7 +240,6 @@ int main(int argc, char *argv[])
   double iter = 0;
   double stiffness = 5.0;
   bool direct_round = 0;
-  std::string filename = "/Users/daniele/x.dat";
 
   // Compute face barycenters
   igl::barycenter(V, F, B);