PiecewiseLinearCurve Class

Represents a curve that has different expressions on different intervals within its domain.

Definition

Namespace: Numerics.NET.Curves
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public class PiecewiseLinearCurve : PiecewiseCurve
Inheritance
Object  →  Curve  →  PiecewiseCurve  →  PiecewiseLinearCurve

Remarks

Use the PiecewiseLinearCurve class to represent a curve or function that looks like a broken line. It is most commonly used for linear interpolation of tabulated data that represents a continuous function. On each interval between two data points, the curve is approximated by a straight line between the data points.

Piecewise linear curves inherit from PiecewiseCurve.

Constructors

PiecewiseLinearCurve(Point[]) Constructs a new PiecewiseLinearCurve object.
PiecewiseLinearCurve(Double[], Double[]) Constructs a new PiecewiseLinearCurve object.
Obsolete.
PiecewiseLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>) Constructs a new PiecewiseLinearCurve object.
PiecewiseLinearCurve(Vector<Double>, Vector<Double>) Constructs a new PiecewiseLinearCurve object.

Properties

NumberOfIntervals Gets the number of intervals that make up this PiecewiseCurve.
(Inherited from PiecewiseCurve)
Parameters Gets the collection of parameters that determine the shape of this Curve.
(Inherited from Curve)

Methods

Clone Constructs an exact copy of this instance.
(Inherited from Curve)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
FindRoots Gets the set of X-coordinates where the curve crosses the X-axis.
(Overrides Curve.FindRoots())
GetCurveFitter Returns a CurveFitter object that can be used to fit the curve to data.
(Inherited from Curve)
GetDataPoint Gets the data point with the specified index.
(Inherited from PiecewiseCurve)
GetDerivative Returns a Curve that represents the derivative of this Curve.
(Inherited from Curve)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetXValue Returns the X value of the data point with the specified index.
(Inherited from PiecewiseCurve)
GetXValuesSpan Returns a span containing the X-values of the data points.
(Inherited from PiecewiseCurve)
GetYValue Returns the Y value of the data point with the specified index.
(Inherited from PiecewiseCurve)
GetYValuesSpan Returns a span containing the Y-values of the data points.
(Inherited from PiecewiseCurve)
IndexOf Finds the index of the lower bound of the interval that contains the specfied value.
(Inherited from PiecewiseCurve)
Integral Gets the definite integral of the curve between the specified X-coordinates.
(Inherited from PiecewiseCurve)
IntegrateOnInterval(Int32) Returns the value of the integral over the interval with the specified index.
(Inherited from PiecewiseCurve)
IntegrateOnInterval(Int32, Double, Double) Returns the integral of the curve over a single interval.
(Overrides PiecewiseCurve.IntegrateOnInterval(Int32, Double, Double))
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OnParameterChanged Called after a Curve parameter has been changed.
(Inherited from Curve)
OnParameterChanging Called before the value of a curve parameter is changed.
(Inherited from PiecewiseCurve)
SetDataPoint Sets the X value of the data point with the specified index.
(Inherited from PiecewiseCurve)
SetDataPoints Sets the data points at the specified indexes.
(Inherited from PiecewiseCurve)
SetParameter Sets a curve parameter to the specified value.
(Inherited from Curve)
SetXValue Sets the X value of the data point with the specified index.
(Inherited from PiecewiseCurve)
SetXValues Sets the X values at the specified indexes.
(Inherited from PiecewiseCurve)
SetYValue Sets the Y value of the data point with the specified index.
(Inherited from PiecewiseCurve)
SetYValues Sets the Y values at the specified indexes.
(Inherited from PiecewiseCurve)
SlopeAt Gets the slope of the curve at the specified X-coordinate.
(Overrides Curve.SlopeAt(Double))
Solve Finds the x value where the curve reaches the specified y value.
(Inherited from Curve)
TangentAt Gets the tangent line to the curve at the specified X-coordinate.
(Inherited from Curve)
ToStringReturns a string that represents the current object.
(Inherited from Object)
ValueAt Gets the Y-value of the curve at the specified X-coordinate.
(Overrides Curve.ValueAt(Double))

See Also