This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Reset columnin sparse matrix

Tags: None
(comma "," separated)
handluky
Registered Member
Posts
2
Karma
0

Reset columnin sparse matrix

Wed Nov 20, 2013 3:52 pm
Hi Ivgot simple problem:

I would like to reset the 1. first column of sparse matrix, and set this to the new values AND INDEXES in for looop. And I dont want use block() or something like that....to copy the matrix....

Can i use this acces: ??

if (keep_A_RAM==true){
for (int k=0; k<1; ++k)
for (SparseMatrix<double>::InnerIterator it(matA,k); it; ++it)
{
it.value()=0;//reset
it.row(); // row index
it.col(); // col index (here it is equal to k)
it.index(); // inner index, here it is equal to it.row()
}
}
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Reset columnin sparse matrix

Wed Nov 20, 2013 4:31 pm
You can use it.valueRef() = something.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]