Registered Member
|
Hi there
I would appreciate if someone's got spare time to help me with this. example: double **spektr=mojafinkcija(ime,&Xs,&Yx,&duration); Map<MatrixXd> matrica(*spektr,Xs,Yx); no errors until now.. same pointer address on both of them spektr and matrica. when I try to make loop and list the values from **spektr and matrica(cout<<matrica(i,j)<<spektr[i][j] I get strange errors. sometimes it comes with out of range errors,sometimes strange values.. I have tried all the usual things change the rows columns.. transpose first.. nothing makes sense, is this a bug? |
Moderator
|
Eigen::Map is to map a one dimensional array that will be addressed like this: data{i+j*rows]. In tour case you have an array of arrays, which is a totally different storage format that is not supported by Eigen (because it is not memory efficient).
|
Registered Member
|
thanks for taking time to answer.
since I am aware of this I will not try again in your own opinion what's the best way when dealing with ** returns from external functions(representing images) ..in eigen of course. thanks again |
Registered Member
|
I think
|
Registered Member
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]