I want to assign a matrix to submatrix of a bigger matrix.
and it works.
but if the matrix is compressed_matr ix 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.h pp at line 1078:
detail::express ion_type_check (m, cm)
terminate called after throwing an instance of 'boost::numeric ::ublas::extern al_logic'
what(): external logic
Aborted
I'm not sure this is a bug or not.
Code:
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_matr ix 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.h pp at line 1078:
detail::express ion_type_check (m, cm)
terminate called after throwing an instance of 'boost::numeric ::ublas::extern al_logic'
what(): external logic
Aborted
I'm not sure this is a bug or not.
Comment