|
Ublas : |
Subject: [ublas] Low-level use of compressed_matrix
From: Andrea Arteaga (andyspiros_at_[hidden])
Date: 2010-05-20 05:35:22
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