PiecewiseLinearCurve Constructor

Definition

Namespace: Numerics.NET.Curves
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.6.0

Overload List

PiecewiseLinearCurve(Point[])

Constructs a new PiecewiseLinearCurve object.
C#
public PiecewiseLinearCurve(
	Point[] dataPoints
)

Parameters

dataPoints  Point[]
An array of Point structures containing the data points.

PiecewiseLinearCurve(Double[], Double[])

Note: This API is now obsolete.
Constructs a new PiecewiseLinearCurve object.
C#
[ObsoleteAttribute("Use the constructor that uses spans instead.")]
public PiecewiseLinearCurve(
	double[] xValues,
	double[] yValues
)

Parameters

xValues  Double[]
An array containing the boundaries of the intervals.
yValues  Double[]
An array containing y-values corresponding to the values in xValues.

Exceptions

ArgumentNullExceptionxValues or yValues is null.
ArgumentExceptionxValues has fewer than 2 elements or is not strictly ascending.
DimensionMismatchException The lengths of xValues and yValues do not match.

PiecewiseLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>)

Constructs a new PiecewiseLinearCurve object.
C#
public PiecewiseLinearCurve(
	ReadOnlySpan<double> xValues,
	ReadOnlySpan<double> yValues
)

Parameters

xValues  ReadOnlySpan<Double>
A span containing the boundaries of the intervals.
yValues  ReadOnlySpan<Double>
A span containing y-values corresponding to the values in xValues.

Exceptions

ArgumentExceptionxValues has fewer than 2 elements or is not strictly ascending.
DimensionMismatchException The lengths of xValues and yValues do not match.

PiecewiseLinearCurve(Vector<Double>, Vector<Double>)

Constructs a new PiecewiseLinearCurve object.
C#
public PiecewiseLinearCurve(
	Vector<double> xValues,
	Vector<double> yValues
)

Parameters

xValues  Vector<Double>
A vector containing the boundaries of the intervals.
yValues  Vector<Double>
A vector containing y-values corresponding to the values in xValues.

See Also