|
From: Dima <dim...@go...> - 2009-09-11 18:13:23
|
Why exception? It has its use when LM is used. Or do youwant to make it virtual and throw an exception if its not overwritten? Had a look at the optimizers. Just a few End-Criterias are really checked. 2009/9/11 Luigi Ballabio <lui...@gm...> > On Sat, 2009-09-05 at 13:07 +0200, Dima wrote: > > 1: CostFunction::values() > > > > As far as I see, the values function is not needed anywhere, except in > > the Levenberg Marquardt optimizer. Can we change it from a pure > > virtual function to a virtual which by default returns a one > > dimensional array with values(x)? > > Possibly, but I'd rather change it to a function which by default throws > an exception. Also because it wouldn't be easy for LM to check that > it's been overridden. > > > 2. EndCriteria: > > > > Most of the functions do not use all of the passed values. [...] > > I think it might be better to make this clean such that the user > > doesn't have a wrong impression, that actually everything is checked. > > Yes, we should document that. Have you looked at the solvers already? > Do you have a list of what's checked in what solver? > > Later, > Luigi > > > -- > > Hanlon's Razor: > Never attribute to malice that which is adequately explained > by stupidity. > > > |