openGPMP
Open Source Mathematics Package
modulelinalg.cpp
Go to the documentation of this file.
1 #include <boost/bind/bind.hpp>
2 #include <boost/python.hpp>
3 #include <boost/python/numpy.hpp>
4 #include <iterator>
5 
6 #include "../../../include/linalg/mtx.hpp"
7 
9  // using namespace boost::python;
10 
11  boost::python::class_<gpmp::linalg::Mtx>("Mtx").def(
12  "mtx_add",
13  static_cast<void (
15  *)(const int *A, const int *B, int *C, int rows, int cols)>(
16  &gpmp::linalg::Mtx::mtx_add));
17  //.def("mtx_add", static_cast<bool (gpmp::linalg::Mtx::*)(int,
18  // double)>(&gpmp::linalg::Mtx::mtx_add)) .def("mtx_add", static_cast<bool
19  //(gpmp::linalg::Mtx::*)(int, double, char)>(&gpmp::linalg::Mtx::mtx_add))
20  //.def("mtx_add", static_cast<int (gpmp::linalg::Mtx::*)(int, int,
21  // int)>(&gpmp::linalg::Mtx::mtx_add));
22 }
Mtx class offers matrix arithmetic operations. Some methods are element-wise while others make use of...
Definition: mtx.hpp:57
BOOST_PYTHON_MODULE(linalg)
Definition: modulelinalg.cpp:8
list C
Definition: linalg.py:24
list A
Definition: linalg.py:22
list B
Definition: linalg.py:23