Boost logo

Ublas :

From: Sourabh (sourabh_at_[hidden])
Date: 2007-03-02 00:22:18


On Thu, 1 Mar 2007, Ian McCulloch wrote:

> Sourabh wrote:
>
> > Hi,
> > Is there any size limit on the matrix I can create in ublas.
> > Please see the following program :
> > #include <boost/numeric/ublas/matrix.hpp>
> > #include <boost/numeric/ublas/triangular.hpp>
> > #include <boost/numeric/ublas/io.hpp>
> > #include <boost/numeric/ublas/matrix_sparse.hpp>
> > #include <boost/numeric/ublas/matrix_proxy.hpp>
> > using namespace boost::numeric::ublas;
> >
> > int main (int argc, char* argv[])
> > {
> > int n = atoi (argv[1]);
> > triangular_matrix<double, lower> m (n,n);
> > }
> >
> > when I give argv[1] >= 100000, the program aborts saying:
> >
> > Assertion failed in file
> > <boost/numeric/ublas/functional.hpp>
> > at line 1456:
> > size == 0 || size / 2 < (std::numeric_limits<size_type>::max) () / size
> > Aborted (core dumped)
>
> What hardware are you using? A 100000x100000 triangular matrix will take
> around 40GB of memory to store. Only a 64-bit machine would have a chance
> of allocating that much memory, even then it is not so common to have that
> much RAM.
>
> Cheers,
> Ian
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>

Suppose, I want to use a matrix which has two properties:
It is lower triangular matrix and also sparse.
How should I specify it in ublas ?

-- 
-- Sourabh