kml_?_interp_min_size
Return the minimum number of points required by interpolation object interp or interpolation type T. For example, cubic interpolation requires at least three points.
Interface Definition
unsigned int kml_float_interp_min_size(const kml_float_interp *interp)
unsigned int kml_float_interp_type_min_size(const kml_float_interp_type *T)
unsigned int kml_double_interp_min_size(const kml_double_interp *interp);
unsigned int kml_double_interp_type_min_size(const kml_double_interp_type *T)
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
interp |
const kml_float_interp* / const kml_double_interp* |
Pointer to an interpolation object. |
Input |
Dependencies
#include "kipl.h"
Examples
const size_t xSize = 4;
float xArr[4] = {1,1.33,1.67,2};
float* yArr = (float*)malloc(xSize * sizeof(float));
float x = 1;
float y = 0;
kml_float_interp *interp = kml_float_interp_alloc(kml_float_interp_cspline, xSize);
size_t min_size = kml_float_interp_min_size(interp);
Parent topic: interp