|
Ublas : |
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2005-03-22 03:41:45
On Monday 21 March 2005 22:31, Paul C. Leopardi wrote:
> Is it possible/valid to have a compressed matrix where the index1 array is
> complete and yet there are rows (or columns depending on type of compressed
> matrix) which contain no non-zeros? A simple example would be the zero
> matrix. Is is possible/valid to have a compressed matrix with no non-zeros
> and yet a complete index1 array? If not, wouldn't this badly break the
> expected linear algebra semantics of compressed matrices, eg. you would
> need to force some of the non-zeros to have the value zero?
yes, look at this 10-by-10 matrix example
index2: 0 1 2 2 2 3 4
index1: 0 3 3 4 7 7 7 7 7 7 7
results:
0 1 2 3 4 5 6 7 8 9
0 * * *
1
2 *
3 *
4 * * *
5
6
7
8
9
because a a row i are all indices index1(i) <= j < index1(i+1) and we have an
empty row if index1(i) == index1(j).
mfg
Gunter