diff --git a/include/igl/redux.h b/include/igl/redux.h index 38ce9395a..c5e24703a 100644 --- a/include/igl/redux.h +++ b/include/igl/redux.h @@ -44,13 +44,14 @@ inline void igl::redux( const Func & func, Eigen::PlainObjectBase & B) { + typedef typename Eigen::SparseMatrix::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) {