py_slice_mask.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. m.def("slice_mask", []
  2. (
  3. const Eigen::MatrixXd& X,
  4. const Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic> & R,
  5. const Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic> & C,
  6. Eigen::MatrixXd& Y
  7. )
  8. {
  9. assert_is_VectorX("R",R);
  10. assert_is_VectorX("C",C);
  11. return igl::slice_mask(X, R, C, Y);
  12. }, __doc_igl_slice_mask,
  13. py::arg("X"), py::arg("R"), py::arg("C"), py::arg("Y"));
  14. m.def("slice_mask", []
  15. (
  16. const Eigen::MatrixXd& X,
  17. const Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic> & R,
  18. const int dim,
  19. Eigen::MatrixXd& Y
  20. )
  21. {
  22. assert_is_VectorX("R",R);
  23. return igl::slice_mask(X, R, dim, Y);
  24. }, __doc_igl_slice_mask,
  25. py::arg("X"), py::arg("R"), py::arg("dim"), py::arg("Y"));
  26. m.def("slice_mask", []
  27. (
  28. const Eigen::MatrixXi& X,
  29. const Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic> & R,
  30. const Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic> & C,
  31. Eigen::MatrixXi& Y
  32. )
  33. {
  34. assert_is_VectorX("R",R);
  35. assert_is_VectorX("C",C);
  36. return igl::slice_mask(X, R, C, Y);
  37. }, __doc_igl_slice_mask,
  38. py::arg("X"), py::arg("R"), py::arg("C"), py::arg("Y"));
  39. m.def("slice_mask", []
  40. (
  41. const Eigen::MatrixXi& X,
  42. const Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic> & R,
  43. const int dim,
  44. Eigen::MatrixXi& Y
  45. )
  46. {
  47. assert_is_VectorX("R",R);
  48. return igl::slice_mask(X, R, dim, Y);
  49. }, __doc_igl_slice_mask,
  50. py::arg("X"), py::arg("R"), py::arg("dim"), py::arg("Y"));
  51. //m.def("slice_mask", []
  52. //(
  53. // const Eigen::MatrixXd& X,
  54. // Eigen::Array<bool, Eigen::Dynamic, 1> & R,
  55. // Eigen::Array<bool, Eigen::Dynamic, 1> & C
  56. //)
  57. //{
  58. // return igl::slice_mask(X, R, C);
  59. //}, __doc_igl_slice_mask,
  60. //py::arg("X"), py::arg("R"), py::arg("C"));
  61. //m.def("slice_mask", []
  62. //(
  63. // const Eigen::MatrixXd& X,
  64. // Eigen::Array<bool, Eigen::Dynamic, 1> & R,
  65. // int dim
  66. //)
  67. //{
  68. // return igl::slice_mask(X, R, dim);
  69. //}, __doc_igl_slice_mask,
  70. //py::arg("X"), py::arg("R"), py::arg("dim"));