PiecewiseInterpolatingCurve Class

Represents a piecewise linear interpolating curve with support for coordinate transformations, periodic x-values, and circular y-values.

Definition

Namespace: Numerics.NET.Curves
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
C#
public sealed class PiecewiseInterpolatingCurve : PiecewiseCurve, 
	IInterpolator
Inheritance
Object  →  Curve  →  PiecewiseCurve  →  PiecewiseInterpolatingCurve
Implements
IInterpolator

Remarks

This class extends piecewise linear interpolation to handle various coordinate systems and periodic/circular data. Transformations are applied at construction time, and evaluation uses standard piecewise linear logic in the transformed space.

Coordinate Transformations: The curve supports log, logit, and decibel transformations on both axes. These transformations are useful for data that varies exponentially or sigmoidally. Transformations are applied once during construction and inverted during evaluation.

Periodic Curves: For periodic data, the curve wraps x-values modulo the specified period. Query points outside the initial range are automatically mapped back into range. The curve is seamless at the period boundaries.

Circular/Angular Data: For angular data (e.g., compass headings), the curve unwraps angles during construction to avoid discontinuities, then wraps the interpolated result back to the standard range. This produces smooth interpolation across angle wraparound boundaries (e.g., 359° to 1°).

This class is typically constructed via factory methods in the Interpolation class such as LogLinearCurve(Double[], Double[]), PeriodicLinearCurve(Double[], Double[], Double), and CircularLinearCurve(Double[], Double[], Boolean) rather than direct instantiation.

Properties

LowerBound Gets the lower bound of the interpolation domain.
(Overrides PiecewiseCurve.LowerBound)
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)
UpperBound Gets the upper bound of the interpolation domain.
(Overrides PiecewiseCurve.UpperBound)

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)
FindRoots Gets the set of X-coordinates where the curve crosses the X-axis.
(Inherited from Curve)
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)
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(Double) Gets the slope of the curve at the specified X-coordinate.
(Inherited from Curve)
SlopeAt(Double[]) Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve)
SlopeAt(ReadOnlySpan<Double>) Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve)
SlopeAt(Vector<Double>) Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve)
SlopeAt(ReadOnlySpan<Double>, Span<Double>) Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve)
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(Double[]) Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve)
ValueAt(Double) Gets the Y-value of the curve at the specified X-coordinate.
(Overrides Curve.ValueAt(Double))
ValueAt(ReadOnlySpan<Double>) Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve)
ValueAt(Vector<Double>) Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve)
ValueAt(ReadOnlySpan<Double>, Span<Double>) Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve)

Extension Methods

Resample Resamples an interpolator at the specified x-coordinates.
(Defined by Interpolation)
ResampleInto Resamples an interpolator at the specified x-coordinates into a pre-allocated buffer.
(Defined by Interpolation)

See Also