py_min_quad_with_fixed.cpp 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Wrap the data class, no properties are exposed since it is not necessary
  2. py::class_<igl::min_quad_with_fixed_data<double> > min_quad_with_fixed_data(m, "min_quad_with_fixed_data");
  3. min_quad_with_fixed_data
  4. .def(py::init<>());
  5. m.def("min_quad_with_fixed_precompute", []
  6. (
  7. const Eigen::SparseMatrix<double>& A,
  8. const Eigen::MatrixXi& known,
  9. const Eigen::SparseMatrix<double>& Aeq,
  10. const bool pd,
  11. igl::min_quad_with_fixed_data<double> & data
  12. )
  13. {
  14. assert_is_VectorX("known",known);
  15. return igl::min_quad_with_fixed_precompute(A,known,Aeq,pd,data);
  16. }, __doc_igl_min_quad_with_fixed,
  17. py::arg("A"), py::arg("known"), py::arg("Aeq"), py::arg("pd"), py::arg("data"));
  18. m.def("min_quad_with_fixed_solve", []
  19. (
  20. const igl::min_quad_with_fixed_data<double> & data,
  21. const Eigen::MatrixXd& B,
  22. const Eigen::MatrixXd& Y,
  23. const Eigen::MatrixXd & Beq,
  24. Eigen::MatrixXd& Z,
  25. Eigen::MatrixXd& sol
  26. )
  27. {
  28. assert_is_VectorX("B",B);
  29. assert_is_VectorX("Y",Y);
  30. assert_is_VectorX("Beq",Beq);
  31. return igl::min_quad_with_fixed_solve(data,B,Y,Beq,Z,sol);
  32. }, __doc_igl_min_quad_with_fixed,
  33. py::arg("data"), py::arg("B"), py::arg("Y"), py::arg("Beq"), py::arg("Z"), py::arg("sol"));
  34. m.def("min_quad_with_fixed_solve", []
  35. (
  36. const igl::min_quad_with_fixed_data<double> & data,
  37. const Eigen::MatrixXd& B,
  38. const Eigen::MatrixXd& Y,
  39. const Eigen::MatrixXd & Beq,
  40. Eigen::MatrixXd& Z
  41. )
  42. {
  43. assert_is_VectorX("B",B);
  44. assert_is_VectorX("Y",Y);
  45. assert_is_VectorX("Beq",Beq);
  46. return igl::min_quad_with_fixed_solve(data,B,Y,Beq,Z);
  47. }, __doc_igl_min_quad_with_fixed,
  48. py::arg("data"), py::arg("B"), py::arg("Y"), py::arg("Beq"), py::arg("Z"));
  49. m.def("min_quad_with_fixed", []
  50. (
  51. const Eigen::SparseMatrix<double>& A,
  52. const Eigen::MatrixXd& B,
  53. const Eigen::MatrixXi& known,
  54. const Eigen::MatrixXd& Y,
  55. const Eigen::SparseMatrix<double>& Aeq,
  56. const Eigen::MatrixXd& Beq,
  57. const bool pd,
  58. Eigen::MatrixXd& Z
  59. )
  60. {
  61. assert_is_VectorX("B",B);
  62. assert_is_VectorX("known",known);
  63. assert_is_VectorX("Y",Y);
  64. assert_is_VectorX("Beq",Beq);
  65. return igl::min_quad_with_fixed(A,B,known,Y,Aeq,Beq,pd,Z);
  66. }, __doc_igl_min_quad_with_fixed,
  67. py::arg("A"), py::arg("B"), py::arg("known"), py::arg("Y"), py::arg("Aeq"), py::arg("Beq"), py::arg("pd"), py::arg("Z"));