added block operations to dense matrices

Former-commit-id: c15f1c3e0f
This commit is contained in:
Daniele Panozzo
2015-10-04 19:12:46 +02:00
parent dba9e977d4
commit 36ec4d51e0
+2
View File
@@ -100,6 +100,8 @@ py::class_<Type> bind_eigen_2(py::module &m, const char *name,
.def("setCol", [](Type &m, int i, const Type& v) { m.col(i) = v; })
.def("setRow", [](Type &m, int i, const Type& v) { m.row(i) = v; })
.def("setBlock", [](Type &m, int i, int j, int p, int q, const Type& v) { m.block(i,j,p,q) = v; })
.def("block", [](Type &m, int i, int j, int p, int q) { return Type(m.block(i,j,p,q)); })
.def("rightCols", [](Type &m, const int& k) { return Type(m.rightCols(k)); })
.def("leftCols", [](Type &m, const int& k) { return Type(m.leftCols(k)); })