Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-11-17 17:42:24


Nico Galoppo schrieb:
> Hi,
>
> I'm having issues with serialization (malloc problems), and I'm trying
> to figure out where the bug is (ublas or own code). I noticed
> something bizarre in the output of my serialization of a
> compressed_matrix, vs. Gunter's example code output.
I didn't understand where the difference is. Can you send me the full
output files or the example that created it?

about the array. By default index1_data is preallocated to the maximal
size (=n+1) because this size is known a priori. It is not initialized
to zero. Thus only the first 'filled1' number of elements is useful. If
you need a fully populated index1_data array you have to call
complete_index1_data() first.
The array index2_data should have nnz() elements similar to value_data.

btw. how do you copy the data? operator = () and the copy constructor
simply copy all internal values and arrays - thus the garbage is copied too.

mfg
Gunter