Browse Source

better templating

Former-commit-id: 785334ca65922c89430c2ffc6ab39d407ebff0e8
Alec Jacobson 8 years ago
parent
commit
f5b39a8657
2 changed files with 4 additions and 4 deletions
  1. 3 3
      include/igl/on_boundary.cpp
  2. 1 1
      include/igl/on_boundary.h

+ 3 - 3
include/igl/on_boundary.cpp

@@ -114,7 +114,7 @@ IGL_INLINE void igl::on_boundary(
 
 
 template <typename DerivedT, typename DerivedI, typename DerivedC>
 template <typename DerivedT, typename DerivedI, typename DerivedC>
 IGL_INLINE void igl::on_boundary(
 IGL_INLINE void igl::on_boundary(
-  const Eigen::PlainObjectBase<DerivedT>& T,
+  const Eigen::MatrixBase<DerivedT>& T,
   Eigen::PlainObjectBase<DerivedI>& I,
   Eigen::PlainObjectBase<DerivedI>& I,
   Eigen::PlainObjectBase<DerivedC>& C)
   Eigen::PlainObjectBase<DerivedC>& C)
 {
 {
@@ -134,6 +134,6 @@ IGL_INLINE void igl::on_boundary(
 
 
 #ifdef IGL_STATIC_LIBRARY
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
-template void igl::on_boundary<Eigen::Matrix<int, -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<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
-template void igl::on_boundary<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Array<bool, -1, 1, 0, -1, 1>, Eigen::Array<bool, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Array<bool, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Array<bool, -1, -1, 0, -1, -1> >&);
+template void igl::on_boundary<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
+template void igl::on_boundary<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Array<bool, -1, 1, 0, -1, 1>, Eigen::Array<bool, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Array<bool, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Array<bool, -1, -1, 0, -1, -1> >&);
 #endif
 #endif

+ 1 - 1
include/igl/on_boundary.h

@@ -37,7 +37,7 @@ namespace igl
   //   DerivedC  bool-value: i.e. from MatrixXi
   //   DerivedC  bool-value: i.e. from MatrixXi
   template <typename DerivedT, typename DerivedI, typename DerivedC>
   template <typename DerivedT, typename DerivedI, typename DerivedC>
   IGL_INLINE void on_boundary(
   IGL_INLINE void on_boundary(
-    const Eigen::PlainObjectBase<DerivedT>& T,
+    const Eigen::MatrixBase<DerivedT>& T,
     Eigen::PlainObjectBase<DerivedI>& I,
     Eigen::PlainObjectBase<DerivedI>& I,
     Eigen::PlainObjectBase<DerivedC>& C);
     Eigen::PlainObjectBase<DerivedC>& C);
 }
 }