473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

a bug of boost uBlas?

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

Expand|Select|Wrap|Line Numbers
  1. ublas::matrix<int> A(8,5);
  2. ublas::matrix<int> B(2,5);
  3. for(size_t i=0;i<A.size1();++i)
  4.     for(size_t j=0;j<A.size2();++j)
  5.         A(i,j)=i*A.size2()+j+1;
  6. for(size_t i=0;i<B.size1();++i)
  7.     for(size_t j=0;j<B.size2();++j)
  8.         B(i,j)=i*B.size2()+j+5;
  9. ublas::matrix_range<ublas::matrix<int> > a(A,ublas::range(0,2),ublas::range(0,5));
  10. a=B;
  11.  
and it works.
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.
Feb 27 '12 #1
2 2036
Banfa
9,065 Expert Mod 8TB
This is a Boost specific question so I suggest you ask the Boost Community here
Feb 27 '12 #2
acheng
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.
Feb 27 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Antonio Martino | last post by:
Anybody of you out there knows how to setup and use the Boost Library under DEV C++? I am particularly interested in the uBLAS library... thx and Bye Antonio
3
by: Manzanita | last post by:
Hi. I'm using boost::numerics::ublas to solve linear symmetric and hermitian systems (cholesky, qr, etc.). I'm aware that ublas only provide basic algebra operations (blas1, blas2 and blas3) so...
15
by: christopher diggins | last post by:
Here is some code I wrote for Matrix multiplication for arbitrary dimensionality known at compile-time. I am curious how practical it is. For instance, is it common to know the dimensionality of...
8
by: googlebart2000 | last post by:
I'm about to be a new user of the Boost C++ library, and I've installed and compiled it, but I've come up empty on how to use it in my C++ programs. I can't find the documentation that explains...
34
by: Guch Wu | last post by:
Boost has many terrific libraries. But I want to know whether they are ready for using in real projects. Which of them are mature enough, or just only in progress?
3
Axon
by: Axon | last post by:
Hi, I'm using Boost::uBLAS::mapped_matrix for working with sparse matrices. At the moment, the maximum dimension of mapped_matrix is 65535x65535 since std::size_t compiles as unsigned int. I'm...
1
by: utab | last post by:
Dear all, I have a question regarding an assignment operation This is the statement: "If you know for sure that the left hand expression and the right hand expression have no common storage,...
1
by: sanjeev.p3 | last post by:
I need to pass ublas::matrix data to a legacy C API which expects input in the form: void doSomething(double* data,...); If I have a std::vector<doublemyA this is easy. I do: ...
0
by: brekehan | last post by:
Anyone know an easy way to compare to boost matrices using the same template argument for equality? boost::numeric::ublas::matrix<doublea(2, 2); boost::numeric::ublas::matrix<doubleb(4, 4); ...
1
by: kundasang | last post by:
Hi. I just downloaded boost library from boost.org then build and I don't know what does binary precompiled means. Well, I have installed it and I using bloodshed Dev-Cpp compiler. <bThen,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.