30 #define EPSILON 1.0e-7
34 double points[] = { 0.0, 1.0, 3.0 };
41 points) == PCOMP_STAT_SUCCESS);
44 assert(fabs(coeffs[0] - (+5.0 / 2.0)) < EPSILON);
45 assert(fabs(coeffs[1] - (-3.0 / 2.0)) < EPSILON);
46 assert(fabs(coeffs[2] - (+1.0 / 2.0)) < EPSILON);
51 coeffs) == PCOMP_STAT_SUCCESS);
53 assert(fabs(points[0] - inv_coeffs[0]) < EPSILON);
54 assert(fabs(points[1] - inv_coeffs[1]) < EPSILON);
55 assert(fabs(points[2] - inv_coeffs[2]) < EPSILON);
pcomp_chebyshev_t * pcomp_init_chebyshev(size_t num_of_samples, pcomp_transform_direction_t dir)
Allocate a new instance of the pcomp_chebyshev_t structure on the heap.
Compute a backward Chebyshev transform, with a normalization factor equal to one. ...
Compute a forward Chebyshev transform, with a normalization factor 1/(N + 1)
void pcomp_free_chebyshev(pcomp_chebyshev_t *plan)
Free the memory allocated by a previous call to pcomp_init_chebyshev.
int pcomp_run_chebyshev(pcomp_chebyshev_t *plan, pcomp_transform_direction_t dir, double *output, const double *input)
Compute a forward/backward Chebyshev discrete transform.
Header file for Libpolycomp.