Construct a polynomial that interpolates a function. If the number of interpolation
points is n, then the constructed polynomial, p(x), will be have
degree n - 1 and agree with the passed function at the passed interpolation
points. Specifically, p will satisfy p(interpolationPoints[i]) = function(interpolationPoints[i])
for each i = 0, 1,...,n.
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public Polynomial( DoubleVector xCoord, OneVariableFunction function ) |
| Visual Basic (Declaration) |
|---|
Public Sub New ( _ xCoord As DoubleVector, _ function As OneVariableFunction _ ) |
| Visual C++ |
|---|
public: Polynomial( DoubleVector^ xCoord, OneVariableFunction^ function ) |
Parameters
- xCoord
- Type: CenterSpace.NMath.Core..::.DoubleVector
The x-coordinates of points at which to interpolate the function.
- function
- Type: CenterSpace.NMath.Core..::.OneVariableFunction
A delegate representing the function to interpolate.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if passed an empty vector of x-values. |