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

Can Map address unstructured data without constant stride?

Tags: None
(comma "," separated)
mlohry
Registered Member
Posts
8
Karma
0
I have elements in a MatrixXd that I need to access some elements in very non-sequential order. As it stands, I pass in the full matrix along with a vector of the integer indices I'm interested in and have the function step through those integers, like so:

Code: Select all
void f( Eigen::MatrixXd& m, Eigen::VectorXi& idxlist){
 for (unsigned int i=0; i!=idxlist.size(); ++i){
  mindex = idxlist(i);
  m.row(mindex) = do something with the matrix at m( idxlist(i) )
 }
}


The index list doesn't have any kind of constant stride or even order, so it might be like 2,9,1084,3,0,12 .... in order to tell the function to access those matrix elements only.

Is there any way I can create a map into to the matrix with very specific indices?
mlohry
Registered Member
Posts
8
Karma
0
Bump... is the silence a "no"?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
I missed it, the answer is indeed not yet.


Bookmarks



Who is online

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