ocssw
V2022
|
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for nr_spline.c:
Go to the source code of this file.
Macros | |
#define | MALLOC(ptr, typ, num) |
Functions | |
void | spline (float x[], float y[], int n, float yp1, float ypn, float y2[]) |
void | splint (float xa[], float ya[], float y2a[], int n, float x, float *y) |
Macro Definition Documentation
◆ MALLOC
#define MALLOC | ( | ptr, | |
typ, | |||
num | |||
) |
Value:
{ \
(ptr) = (typ *)malloc((num) * sizeof(typ)); \
if((ptr) == NULL){ \
fprintf(stderr,"-E- %s line %d: Memory allocation failure.\n", \
__FILE__,__LINE__); \
exit(EXIT_FAILURE); \
} \
}
Definition at line 24 of file nr_spline.c.
Function Documentation
◆ spline()
void spline | ( | float | x[], |
float | y[], | ||
int | n, | ||
float | yp1, | ||
float | ypn, | ||
float | y2[] | ||
) |
Definition at line 35 of file nr_spline.c.
◆ splint()
void splint | ( | float | xa[], |
float | ya[], | ||
float | y2a[], | ||
int | n, | ||
float | x, | ||
float * | y | ||
) |
Definition at line 78 of file nr_spline.c.