py_colon.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. m.def("colon", []
  2. (
  3. const double low,
  4. const double step,
  5. const double high,
  6. Eigen::MatrixXd& I
  7. )
  8. {
  9. Eigen::Matrix<double,Eigen::Dynamic,1> temp;
  10. igl::colon<double>(low,step,high,temp);
  11. I = temp;
  12. }, __doc_igl_colon,
  13. py::arg("low"), py::arg("step"), py::arg("high"), py::arg("I"));
  14. m.def("colon", []
  15. (
  16. const double low,
  17. const double high,
  18. Eigen::MatrixXd& I
  19. )
  20. {
  21. Eigen::Matrix<double,Eigen::Dynamic,1> temp;
  22. igl::colon<double>(low,high,temp);
  23. I = temp;
  24. }, __doc_igl_colon,
  25. py::arg("low"), py::arg("high"), py::arg("I"));
  26. m.def("colon", []
  27. (
  28. const double& low,
  29. const double& high
  30. )
  31. {
  32. return Eigen::MatrixXd(igl::colon<double>(low,high));
  33. }, __doc_igl_colon,
  34. py::arg("low"), py::arg("high"));
  35. m.def("coloni", []
  36. (
  37. const int low,
  38. const int step,
  39. const int high,
  40. Eigen::MatrixXi& I
  41. )
  42. {
  43. Eigen::Matrix<int,Eigen::Dynamic,1> temp;
  44. igl::colon<int>(low,step,high,temp);
  45. I = temp;
  46. }, __doc_igl_colon,
  47. py::arg("low"), py::arg("step"), py::arg("high"), py::arg("I"));
  48. m.def("coloni", []
  49. (
  50. const int low,
  51. const int high,
  52. Eigen::MatrixXi& I
  53. )
  54. {
  55. Eigen::Matrix<int,Eigen::Dynamic,1> temp;
  56. igl::colon<int>(low,high,temp);
  57. I = temp;
  58. }, __doc_igl_colon,
  59. py::arg("low"), py::arg("high"), py::arg("I"));
  60. m.def("coloni", []
  61. (
  62. const int& low,
  63. const int& high
  64. )
  65. {
  66. return Eigen::MatrixXi(igl::colon<int>(low,high));
  67. }, __doc_igl_colon,
  68. py::arg("low"), py::arg("high"));