philsupertramp/game-math
|
#include <SupportValues.h>
Public Member Functions | |
PolynomialBase (const Matrix< double > &X, const Matrix< double > &Y) | |
virtual Matrix< double > | Evaluate (const Matrix< double > &) const =0 |
virtual std::string | Function () const =0 |
Friends | |
std::ostream & | operator<< (std::ostream &ostr, const PolynomialBase &base) |
function approximation and interpolation using support values
see https://wiki.godesteem.de/wiki/interpolation-and-approximation/
Requires:
Template class for polynomial base representation.
Default constructor
X | support values $$x_i$$ |
Y | evaluated support values $$y_i$$ |
Evaluate a given vector based on the approximation, computes p(x) for given x
Implemented in LagrangeBase, MonomBase, and NewtonBase.
|
pure virtual |
string representation of interpolated polynomial
Don't overthink this. simply return some kind of equation one can copy into wolframalpha and simplify
Implemented in MonomBase, LagrangeBase, and NewtonBase.
|
friend |
std::cout operator
ostr | |
base |