$include_dir="/home/hyper-archives/ublas/include"; include("$include_dir/msg-header.inc") ?>
From: Sourabh (sourabh_at_[hidden])
Date: 2007-03-02 06:17:20
The following program aborts when I am trying to use assign.
What is the proper way of dealing with matrices of size 1e7, which are 
sparse and lower triangular. The question I have is, how costly is it to 
take inverse of such matrices ? I also have to do multiplication and 
addition of such matrices. The improper way, as mentioned in the program 
below causes abortion of program.
The exact assertion used was :
boost/numeric/ublas/functional.hpp at line 1406:
size2 == 0 || i <= ((std::numeric_limits<size_type>::max) () - j) / size2
Aborted (core dumped)
The program:
int main (int argc, char* argv[]) 
{
    unsigned int totalgates = atoi (argv[1]);
    mapped_matrix<double> 	lembda (totalgates, totalgates);
    mapped_matrix<double> 	lembda1 (totalgates, totalgates);
    identity_matrix<double> ident (totalgates);
    lembda (3, 3) = 0.2;
    lembda1.assign (ident - lembda);
    std::cout << lembda1 (3,3) << std::endl;
} 
-- -- Sourabh