Mirrors the C# Linear, CubicSpline, and Polynomial interpolaters of the Numerics
library. x_transform, y_transform, and extrapolate are Linear-only in C# (neither
CubicSpline nor Polynomial has a transform surface or an Extrapolate() method), so
they must be left at their defaults for method = "cubic_spline" or "polynomial".
Arguments
- x, y
numeric vectors of equal length defining the knots.
- xout
numeric vector of positions to interpolate at.
- method
"linear"(the default),"cubic_spline", or"polynomial".- order
the polynomial order – there are
order + 1terms for each polynomial function. Required whenmethod = "polynomial"; must beNULLotherwise.- x_transform, y_transform
one of
"none"(the default),"logarithmic"(also accepted as"log"– both spellings are equivalent, see the note below), or"normal_z". Linear-only.- sort_order
"ascending"(the default) or"descending", describingx.- extrapolate
whether to extend the end segments beyond the knots. Default
FALSE, which clamps to the end knot, matching the C#Interpolate()default;TRUEcalls the C#Extrapolate()method instead. Linear-only.
Note
x_transform/y_transform accept both "log" and "logarithmic" for the same
Transform::Logarithmic value everywhere a transform argument appears in this package
(curve_interpolate(), tabular_function(), and here); "logarithmic" (matching the C#
enum member name Transform.Logarithmic) is the spelling used in this package's own
examples and documentation.