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

Order of traversal of inner indices in sparse matrix

Tags: None
(comma "," separated)
kmiller
Registered Member
Posts
4
Karma
0
Hi,

In the following code fragment:

Code: Select all
for(SparseMatrix<RowMajor>::InnerIterator it(A, k); it; ++it) {
...            
}


does Eigen always guarantee that nonzero coefficients in row k of A will be visited in order of increasing column index?

Thanks for the help.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
yes, unless you bypass the high-level matrix assembly routine and explicitly insert elements unordered (e.g., A.insertUnsorted(i,j)).


Bookmarks



Who is online

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