Overview
Calculates the unscaled area under a fourth order polynomial using the rectangular method. The result is the sum of y-values. To get the area, multiply by the rectangle/bin width.
Expressed as a formula, this function calculates 
Dispatcher Prototype
void volk_32f_x3_sum_of_poly_32f(float* target, float* src0, float* center_point_array, float* cutoff, unsigned int num_points)
Inputs
- src0: x values
- center_point_array: polynomial coefficients in order {c1, c2, c3, c4, c0}
- cutoff: the minimum x value to use (will clamp to cutoff if input < cutoff)
- num_points: The number of values in both input vectors.
Outputs
- complexVector: The sum of y values generated by polynomial.
Example The following estimates
by using the Taylor expansion centered around
,
int npoints = 4096;
coefficients[0] = 4.48168907033806f;
coefficients[1] = coefficients[0] * 0.5f;
coefficients[2] = coefficients[0] * 1.0f/6.0f;
coefficients[3] = coefficients[0] * 1.0f/24.0f;
coefficients[4] = coefficients[0];
*cutoff = -2.0;
*result = 0.0f;
float dx = (float)M_PI/ (float)npoints;
for(unsigned int ii=0; ii < npoints; ++ii){
input[ii] = dx * (float)ii - 1.5f;
}
volk_32f_x3_sum_of_poly_32f(result, input, coefficients, cutoff, npoints);
std::cout << "result is " << *result * (input[1]-input[0]) << std::endl;