Examples icon indicating copy to clipboard operation
Examples copied to clipboard

What is the math function in this example?

Open xiaojieguo opened this issue 8 years ago • 3 comments

Hi, I want to use LM algorithm in my application. Could you show me the function in LMTest.cpp ?

xiaojieguo avatar May 25 '16 03:05 xiaojieguo

I'm not sure what you mean - the function f() is defined as: fx(0) = pow(x(0) - 2, 2) + pow(x(1) - 4, 2);

which is f(x) = (x(0)-2)^2 + (x(1) - 4)^2

daviddoria avatar May 25 '16 11:05 daviddoria

Thanks. I made a mistake . But I have another question. What does the second parameter mean in vnl_least_squares_function (unsigned int number_of_unknowns, unsigned int number_of_residuals, UseGradient g=use_gradient) ? Here number_of_residuals >= number_of_unknowns, is it right? I am confused about number_of_residuals.

xiaojieguo avatar May 25 '16 12:05 xiaojieguo

Sorry, you'll have to ask the VNL folks about this.

daviddoria avatar May 25 '16 12:05 daviddoria