a bug of boost uBlas?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acheng
    New Member
    • Feb 2012
    • 3

    a bug of boost uBlas?

    I want to assign a matrix to submatrix of a bigger matrix.

    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;
    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.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    This is a Boost specific question so I suggest you ask the Boost Community here

    Comment

    • acheng
      New Member
      • Feb 2012
      • 3

      #3
      Thanks for reply.
      i am not familiar with the Boost Community. Would you please post this question to there for me? Or show the url of submission please.

      Comment

      Working...