py_slice_into.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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"));