Examples
Examples copied to clipboard
What is the math function in this example?
Hi, I want to use LM algorithm in my application. Could you show me the function in LMTest.cpp ?
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
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.
Sorry, you'll have to ask the VNL folks about this.