Class LinearSpline represents a function whose values are determined by linear interpolation between tabulated values.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
[SerializableAttribute]
public class LinearSpline : TabulatedFunction
Visual Basic (Declaration)
<SerializableAttribute> _
Public Class LinearSpline _
	Inherits TabulatedFunction
Visual C++
[SerializableAttribute]
public ref class LinearSpline : public TabulatedFunction

Remarks

For example:
CopyC#
DoubleVector xValues = new DoubleVector(10, 0, 1);
DoubleVector yValues = xValues * xValues;
LinearSpline ls = new LinearSpline( xValues, yValues );
double yInterpolated = ls.Evaluate( 3.5 );
Evaluating x-values outside the range of tabulated values returns the last know y-value. In the example above, ls.Evaluate( 9.5 ) == ls.Evaluate( 9 ).

Inheritance Hierarchy

See Also