30 template <
class... Args>
void visit(bp::class_<Args...> &obj)
const {
32 "matrix", +[](BlockMatrixType &m) ->
RefType {
return m.matrix(); })
33 .def_readonly(
"rows", &BlockMatrixType::rows)
34 .def_readonly(
"cols", &BlockMatrixType::cols)
35 .add_property(
"rowDims",
36 bp::make_function(&BlockMatrixType::rowDims,
37 bp::return_internal_reference<>()))
38 .add_property(
"colDims",
39 bp::make_function(&BlockMatrixType::colDims,
40 bp::return_internal_reference<>()))
41 .def(
"blockRow",
blockRow,
"Get a block row by index.")
42 .def(
"__call__",
get_block, (
"self"_a,
"i",
"j"));