diff --git a/include/igl/adjacency_matrix.h b/include/igl/adjacency_matrix.h index b117bccf7..034804cfb 100644 --- a/include/igl/adjacency_matrix.h +++ b/include/igl/adjacency_matrix.h @@ -21,7 +21,7 @@ namespace igl // Inputs: // F #F by dim list of mesh simplices // Outputs: - // A max(F) by max(F) cotangent matrix, each row i corresponding to V(i,:) + // A max(F) by max(F) adjacency matrix, each row i corresponding to V(i,:) // // Example: // // Mesh in (V,F) diff --git a/include/igl/list_to_matrix.cpp b/include/igl/list_to_matrix.cpp index 769653d7b..f9aef7025 100644 --- a/include/igl/list_to_matrix.cpp +++ b/include/igl/list_to_matrix.cpp @@ -22,7 +22,11 @@ IGL_INLINE bool igl::list_to_matrix(const std::vector > & V,Eige int m = V.size(); if(m == 0) { - M.resize(0,0); + M.resize( + Derived::RowsAtCompileTime>=0?Derived::RowsAtCompileTime:0 + , + Derived::ColsAtCompileTime>=0?Derived::ColsAtCompileTime:0 + ); return true; } // number of columns