Files
igl/python/py_igl/py_eigs.cpp
T
Daniele Panozzo b25ed574a2 added 306
finished chapter 3 of the tutorial
warning: there is a memory leak in 305 that happens rarely, it requires debugging
2015-09-13 23:04:14 +02:00

23 lines
600 B
C++

py::enum_<igl::EigsType>(m, "EigsType")
.value("EIGS_TYPE_SM", igl::EIGS_TYPE_SM)
.value("EIGS_TYPE_LM", igl::EIGS_TYPE_LM)
.value("NUM_EIGS_TYPES", igl::NUM_EIGS_TYPES)
.export_values();
m.def("eigs", []
(
const Eigen::SparseMatrix<double>& A,
const Eigen::SparseMatrix<double>& B,
const size_t k,
const igl::EigsType type,
Eigen::MatrixXd& sU,
Eigen::MatrixXd& sS
)
{
Eigen::VectorXd sSt;
bool ret = igl::eigs(A,B,k,type,sU,sSt);
sS = sSt;
return ret;
}, __doc_igl_eigs,
py::arg("A"), py::arg("B"), py::arg("k"), py::arg("type"), py::arg("sU"), py::arg("sS"));