Re: [eigen] Parameters in Levenberg Marquard algorithm of wrong type? |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Hi Thomas!Thanks for the support. If you are busy, I can also suggest a patch and send it to you for review, since I had to make some changes already to make my interface compile.
While looking at the code, some quesions arose:- Is there a reason why all local temporary variables (e.g temp, temp1, pnorm...) are defined as class members, instead of defining locally where needed?
- There are some expressions like e.g. pnorm / Scalar(0.1), probably because the original code defined 0.1 as static constant. Would it not improve readability to replace this by Scalar(10.) * pnorm?
Regards Claas On 16/03/12 20:16, orzel@xxxxxxxxxxxxxxx wrote:
Mmh, indeed, i've never considered complex with those. You probably right, I'll check about patching this Thomas On 15/03/2012 18:34, "Claas H. Köhler" wrote:Hi! Has anybody ever tried to use the LevenbergMarquardt class of the unsupported NonLinearOptimization module with complex values? I am asking, because all parameters specified in the Parameters struct are of type Scalar, which would result in std::complex<double> values. However, if I am not mistaken, these values should be real quantities, even if the underlying problem is complex. Furthermore comparisons of the form if (parameters.ftol< 0.) {...} are used, while operator< should not be defined for complex values at all. Would it not be preferable to use NumTraits<Scalar>::Real instead for the parameters? Regards Claas
-- Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR)Institut für Methodik der Fernerkundung | Experimentelle Verfahren | Münchner Str | 82234 Weßling
Claas H. Köhler Telefon 08153 28-1274 | Telefax 08153 28-1337 | claas.koehler@xxxxxx www.DLR.de/EOC
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |