Interpolation.PeriodicLinearCurve Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0

Overload List

PeriodicLinearCurve(Double[], Double[], Double) Creates a periodic piecewise linear interpolating curve.
PeriodicLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>, Double) Creates a periodic piecewise linear interpolating curve.

PeriodicLinearCurve(Double[], Double[], Double)

Creates a periodic piecewise linear interpolating curve.
C#
public static PiecewiseInterpolatingCurve PeriodicLinearCurve(
	double[] xValues,
	double[] yValues,
	double period
)

Parameters

xValues  Double[]
The x-coordinates of the data points within one period. Must be strictly increasing.
yValues  Double[]
The y-coordinates of the data points.
period  Double
The period of the curve. Must be positive.

Return Value

PiecewiseInterpolatingCurve
A PiecewiseInterpolatingCurve that repeats with the specified period.

Remarks

This method creates a curve that repeats periodically. Query points outside the initial range are wrapped modulo the period before interpolation.

Exceptions

ArgumentNullExceptionxValues or yValues is null.
DimensionMismatchException The lengths of xValues and yValues do not match.
ArgumentExceptionxValues is not strictly increasing, or period is not positive.

PeriodicLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>, Double)

Creates a periodic piecewise linear interpolating curve.
C#
public static PiecewiseInterpolatingCurve PeriodicLinearCurve(
	ReadOnlySpan<double> xValues,
	ReadOnlySpan<double> yValues,
	double period
)

Parameters

xValues  ReadOnlySpan<Double>
The x-coordinates of the data points within one period. Must be strictly increasing.
yValues  ReadOnlySpan<Double>
The y-coordinates of the data points.
period  Double
The period of the curve. Must be positive.

Return Value

PiecewiseInterpolatingCurve
A PiecewiseInterpolatingCurve that repeats with the specified period.

Remarks

This method creates a curve that repeats periodically. Query points outside the initial range are wrapped modulo the period before interpolation.

Exceptions

DimensionMismatchException The lengths of xValues and yValues do not match.
ArgumentExceptionxValues is not strictly increasing, or period is not positive.

See Also