Interpolation.LogLogCurve Method

Definition

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

Overload List

LogLogCurve(Double[], Double[]) Creates a piecewise linear interpolating curve with logarithmic scaling on both axes.
LogLogCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>) Creates a piecewise linear interpolating curve with logarithmic scaling on both axes.

LogLogCurve(Double[], Double[])

Creates a piecewise linear interpolating curve with logarithmic scaling on both axes.
C#
public static PiecewiseInterpolatingCurve LogLogCurve(
	double[] xValues,
	double[] yValues
)

Parameters

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

Return Value

PiecewiseInterpolatingCurve
A PiecewiseInterpolatingCurve that interpolates linearly in log-log space.

Remarks

This method creates a curve that is linear when plotted on a log-log scale. This is useful for power-law relationships where y ∝ x^k.

Exceptions

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

LogLogCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>)

Creates a piecewise linear interpolating curve with logarithmic scaling on both axes.
C#
public static PiecewiseInterpolatingCurve LogLogCurve(
	ReadOnlySpan<double> xValues,
	ReadOnlySpan<double> yValues
)

Parameters

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

Return Value

PiecewiseInterpolatingCurve
A PiecewiseInterpolatingCurve that interpolates linearly in log-log space.

Remarks

This method creates a curve that is linear when plotted on a log-log scale. This is useful for power-law relationships where y ∝ x^k.

Exceptions

DimensionMismatchException The lengths of xValues and yValues do not match.
ArgumentExceptionxValues or yValues contains non-positive values, or xValues is not strictly increasing.

See Also