Re: [eigen] Levenberg Marquardt Parameter

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi Thomas!

Thanks for the quick response.

On 14/05/13 08:25, Thomas Capricelli wrote:
> 
> Il 13/05/2013 13:01, Claas H. Koehler ha scritto:
>> Is there a reason, why the Parameters struct is defined inside the Levenberg-Marquardt class? This
>> definition prohibits assignments of the form
> 
> Nope, indeed. I'll make this change. Actually i wanted to do it right
> now, but i've stumbled upon some c++ nightmare trying to put Parameters
> in the LevenbergMarquardtSpace : it compiles fine until i try to write a
> test for it.
No need to hurry. It was more of a general question.


> 
>> template<class FF>
>> Parameters& operator=(const LevenbergMarquardt<FF, Scalar>& other);
> 
> This i'm not really sure. Why do you need this ? If you want to assign a
> Parameter from a LevenbergMarquardt, just do
>      param1 = lm.param2;
In my case I have a template functor (say F<T>). A configuration file sets several parameters
including the LM-Parameters. Depending on some other parameters, the Functor is passed to the
LM-class with a different template argument (T1 or T2). The LM-Parameters how ever do not depend on
the template parameter of F. So there are two problems:
- First I would like to store the LM-Parameters as Parameters struct. For this a template argument
  for the functor has to be chosen, i.e. either
    LevenbergMarquardt< F<T1>, Scalar> or LevenbergMarquardt< F<T2>, Scalar>
  However, upon reading the configuration, it is not clear yet, whether T1 or T2 is going to be used.

- After processing the input and deciding to use either F<T1> or F<T2>, I have to assign the
  previously read parameters to LevenbergMarquardt< F<T>, Scalar>, which requires T=T1 or T=T2
  depending on the choice of parameter.

Of course you are right, when remarking that it is possible to assign each member of the  Parameters
struct individually. This is the way I currently circumvent the problem. However, for the sake of a
better encapsulation, I would prefer assigning the struct as a whole.

Hope this gives you an idea of what I am trying to accomplish.

Regards
Claas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/