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

explicit instanciation

Former-commit-id: d7cdf1980ea706b3c1ab4f149a4f56a486ce9227
Alec Jacobson (jalec 11 жил өмнө
parent
commit
a1b5fdeea3

+ 6 - 4
include/igl/cotangent.cpp

@@ -50,10 +50,10 @@ IGL_INLINE void igl::cotangent(const MatV & V, const MatF & F, MatC & C)
   }else if(simplex_size == 4)
   {
     // Tetrahedra
-    typedef Matrix<typename MatC::Scalar,3,1> Vec3;
-    typedef Matrix<typename MatC::Scalar,3,3> Mat3;
-    typedef Matrix<typename MatC::Scalar,3,4> Mat3x4;
-    typedef Matrix<typename MatC::Scalar,4,4> Mat4x4;
+    typedef Matrix<typename MatV::Scalar,3,1> Vec3;
+    typedef Matrix<typename MatV::Scalar,3,3> Mat3;
+    typedef Matrix<typename MatV::Scalar,3,4> Mat3x4;
+    typedef Matrix<typename MatV::Scalar,4,4> Mat4x4;
 
     // preassemble right hand side
     // COLUMN-MAJOR ORDER FOR LAPACK
@@ -132,6 +132,8 @@ IGL_INLINE void igl::cotangent(const MatV & V, const MatF & F, MatC & C)
 #ifndef IGL_HEADER_ONLY
 // Explicit template specialization
 // generated by autoexplicit.sh
+template void igl::cotangent<Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> >, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> >, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&);
+// generated by autoexplicit.sh
 template void igl::cotangent<Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&);
 // generated by autoexplicit.sh
 template void igl::cotangent<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&);

+ 5 - 1
include/igl/doublearea.cpp

@@ -21,12 +21,13 @@ IGL_INLINE void igl::doublearea(
   const Eigen::PlainObjectBase<Derivedl> & l, 
   Eigen::PlainObjectBase<DeriveddblA> & dblA)
 {
+  using namespace Eigen;
   // Only support triangles
   assert(l.cols() == 3);
   // Number of triangles
   const int m = l.rows();
   // semiperimeters
-  Eigen::PlainObjectBase<Derivedl> s = l.rowwise().sum()*0.5;
+  Matrix<typename Derivedl::Scalar,Dynamic,1> s = l.rowwise().sum()*0.5;
   assert(s.rows() == m);
   // resize output
   dblA.resize(l.rows(),1);
@@ -38,6 +39,9 @@ IGL_INLINE void igl::doublearea(
 }
 
 #ifndef IGL_HEADER_ONLY
+// Explicit template specialization
+// generated by autoexplicit.sh
+template void igl::doublearea<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
 template void igl::doublearea<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
 template void igl::doublearea<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
 template void igl::doublearea<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);

+ 2 - 0
include/igl/edge_lengths.cpp

@@ -19,5 +19,7 @@ IGL_INLINE void igl::edge_lengths(
 
 #ifndef IGL_HEADER_ONLY
 // Explicit template specialization
+// generated by autoexplicit.sh
+template void igl::edge_lengths<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1>, Eigen::Matrix<float, -1, 3, 1, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> >&);
 template void igl::edge_lengths<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 #endif

+ 2 - 0
include/igl/is_manifold.cpp

@@ -39,6 +39,8 @@ IGL_INLINE bool igl::is_manifold(const Eigen::PlainObjectBase<DerivedV>& /*V*/,
 #ifndef IGL_HEADER_ONLY
 // Explicit template specialization
 // generated by autoexplicit.sh
+template bool igl::is_manifold<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&);
+// generated by autoexplicit.sh
 //template bool igl::is_manifold<double>(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&);
 template bool igl::is_manifold<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
 #endif

+ 2 - 0
include/igl/slice.h

@@ -7,6 +7,8 @@
 
 namespace igl
 {
+  // THIS MAY HAVE BEEN SUPERSEDED BY EIGEN'S select FUNCTION
+  // 
   // Act like the matlab X(row_indices,col_indices) operator
   // 
   // Inputs: