SDDSlib
|
Implements interpolation functions including linear and Lagrange interpolation. More...
#include "mdb.h"
Go to the source code of this file.
Functions | |
double | interp (double *f, double *x, long n, double xo, long warnings, long order, long *returnCode) |
Performs simple linear interpolation of data. | |
double | LagrangeInterp (double *x, double *f, long order1, double x0, long *returnCode) |
Performs Lagrange interpolation of data. | |
double | interpolate (double *f, double *x, int64_t n, double xo, OUTRANGE_CONTROL *belowRange, OUTRANGE_CONTROL *aboveRange, long order, unsigned long *returnCode, long M) |
Performs interpolation with range control options. | |
short | interp_short (short *f, double *x, int64_t n, double xo, long warnings, short order, unsigned long *returnCode, long *next_start_pos) |
Performs interpolation for short integer data types. | |
Implements interpolation functions including linear and Lagrange interpolation.
Definition in file interp.c.
double interp | ( | double * | f, |
double * | x, | ||
long | n, | ||
double | xo, | ||
long | warnings, | ||
long | order, | ||
long * | returnCode ) |
Performs simple linear interpolation of data.
This function interpolates the value at a given point using linear interpolation. It handles boundary conditions by returning the nearest data point value when the interpolation point is outside the data range.
f | Pointer to the array of function values. |
x | Pointer to the array of independent variable values. |
n | Number of data points. |
xo | The point at which to interpolate. |
warnings | Flag to enable or disable warning messages. |
order | The order of interpolation. |
returnCode | Pointer to a variable to store the return code status. |
Definition at line 34 of file interp.c.
short interp_short | ( | short * | f, |
double * | x, | ||
int64_t | n, | ||
double | xo, | ||
long | warnings, | ||
short | order, | ||
unsigned long * | returnCode, | ||
long * | next_start_pos ) |
Performs interpolation for short integer data types.
This function interpolates the value at a given point for short integer data, handling boundary conditions and allowing for different interpolation orders.
f | Pointer to the array of short integer function values. |
x | Pointer to the array of independent variable values. |
n | Number of data points. |
xo | The point at which to interpolate. |
warnings | Flag to enable or disable warning messages. |
order | The order of interpolation. |
returnCode | Pointer to a variable to store the return code status. |
next_start_pos | Pointer to store the next starting position for interpolation. |
Definition at line 281 of file interp.c.
double interpolate | ( | double * | f, |
double * | x, | ||
int64_t | n, | ||
double | xo, | ||
OUTRANGE_CONTROL * | belowRange, | ||
OUTRANGE_CONTROL * | aboveRange, | ||
long | order, | ||
unsigned long * | returnCode, | ||
long | M ) |
Performs interpolation with range control options.
This function interpolates the value at a given point with additional control over out-of-range conditions, such as skipping, aborting, warning, wrapping, saturating, or using a specified value.
f | Pointer to the array of function values. |
x | Pointer to the array of independent variable values. |
n | Number of data points. |
xo | The point at which to interpolate. |
belowRange | Pointer to structure controlling behavior below the data range. |
aboveRange | Pointer to structure controlling behavior above the data range. |
order | The order of interpolation. |
returnCode | Pointer to a variable to store the return code status. |
M | Multiplier to adjust the interpolation condition based on the order. |
Definition at line 160 of file interp.c.
double LagrangeInterp | ( | double * | x, |
double * | f, | ||
long | order1, | ||
double | x0, | ||
long * | returnCode ) |
Performs Lagrange interpolation of data.
This function computes the interpolated value at a given point using Lagrange polynomial interpolation of a specified order.
x | Pointer to the array of independent variable values. |
f | Pointer to the array of function values. |
order1 | The order of the Lagrange polynomial. |
x0 | The point at which to interpolate. |
returnCode | Pointer to a variable to store the return code status. |
Definition at line 115 of file interp.c.