9 template <
typename Matrix>
14 void show() { std::cout <<
mat << std::endl; }
24 template <
typename MatrixType>
26 using namespace Eigen;
29 bp::class_<Base<MatrixType> >(name.c_str(),
30 bp::init<DenseIndex, DenseIndex>())
34 bp::return_internal_reference<>())
39 using namespace Eigen;
42 typedef Eigen::Matrix<double, Eigen::Dynamic, 1> VectorType;
43 typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> MatrixType;
44 typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
47 expose_matrix_class<VectorType>(
"Vector");
48 expose_matrix_class<MatrixType>(
"Matrix");
49 expose_matrix_class<RowMatrixType>(
"RowMatrix");
Base(const Eigen::DenseIndex rows, const Eigen::DenseIndex cols)
void EIGENPY_DLLAPI enableEigenPy()
void expose_matrix_class(const std::string &name)
BOOST_PYTHON_MODULE(return_by_ref)
const Matrix & const_ref()