Boost logo

Ublas :

Subject: Re: [ublas] Low-level use of compressed_matrix
From: Nasos Iliopoulos (nasos_i_at_[hidden])
Date: 2010-05-20 07:05:35

depending on the version of uBlas you have (at least for the latest in svn), you can use the set_filled member function:

look for:

set_filled (const array_size_type& filled1, const array_size_type& filled2)



From: andyspiros_at_[hidden]
Date: Thu, 20 May 2010 11:35:22 +0200
To: ublas_at_[hidden]
Subject: [ublas] Low-level use of compressed_matrix

In my library I copy the data for filling a compressed_matrix directly into the arrays value_data_, index1_data_ and index2_data. The copied data are formatted according to CSC and the compressed_matrix is column_major. The only problem is that the matrix does not get the informations about the change of the number of non-zero values, i.e. the private variables filled1_ and filled2_ are not updated.

I tested the attached file: I fill the three arrays, then I output the nnz number. It is 0. Then I use the debugger to change the variables filled1_ and filled2_. Now the matrix recognize the values and outputs correctly my matrix.

My question: is there a method to change those private variables without to call as many times as needed push_back or similar functions?
Best regards.Andrea Arteaga
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail.