SparseMatrix.row(i)= SparseMatrix.row(i)*constant breaks non-zero entries
Submitted by Karl
Assigned to Nobody
Link to original bugzilla bug (#584)
Description
I have a successfully defined sparse matrix.
I can output it normally with:
cout<<mysparsematrix<<endl;
but when I do the assignment:
mysparsemat.row(i)= mysparsemat.row(i)*5
cout<<mysparsematrix<<endl; breaks....
What's going wrong somewhere is in the status of "non-zero entries"...
For the output below, i=1
Pre-reassignment I get output of:
Nonzero entries:
(7,1) (,) (,) (7,0) (4,2) (6,3) (0,4) (,) (4,1) (2,3) (,) (,) (6,1) (2,2) (5,4) (,) (,) (0,1) (5,3) (,)
Post re-assignment I get output of:
Nonzero entries:
(7,1) (,) (,) (35,0) (20,2) (30,3) (0,4) (,) (0,1074790400) (0,1074790400) (,) (,) (6,1) (2,2) (5,4) (,) (,) (0,1) (5,3) (,)
Notice that it multiplied the row correctly (i.e. (35,0) etc)...
But broke the non-zero entries after that.