24 int main(
int argc,
char *argv[]) {
26 fprintf(stderr,
"Usage: %s <n_points> <alpha> <beta> <method>\n", argv[0]);
27 fprintf(stderr,
" n_points: Number of quadrature points (integer)\n");
28 fprintf(stderr,
" alpha: Parameter alpha for Gauss-Jacobi quadrature (must be > -1)\n");
29 fprintf(stderr,
" beta: Parameter beta for Gauss-Jacobi quadrature (must be > -1)\n");
30 fprintf(stderr,
" method: Method to use for computation (supported: 'rec', 'gw', 'algo665')\n");
34 int n_points = atoi(argv[1]);
35 double alpha = atof(argv[2]);
36 double beta = atof(argv[3]);
37 const char *method = argv[4];
39 double *x = (
double*) malloc((
size_t) n_points *
sizeof(double));
40 double *wts = (
double*) malloc((
size_t) n_points *
sizeof(double));
44 for (
int i = 0; i < n_points; ++i) {
45 printf(
"Root: %e, Weight: %e\n", x[i], wts[i]);
void gauss_jacobi_c(int *npts, double *alpha, double *beta, double x[], double wts[], const char *method)
int main(int argc, char *argv[])