C++ implementation of polyfit, with optional weighting like in numpy.
Two implementations, one with boost/ublas lib, and one with the Eigen lib.
References:
https://www.numpy.org/devdocs/reference/generated/numpy.polynomial.polynomial.polyfit.html
https://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.polyfit.html
https://www.boost.org/doc/libs/1_65_1/libs/numeric/ublas/doc/index.html
http://eigen.tuxfamily.org
https://eigen.tuxfamily.org/dox/group__TutorialLinearAlgebra.html
Credits:
http://www.vilipetek.com/2013/10/07/polynomial-fitting-in-c-using-boost/