소스 검색

added sparse matrix size in matlab_format
small changes


Former-commit-id: 5635fb69d08a8e68626466543c6ebb4a3393c793

Olga Diamanti 9 년 전
부모
커밋
d3ed05c2ed
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      include/igl/matlab_format.cpp
  2. 1 1
      include/igl/polyvector_field_singularities_from_matchings.cpp
  3. 1 1
      include/igl/slice_into.cpp

+ 1 - 1
include/igl/matlab_format.cpp

@@ -54,7 +54,7 @@ igl::matlab_format(
   if(!name.empty())
   {
     prefix = name + "IJV = ";
-    suffix = "\n"+name + " = sparse("+name+"IJV(:,1),"+name+"IJV(:,2),"+name+"IJV(:,3));";
+    suffix = "\n"+name + " = sparse("+name+"IJV(:,1),"+name+"IJV(:,2),"+name+"IJV(:,3),"+std::to_string(S.rows())+","+std::to_string(S.cols())+" );";
   }
   return STR(""<<
     SIJV.format(Eigen::IOFormat(

+ 1 - 1
include/igl/polyvector_field_singularities_from_matchings.cpp

@@ -23,7 +23,7 @@ void igl::polyvector_field_one_ring_matchings(const Eigen::PlainObjectBase<Deriv
   mvi.resize(VF[vi].size()+1,1);
   fi.resize(VF[vi].size()+1,1);
   //start from one face
-  const int &fstart = VF[vi][0];
+  const int fstart = VF[vi][0];
   int current_face = fstart;
   int i =0;
   mvi[i] = vector_to_match;

+ 1 - 1
include/igl/slice_into.cpp

@@ -59,7 +59,7 @@ IGL_INLINE void igl::slice_into(
   int xn = X.cols();
 #ifndef NDEBUG
   assert(R.size() == xm);
-  assert(C.size() == xn);
+//  assert(C.size() == xn);
   int ym = Y.size();
   int yn = Y.size();
   assert(R.minCoeff() >= 0);