Эх сурвалжийг харах

added warning in sparse

Former-commit-id: f9429c45654f86ee75bed7a278e5d10ef18fafd0
Alec Jacobson (jalec 11 жил өмнө
parent
commit
8b9b21e163

+ 4 - 0
include/igl/sparse.cpp

@@ -66,6 +66,8 @@ IGL_INLINE void igl::sparse(
   const Eigen::PlainObjectBase<DerivedD>& D,
   Eigen::SparseMatrix<T>& X)
 {
+#warning "This is obsolete. Call .sparseView() instead"
+  assert(false);
   using namespace std;
   using namespace Eigen;
   vector<Triplet<T> > DIJV;
@@ -89,6 +91,8 @@ template <typename DerivedD>
 IGL_INLINE Eigen::SparseMatrix<typename DerivedD::Scalar > igl::sparse(
   const Eigen::PlainObjectBase<DerivedD>& D)
 {
+#warning "This is obsolete. Call .sparseView() instead"
+  assert(false);
   Eigen::SparseMatrix<typename DerivedD::Scalar > X;
   igl::sparse(D,X);
   return X;

+ 1 - 1
include/igl/sparse.h

@@ -40,7 +40,7 @@ namespace igl
     const size_t m,
     const size_t n,
     Eigen::SparseMatrix<T>& X);
-  // THIS MAY BE SUPERSEDED BY EIGEN'S .sparseView
+  // THIS MAY BE SUPERSEDED BY EIGEN'S .sparseView Indeed it is.
   // Convert a full, dense matrix to a sparse one
   //
   // Templates: