py_slice_into.cpp 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2017 Sebastian Koch <s.koch@tu-berlin.de> and Daniele Panozzo <daniele.panozzo@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. m.def("slice_into", []
  9. (
  10. const Eigen::SparseMatrix<double>& X,
  11. const Eigen::MatrixXi& R,
  12. const Eigen::MatrixXi& C,
  13. Eigen::SparseMatrix<double>& Y
  14. )
  15. {
  16. assert_is_VectorX("R",R);
  17. assert_is_VectorX("C",C);
  18. return igl::slice_into(X,R,C,Y);
  19. }, __doc_igl_slice_into,
  20. py::arg("X"), py::arg("R"), py::arg("C"), py::arg("Y"));
  21. m.def("slice_into", []
  22. (
  23. const Eigen::MatrixXd& X,
  24. const Eigen::MatrixXi& R,
  25. const Eigen::MatrixXi& C,
  26. Eigen::MatrixXd& Y
  27. )
  28. {
  29. assert_is_VectorX("R",R);
  30. assert_is_VectorX("C",C);
  31. return igl::slice_into(X,R,C,Y);
  32. }, __doc_igl_slice_into,
  33. py::arg("X"), py::arg("R"), py::arg("C"), py::arg("Y"));
  34. m.def("slice_into", []
  35. (
  36. const Eigen::MatrixXd& X,
  37. const Eigen::MatrixXi& R,
  38. const int& dim,
  39. Eigen::MatrixXd& Y
  40. )
  41. {
  42. assert_is_VectorX("R",R);
  43. return igl::slice_into(X,R,dim,Y);
  44. }, __doc_igl_slice_into,
  45. py::arg("X"), py::arg("R"), py::arg("dim"), py::arg("Y"));
  46. m.def("slice_into", []
  47. (
  48. const Eigen::MatrixXd& X,
  49. const Eigen::MatrixXi& R,
  50. Eigen::MatrixXd& Y
  51. )
  52. {
  53. assert_is_VectorX("R",R);
  54. return igl::slice_into(X,R,Y);
  55. }, __doc_igl_slice_into,
  56. py::arg("X"), py::arg("R"), py::arg("Y"));
  57. // int
  58. m.def("slice_into", []
  59. (
  60. const Eigen::SparseMatrix<int>& X,
  61. const Eigen::MatrixXi& R,
  62. const Eigen::MatrixXi& C,
  63. Eigen::SparseMatrix<int>& Y
  64. )
  65. {
  66. assert_is_VectorX("R",R);
  67. assert_is_VectorX("C",C);
  68. return igl::slice_into(X,R,C,Y);
  69. }, __doc_igl_slice_into,
  70. py::arg("X"), py::arg("R"), py::arg("C"), py::arg("Y"));
  71. m.def("slice_into", []
  72. (
  73. const Eigen::MatrixXi& X,
  74. const Eigen::MatrixXi& R,
  75. const Eigen::MatrixXi& C,
  76. Eigen::MatrixXi& Y
  77. )
  78. {
  79. assert_is_VectorX("R",R);
  80. assert_is_VectorX("C",C);
  81. return igl::slice_into(X,R,C,Y);
  82. }, __doc_igl_slice_into,
  83. py::arg("X"), py::arg("R"), py::arg("C"), py::arg("Y"));
  84. m.def("slice_into", []
  85. (
  86. const Eigen::MatrixXi& X,
  87. const Eigen::MatrixXi& R,
  88. const int& dim,
  89. Eigen::MatrixXi& Y
  90. )
  91. {
  92. assert_is_VectorX("R",R);
  93. return igl::slice_into(X,R,dim,Y);
  94. }, __doc_igl_slice_into,
  95. py::arg("X"), py::arg("R"), py::arg("dim"), py::arg("Y"));
  96. m.def("slice_into", []
  97. (
  98. const Eigen::MatrixXi& X,
  99. const Eigen::MatrixXi& R,
  100. Eigen::MatrixXi& Y
  101. )
  102. {
  103. assert_is_VectorX("R",R);
  104. return igl::slice_into(X,R,Y);
  105. }, __doc_igl_slice_into,
  106. py::arg("X"), py::arg("R"), py::arg("Y"));