Public Member Functions |
|
| PPolynom () |
| | constructor
|
|
virtual | ~PPolynom () |
| | destructor
|
| void | setXF (const fmatvec::Vec &x, const fmatvec::Mat &f, std::string InterpolationMethod) |
| | set interpolation
|
| std::vector< fmatvec::Mat > | getCoefs () |
| fmatvec::Vec | getBreaks () |
| void | setPP (const std::vector< fmatvec::Mat > &coefs_u, const fmatvec::Vec &breaks_u) |
| | set piecewise polynomial
|
| virtual void | initializeUsingXML (TiXmlElement *element) |
| | initialize function with XML code
|
|
| DifferentiableFunction1 () |
| | constructor
|
|
virtual | ~DifferentiableFunction1 () |
| | destructor
|
|
virtual fmatvec::Vec | operator() (const double &x, const void *=NULL) |
const Function1< fmatvec::Vec,
double > & | getDerivative (int degree) const |
| Function1< fmatvec::Vec, double > & | getDerivative (int degree) |
| void | addDerivative (Function1< fmatvec::Vec, double > *diff) |
| void | setDerivative (Function1< fmatvec::Vec, double > *diff, size_t degree) |
| void | setOrderOfDerivative (int i) |
|
virtual | ~Function1 () |
| | destructor
|
| virtual Ret | operator() (const Arg &x, const void *=NULL)=0 |
class for piecewise-polynomials and cubic spline interpolation
- Author:
- Robert Huber
- Date:
- 2006-08-31 initial commit
-
2006-09-05 verified with matlab /octave (Robert Huber)
-
2008-05-21 C++ beauty treatment, PLinear (Thorsten Schindler)
-
2009-08-11 kernel_dev (Thorsten Schindler)
- Todo:
- add deletes TODO
Spline / PP-Form info Piecewise polynomial: c0* xloc^n + c1* xloc^(n-1) + c2* xloc^(n-2) + ... + cn with [c0 c1 c2 ... cn] ith row vector of coefs-matrix breaks(i) << x << breaks(i+1) defines i and xloc = x-breaks(i)
Ex. cubic spline with breaks= [0; 0.3; 0.5] coefs= [d1 c1 b1 a1; d2 c2 b2 a2] -> S(x) = a1 + b1*xloc + c1*xloc^2 + d1*xloc^3 for x[0;0.3] and x_loc = x -> S(x) = a2 + b2*xloc + c2*xloc^2 + d2*xloc^3 for x[0.3;0.5] and xloc = x - 0.3;
Cubic spline (xi,fi) i=1..N is being interpolated by N-1 piecewise polynomials Si of degree 3 yielding a global C^2 curve for uniqueness TWO additional boundary conditions are necessary (periodic / natural)
Piecewise linear polynomial (xi,fi) i=1..N is being interpolated by N-1 piecewise polynomials Si of degree 1 yielding a globally weak differentiable curve in the context of this class the second derivative is defined to be zero everywhere (which is mathematically wrong)