Registered Member
|
hi,
thks in advance for answers Q1/ I want to use global Eigen::VectordXd/MatrixXd in a external test.h file. thus I did :
I also :
then I can use MyMatrix in my main.cpp (including test.h) Actually, I just want to know if it's necessary to pass upon an other test.cpp file in order to use the Matrix in my main. I tried without --> failure mess compilation, MyMatrix was not declared in this scope ... I dont understand why ... ? Q2/ Using fullPivLU on a dense dynamic matrix (A) several times in a loop. the matrix size evolves whithout exceeding a known dimension for exemple (3000x3000) will I get faster results using the optional template parameters : Matrix <double, Dynamic, Dynamic, 0, 3000,3000 > A; should I avoid static fixed size on dense Matrices ? thks, |
Moderator
|
Q1: yes, MyMatrix have to be declared in one cpp file. It can be any cpp file of your project.
Q2: it is not a good idea to declare such a big matrix on the stack. The performance gain would be epsilon anyway. |
Registered Member
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora