17#if defined(__cplusplus)
20#if defined(LIBA_POLY_C)
22#define A_INTERN A_INLINE
28#if !defined A_HAVE_INLINE || defined(LIBA_POLY_C)
32#if defined(A_HAVE_INLINE) || defined(LIBA_POLY_C)
35 if (n > 1) { a_poly_swap_(a, a + n); }
49#if !defined A_HAVE_INLINE || defined(LIBA_POLY_C)
53#if defined(A_HAVE_INLINE) || defined(LIBA_POLY_C)
56 return n ? a_poly_eval_(a, a + n, x) : 0;
70#if !defined A_HAVE_INLINE || defined(LIBA_POLY_C)
74#if defined(A_HAVE_INLINE) || defined(LIBA_POLY_C)
77 return n ? a_poly_evar_(a, a + n, x) : 0;
106#if defined(LIBA_POLY_C)
108#define A_INTERN static A_INLINE
110#if defined(__cplusplus)
void a_poly_swap(a_real *a, a_size n)
swap between and
void a_poly_xTy(a_uint m, a_real const *x, a_real const *y, a_uint n, a_real *b)
compute the vector A^T * y for polynomial fitting.
a_real a_poly_evar(a_real const *a, a_size n, a_real x)
horner function for polynomial
a_real a_poly_eval(a_real const *a, a_size n, a_real x)
horner function for polynomial
void a_poly_xTx(a_uint m, a_real const *x, a_uint n, a_real *A)
compute the matrix A^T * A for polynomial fitting.
double a_real
compiler built-in floating-point number type
Definition a.h:1006
unsigned int a_uint
unsigned integer type is guaranteed to be at least 16 bits
Definition a.h:337
size_t a_size
unsigned integer type returned by the sizeof operator
Definition a.h:823