Boost logo

Ublas :

From: Sorkin Dmitri (dsorkin_at_[hidden])
Date: 2005-03-23 06:34:29


On Tue, 22 Mar 2005, 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?

Hi.
   In "standard" CSR/CSC (compressed sparse column/rows) format it is
possible.
   Lets talk about CSC :
If you have an empty column, then a pointer to beginning to 'this' column
points to the same location as pointer to 'next' column.So you
easily detect empty column, by equality comparison of pointers in the
"index2" array.
  Regards,
   Dima.