Re: [eigen] Parameters in Levenberg Marquard algorithm of wrong type? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
They way the class is used is to do something along
lm.minimizeOptimumStorageInit()
while (...) {
lm.minimizeOptimumStorageOneStep(x);
}
That is, the loop is handled 'from outside'. To do this, you need the
class to store all temporaries
Thomas
On 20/03/2012 19:47, Tim Holy wrote:
> Hi Claas,
>
> On Tuesday, March 20, 2012 07:19:31 am Claas H. Köhler wrote:
>> - 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?
> I don't know specifically for this case, but in general it's for cases where
> you call the same algorithm many times in one program. If you put them in the
> class, you only have to allocate the storage once, when you first construct the
> solver. If they are local to the function, you have to allocate them each time
> the function is called. In many cases, that's a major overhead and
> significantly hurts performance.
>
> Best,
> --Tim
>
>
>
--
Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>
http://www.freehackers.org/thomas/