#include <SupportValues.h>
Newton-Base
$$ p(x) = \sum_{i=0}^{n} b_i \omega_i(x) $$ with $$ b_i = \frac{f_{[x_{r+1}, ..., x_s]} - f_{[x_r, ..., x_{s-1}]}}{x_s - x_r} $$ and $$ \omega_i(x) = \prod_{j=0}^{i-1} (x - x_j), \quad i = 1, \dots n $$ and $$ \omega_0(x) = x_0 $$
https://wiki.godesteem.de/wiki/interpolation-and-approximation/#Newton-Base
- Examples
- numerics/analysis/TestSupportValues.cpp.
◆ NewtonBase()
NewtonBase::NewtonBase |
( |
const Matrix< double > & |
x, |
|
|
const Matrix< double > & |
y |
|
) |
| |
|
inline |
default constructor
- Parameters
-
x | support values $$x_i$$ |
y | evaluated support values $$y_i$$ |
◆ Evaluate()
virtual Matrix< double > NewtonBase::Evaluate |
( |
const Matrix< double > & |
xIn | ) |
const |
|
inlinevirtual |
Evaluate the newton base for given values
- Parameters
-
- Returns
- interpolated values
Implements PolynomialBase.
◆ Function()
virtual std::string NewtonBase::Function |
( |
| ) |
const |
|
inlinevirtual |
String representation in newton base
- Returns
- representational string
Implements PolynomialBase.
◆ GetCoefficient()
double NewtonBase::GetCoefficient |
( |
size_t |
index, |
|
|
const double & |
x |
|
) |
| const |
|
inline |
Getter for coefficient with index i for a value x
- Parameters
-
index | index of coefficient |
x | value to evaluate |
- Returns
- evaluated coefficient
newton base coefficients $$b_i$$
The documentation for this class was generated from the following file: