Expand|Select|Wrap|Line Numbers
- ublas::matrix<int> A(8,5);
- ublas::matrix<int> B(2,5);
- for(size_t i=0;i<A.size1();++i)
- for(size_t j=0;j<A.size2();++j)
- A(i,j)=i*A.size2()+j+1;
- for(size_t i=0;i<B.size1();++i)
- for(size_t j=0;j<B.size2();++j)
- B(i,j)=i*B.size2()+j+5;
- ublas::matrix_range<ublas::matrix<int> > a(A,ublas::range(0,2),ublas::range(0,5));
- a=B;
but if the matrix is compressed_matrix type, there's something with it.
the error log as below:
Check failed in file boost_1_48_0/boost/numeric/ublas/detail/matrix_assign.hpp at line 1078:
detail::expression_type_check (m, cm)
terminate called after throwing an instance of 'boost::numeric::ublas::external_logic'
what(): external logic
Aborted
I'm not sure this is a bug or not.