Skip to content

Instantly share code, notes, and snippets.

@SarvagyaVaish
Created March 12, 2017 05:35
Show Gist options
  • Save SarvagyaVaish/d8c9e78c79a65d0f7c7f7d4eac50935e to your computer and use it in GitHub Desktop.
Save SarvagyaVaish/d8c9e78c79a65d0f7c7f7d4eac50935e to your computer and use it in GitHub Desktop.
LMFunctor functor;
functor.m = m;
functor.n = n;
Eigen::LevenbergMarquardt<LMFunctor, float> lm(functor);
lm.minimize(x);
std::cout << "Optimization results" << std::endl;
std::cout << "\ta: " << x(0) << std::endl;
std::cout << "\tb: " << x(1) << std::endl;
std::cout << "\tc: " << x(2) << std::endl;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment