Registered Member
|
Hi,
This email is about the current strategy related to the array initialization. If I have understood correctly, the default current initialization of the array is left to the user. This is nice because it forces the algorithms relying on eigen to correctly initialize the matrices. If one wish to set everything to zero it is possible to set the EIGEN_INITIALIZE_MATRICES_BY_ZERO macro. However there is no mechanisms to force the matrices to take a value wrong enough to make the algorithm failed in conjunction with unitary tests if the matrices are not properly initialized. The problem may appears later on when the value will be randomly "bad enough". For instance, on a development platform a value not properly initialized will be set to 1e-319 and on a deployment platform the value will be set to 1.0. Could it be possible to propose a macro such as EIGEN_INITIALIZE_MATRICES_BY_NAN to make sure that all the matrices are initialized to a VERY wrong value ? (Zero is not always a good solution, see rotation matrices for instance.) This would be fantastic for debugging purposes. Best Regards, Olivier Stasse. |
Registered Member
|
Hi,
Just a follow up on my previous post with the following modification of PlaingObjectBase.h
recompiling the current repository in RELEASE mode with
make check gives: The following tests FAILED: 543 - sparselu_4 (Failed) 558 - NonLinearOptimization (Failed) 600 - FFTW (Failed) 623 - minres_1 (Failed) 625 - levenberg_marquardt (Failed) This is also a problem for regression tests aiming at evaluating computational time, because some of the random initialization leads to denormalization. Best, Olivier |
Registered Member
|
Hi again...
... so it seems that the unitary tests are failing anyway. Therefore my previous post did not show anything useful.. So let us consider this small example
for which the typical output is:
Where some initialization are close to zero and therefore misleading, instead of putting them to zero why not having this with the appropriate flag:
Which is more easy to spot in a complex library. |
Registered Member
|
|
Moderator
|
ok, for the record, I think that's a good idea and it's there: https://bitbucket.org/eigen/eigen/commi ... c4c6cf786b
|
Registered Member
|
Just in case to avoid any misunderstanding ...
In my previous post I was referring to your email on the eigen mailing list about the extension that you implemented very quickly ! So, thank you very much for your reactivity. Best, Olivier. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]