PiecewiseLinearCurve Constructor

Definition

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

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.

Exceptions

ArgumentNullException

dataPoints is null.

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[]
A span containing the boundaries of the intervals.
yValues  Double[]
A span containing y-values corresponding to the values in xValues.

Exceptions

ArgumentNullException

xValues is null.

-or-

yValues is null.

DimensionMismatchException

The length of xValues does not equal the length of yValues.

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

ArgumentNullException

xValues is null.

-or-

yValues is null.

DimensionMismatchException

The length of xValues does not equal the length of yValues.

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.

Exceptions

ArgumentNullException

xValues is null.

-or-

yValues is null.

DimensionMismatchException

The length of xValues does not equal the length of yValues.

See Also