|
@@ -18,8 +18,8 @@ template <
|
|
typename DerivedIA,
|
|
typename DerivedIA,
|
|
typename DerivedLOCB>
|
|
typename DerivedLOCB>
|
|
IGL_INLINE void igl::ismember(
|
|
IGL_INLINE void igl::ismember(
|
|
- const Eigen::PlainObjectBase<DerivedA> & A,
|
|
|
|
- const Eigen::PlainObjectBase<DerivedB> & B,
|
|
|
|
|
|
+ const Eigen::MatrixBase<DerivedA> & A,
|
|
|
|
+ const Eigen::MatrixBase<DerivedB> & B,
|
|
Eigen::PlainObjectBase<DerivedIA> & IA,
|
|
Eigen::PlainObjectBase<DerivedIA> & IA,
|
|
Eigen::PlainObjectBase<DerivedLOCB> & LOCB)
|
|
Eigen::PlainObjectBase<DerivedLOCB> & LOCB)
|
|
{
|
|
{
|
|
@@ -42,8 +42,8 @@ IGL_INLINE void igl::ismember(
|
|
// Get rid of any duplicates
|
|
// Get rid of any duplicates
|
|
typedef Matrix<typename DerivedA::Scalar,Dynamic,1> VectorA;
|
|
typedef Matrix<typename DerivedA::Scalar,Dynamic,1> VectorA;
|
|
typedef Matrix<typename DerivedB::Scalar,Dynamic,1> VectorB;
|
|
typedef Matrix<typename DerivedB::Scalar,Dynamic,1> VectorB;
|
|
- const VectorA vA(Eigen::Map<const VectorA>(A.data(), A.cols()*A.rows(),1));
|
|
|
|
- const VectorB vB(Eigen::Map<const VectorB>(B.data(), B.cols()*B.rows(),1));
|
|
|
|
|
|
+ const VectorA vA(Eigen::Map<const VectorA>(DerivedA(A).data(), A.cols()*A.rows(),1));
|
|
|
|
+ const VectorB vB(Eigen::Map<const VectorB>(DerivedB(B).data(), B.cols()*B.rows(),1));
|
|
VectorA uA;
|
|
VectorA uA;
|
|
VectorB uB;
|
|
VectorB uB;
|
|
Eigen::Matrix<typename DerivedA::Index,Dynamic,1> uIA,uIuA,uIB,uIuB;
|
|
Eigen::Matrix<typename DerivedA::Index,Dynamic,1> uIA,uIuA,uIB,uIuB;
|
|
@@ -97,8 +97,8 @@ template <
|
|
typename DerivedIA,
|
|
typename DerivedIA,
|
|
typename DerivedLOCB>
|
|
typename DerivedLOCB>
|
|
IGL_INLINE void igl::ismember_rows(
|
|
IGL_INLINE void igl::ismember_rows(
|
|
- const Eigen::PlainObjectBase<DerivedA> & A,
|
|
|
|
- const Eigen::PlainObjectBase<DerivedB> & B,
|
|
|
|
|
|
+ const Eigen::MatrixBase<DerivedA> & A,
|
|
|
|
+ const Eigen::MatrixBase<DerivedB> & B,
|
|
Eigen::PlainObjectBase<DerivedIA> & IA,
|
|
Eigen::PlainObjectBase<DerivedIA> & IA,
|
|
Eigen::PlainObjectBase<DerivedLOCB> & LOCB)
|
|
Eigen::PlainObjectBase<DerivedLOCB> & LOCB)
|
|
{
|
|
{
|
|
@@ -174,6 +174,8 @@ IGL_INLINE void igl::ismember_rows(
|
|
|
|
|
|
#ifdef IGL_STATIC_LIBRARY
|
|
#ifdef IGL_STATIC_LIBRARY
|
|
// Explicit template instantiation
|
|
// Explicit template instantiation
|
|
-template void igl::ismember<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<bool, -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> > const&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
|
|
|
|
-template void igl::ismember_rows<Eigen::Matrix<int, -1, 2, 0, -1, 2>, Eigen::Matrix<int, -1, 2, 0, -1, 2>, Eigen::Array<bool, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> > const&, Eigen::PlainObjectBase<Eigen::Array<bool, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
|
|
|
|
|
|
+template void igl::ismember<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<bool, -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::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
|
|
|
|
+template void igl::ismember_rows<Eigen::Matrix<int, -1, 2, 0, -1, 2>, Eigen::Matrix<int, -1, 2, 0, -1, 2>, Eigen::Array<bool, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> > const&, Eigen::PlainObjectBase<Eigen::Array<bool, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
|
|
|
|
+template void igl::ismember_rows<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<bool, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
|
|
|
|
+template void igl::ismember_rows<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<bool, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
|
|
#endif
|
|
#endif
|