ublas matrix expression tutorial/examples

徘徊边缘 提交于 2019-12-03 10:43:30

Don't know if it'll help, but there's a wiki page on extending uBlas here. That expression template stuff really blows my mind. :)

My suggestion is to just template your new functions so you don't have to worry about matrix expressions or ublas internals. For example, if you wanted to write your own inverse function, write it as a template:

template<typename MATRIX_IN, typename MATRIX_OUT>
bool invert_matrix(const MATRIX& A, MATRIX_OUT& B)
{
    // now use A(i,j), B(i,j), etc
    ...
}

There are also some examples here, if they help at all.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!