py_slice_into.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. m.def("slice_into", []
  2. (
  3. const Eigen::SparseMatrix<double>& X,
  4. const Eigen::MatrixXi& R,
  5. const Eigen::MatrixXi& C,
  6. Eigen::SparseMatrix<double>& Y
  7. )
  8. {
  9. assert_is_VectorX("R",R);
  10. assert_is_VectorX("C",C);
  11. return igl::slice_into(X,R,C,Y);
  12. }, __doc_igl_slice_into,
  13. py::arg("X"), py::arg("R"), py::arg("C"), py::arg("Y"));
  14. m.def("slice_into", []
  15. (
  16. const Eigen::MatrixXd& X,
  17. const Eigen::MatrixXi& R,
  18. const Eigen::MatrixXi& C,
  19. Eigen::MatrixXd& Y
  20. )
  21. {
  22. assert_is_VectorX("R",R);
  23. assert_is_VectorX("C",C);
  24. return igl::slice_into(X,R,C,Y);
  25. }, __doc_igl_slice_into,
  26. py::arg("X"), py::arg("R"), py::arg("C"), py::arg("Y"));
  27. m.def("slice_into", []
  28. (
  29. const Eigen::MatrixXd& X,
  30. const Eigen::MatrixXi& R,
  31. const int& dim,
  32. Eigen::MatrixXd& Y
  33. )
  34. {
  35. assert_is_VectorX("R",R);
  36. return igl::slice_into(X,R,dim,Y);
  37. }, __doc_igl_slice_into,
  38. py::arg("X"), py::arg("R"), py::arg("dim"), py::arg("Y"));
  39. m.def("slice_into", []
  40. (
  41. const Eigen::MatrixXd& X,
  42. const Eigen::MatrixXi& R,
  43. Eigen::MatrixXd& Y
  44. )
  45. {
  46. assert_is_VectorX("R",R);
  47. return igl::slice_into(X,R,Y);
  48. }, __doc_igl_slice_into,
  49. py::arg("X"), py::arg("R"), py::arg("Y"));
  50. // int
  51. m.def("slice_into", []
  52. (
  53. const Eigen::SparseMatrix<int>& X,
  54. const Eigen::MatrixXi& R,
  55. const Eigen::MatrixXi& C,
  56. Eigen::SparseMatrix<int>& Y
  57. )
  58. {
  59. assert_is_VectorX("R",R);
  60. assert_is_VectorX("C",C);
  61. return igl::slice_into(X,R,C,Y);
  62. }, __doc_igl_slice_into,
  63. py::arg("X"), py::arg("R"), py::arg("C"), py::arg("Y"));
  64. m.def("slice_into", []
  65. (
  66. const Eigen::MatrixXi& X,
  67. const Eigen::MatrixXi& R,
  68. const Eigen::MatrixXi& C,
  69. Eigen::MatrixXi& Y
  70. )
  71. {
  72. assert_is_VectorX("R",R);
  73. assert_is_VectorX("C",C);
  74. return igl::slice_into(X,R,C,Y);
  75. }, __doc_igl_slice_into,
  76. py::arg("X"), py::arg("R"), py::arg("C"), py::arg("Y"));
  77. m.def("slice_into", []
  78. (
  79. const Eigen::MatrixXi& X,
  80. const Eigen::MatrixXi& R,
  81. const int& dim,
  82. Eigen::MatrixXi& Y
  83. )
  84. {
  85. assert_is_VectorX("R",R);
  86. return igl::slice_into(X,R,dim,Y);
  87. }, __doc_igl_slice_into,
  88. py::arg("X"), py::arg("R"), py::arg("dim"), py::arg("Y"));
  89. m.def("slice_into", []
  90. (
  91. const Eigen::MatrixXi& X,
  92. const Eigen::MatrixXi& R,
  93. Eigen::MatrixXi& Y
  94. )
  95. {
  96. assert_is_VectorX("R",R);
  97. return igl::slice_into(X,R,Y);
  98. }, __doc_igl_slice_into,
  99. py::arg("X"), py::arg("R"), py::arg("Y"));