integration.h

Go to the documentation of this file.
1 /*************************************************************************
2 ALGLIB 3.11.0 (source code generated 2017-05-11)
3 Copyright (c) Sergey Bochkanov (ALGLIB project).
4 
5 >>> SOURCE LICENSE >>>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation (www.fsf.org); either version 2 of the
9 License, or (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 A copy of the GNU General Public License is available at
17 http://www.fsf.org/licensing/licenses
18 >>> END OF LICENSE >>>
19 *************************************************************************/
20 #ifndef _integration_pkg_h
21 #define _integration_pkg_h
22 #include "ap.h"
23 #include "alglibinternal.h"
24 #include "linalg.h"
25 #include "alglibmisc.h"
26 #include "specialfunctions.h"
27 
29 //
30 // THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (DATATYPES)
31 //
33 namespace alglib_impl
34 {
35 typedef struct
36 {
37  ae_int_t terminationtype;
38  ae_int_t nfev;
39  ae_int_t nintervals;
40 } autogkreport;
41 typedef struct
42 {
43  double a;
44  double b;
45  double eps;
46  double xwidth;
47  double x;
48  double f;
49  ae_int_t info;
50  double r;
51  ae_matrix heap;
52  ae_int_t heapsize;
53  ae_int_t heapwidth;
54  ae_int_t heapused;
55  double sumerr;
56  double sumabs;
57  ae_vector qn;
58  ae_vector wg;
60  ae_vector wr;
62  rcommstate rstate;
64 typedef struct
65 {
66  double a;
67  double b;
68  double alpha;
69  double beta;
70  double xwidth;
71  double x;
72  double xminusa;
73  double bminusx;
74  ae_bool needf;
75  double f;
76  ae_int_t wrappermode;
77  autogkinternalstate internalstate;
78  rcommstate rstate;
79  double v;
80  ae_int_t terminationtype;
81  ae_int_t nfev;
82  ae_int_t nintervals;
83 } autogkstate;
84 
85 }
86 
88 //
89 // THIS SECTION CONTAINS C++ INTERFACE
90 //
92 namespace alglib
93 {
94 
95 
96 
97 
98 
99 /*************************************************************************
100 Integration report:
101 * TerminationType = completetion code:
102  * -5 non-convergence of Gauss-Kronrod nodes
103  calculation subroutine.
104  * -1 incorrect parameters were specified
105  * 1 OK
106 * Rep.NFEV countains number of function calculations
107 * Rep.NIntervals contains number of intervals [a,b]
108  was partitioned into.
109 *************************************************************************/
111 {
112 public:
116  virtual ~_autogkreport_owner();
119 protected:
121 };
123 {
124 public:
128  virtual ~autogkreport();
132 
133 };
134 
135 
136 /*************************************************************************
137 This structure stores state of the integration algorithm.
138 
139 Although this class has public fields, they are not intended for external
140 use. You should use ALGLIB functions to work with this class:
141 * autogksmooth()/AutoGKSmoothW()/... to create objects
142 * autogkintegrate() to begin integration
143 * autogkresults() to get results
144 *************************************************************************/
146 {
147 public:
151  virtual ~_autogkstate_owner();
154 protected:
156 };
158 {
159 public:
163  virtual ~autogkstate();
165  double &x;
166  double &xminusa;
167  double &bminusx;
168  double &f;
169 
170 };
171 
172 /*************************************************************************
173 Computation of nodes and weights for a Gauss quadrature formula
174 
175 The algorithm generates the N-point Gauss quadrature formula with weight
176 function given by coefficients alpha and beta of a recurrence relation
177 which generates a system of orthogonal polynomials:
178 
179 P-1(x) = 0
180 P0(x) = 1
181 Pn+1(x) = (x-alpha(n))*Pn(x) - beta(n)*Pn-1(x)
182 
183 and zeroth moment Mu0
184 
185 Mu0 = integral(W(x)dx,a,b)
186 
187 INPUT PARAMETERS:
188  Alpha - array[0..N-1], alpha coefficients
189  Beta - array[0..N-1], beta coefficients
190  Zero-indexed element is not used and may be arbitrary.
191  Beta[I]>0.
192  Mu0 - zeroth moment of the weight function.
193  N - number of nodes of the quadrature formula, N>=1
194 
195 OUTPUT PARAMETERS:
196  Info - error code:
197  * -3 internal eigenproblem solver hasn't converged
198  * -2 Beta[i]<=0
199  * -1 incorrect N was passed
200  * 1 OK
201  X - array[0..N-1] - array of quadrature nodes,
202  in ascending order.
203  W - array[0..N-1] - array of quadrature weights.
204 
205  -- ALGLIB --
206  Copyright 2005-2009 by Bochkanov Sergey
207 *************************************************************************/
208 void gqgeneraterec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w);
209 
210 
211 /*************************************************************************
212 Computation of nodes and weights for a Gauss-Lobatto quadrature formula
213 
214 The algorithm generates the N-point Gauss-Lobatto quadrature formula with
215 weight function given by coefficients alpha and beta of a recurrence which
216 generates a system of orthogonal polynomials.
217 
218 P-1(x) = 0
219 P0(x) = 1
220 Pn+1(x) = (x-alpha(n))*Pn(x) - beta(n)*Pn-1(x)
221 
222 and zeroth moment Mu0
223 
224 Mu0 = integral(W(x)dx,a,b)
225 
226 INPUT PARAMETERS:
227  Alpha - array[0..N-2], alpha coefficients
228  Beta - array[0..N-2], beta coefficients.
229  Zero-indexed element is not used, may be arbitrary.
230  Beta[I]>0
231  Mu0 - zeroth moment of the weighting function.
232  A - left boundary of the integration interval.
233  B - right boundary of the integration interval.
234  N - number of nodes of the quadrature formula, N>=3
235  (including the left and right boundary nodes).
236 
237 OUTPUT PARAMETERS:
238  Info - error code:
239  * -3 internal eigenproblem solver hasn't converged
240  * -2 Beta[i]<=0
241  * -1 incorrect N was passed
242  * 1 OK
243  X - array[0..N-1] - array of quadrature nodes,
244  in ascending order.
245  W - array[0..N-1] - array of quadrature weights.
246 
247  -- ALGLIB --
248  Copyright 2005-2009 by Bochkanov Sergey
249 *************************************************************************/
250 void gqgenerategausslobattorec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const double a, const double b, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w);
251 
252 
253 /*************************************************************************
254 Computation of nodes and weights for a Gauss-Radau quadrature formula
255 
256 The algorithm generates the N-point Gauss-Radau quadrature formula with
257 weight function given by the coefficients alpha and beta of a recurrence
258 which generates a system of orthogonal polynomials.
259 
260 P-1(x) = 0
261 P0(x) = 1
262 Pn+1(x) = (x-alpha(n))*Pn(x) - beta(n)*Pn-1(x)
263 
264 and zeroth moment Mu0
265 
266 Mu0 = integral(W(x)dx,a,b)
267 
268 INPUT PARAMETERS:
269  Alpha - array[0..N-2], alpha coefficients.
270  Beta - array[0..N-1], beta coefficients
271  Zero-indexed element is not used.
272  Beta[I]>0
273  Mu0 - zeroth moment of the weighting function.
274  A - left boundary of the integration interval.
275  N - number of nodes of the quadrature formula, N>=2
276  (including the left boundary node).
277 
278 OUTPUT PARAMETERS:
279  Info - error code:
280  * -3 internal eigenproblem solver hasn't converged
281  * -2 Beta[i]<=0
282  * -1 incorrect N was passed
283  * 1 OK
284  X - array[0..N-1] - array of quadrature nodes,
285  in ascending order.
286  W - array[0..N-1] - array of quadrature weights.
287 
288 
289  -- ALGLIB --
290  Copyright 2005-2009 by Bochkanov Sergey
291 *************************************************************************/
292 void gqgenerategaussradaurec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const double a, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w);
293 
294 
295 /*************************************************************************
296 Returns nodes/weights for Gauss-Legendre quadrature on [-1,1] with N
297 nodes.
298 
299 INPUT PARAMETERS:
300  N - number of nodes, >=1
301 
302 OUTPUT PARAMETERS:
303  Info - error code:
304  * -4 an error was detected when calculating
305  weights/nodes. N is too large to obtain
306  weights/nodes with high enough accuracy.
307  Try to use multiple precision version.
308  * -3 internal eigenproblem solver hasn't converged
309  * -1 incorrect N was passed
310  * +1 OK
311  X - array[0..N-1] - array of quadrature nodes,
312  in ascending order.
313  W - array[0..N-1] - array of quadrature weights.
314 
315 
316  -- ALGLIB --
317  Copyright 12.05.2009 by Bochkanov Sergey
318 *************************************************************************/
320 
321 
322 /*************************************************************************
323 Returns nodes/weights for Gauss-Jacobi quadrature on [-1,1] with weight
324 function W(x)=Power(1-x,Alpha)*Power(1+x,Beta).
325 
326 INPUT PARAMETERS:
327  N - number of nodes, >=1
328  Alpha - power-law coefficient, Alpha>-1
329  Beta - power-law coefficient, Beta>-1
330 
331 OUTPUT PARAMETERS:
332  Info - error code:
333  * -4 an error was detected when calculating
334  weights/nodes. Alpha or Beta are too close
335  to -1 to obtain weights/nodes with high enough
336  accuracy, or, may be, N is too large. Try to
337  use multiple precision version.
338  * -3 internal eigenproblem solver hasn't converged
339  * -1 incorrect N/Alpha/Beta was passed
340  * +1 OK
341  X - array[0..N-1] - array of quadrature nodes,
342  in ascending order.
343  W - array[0..N-1] - array of quadrature weights.
344 
345 
346  -- ALGLIB --
347  Copyright 12.05.2009 by Bochkanov Sergey
348 *************************************************************************/
349 void gqgenerategaussjacobi(const ae_int_t n, const double alpha, const double beta, ae_int_t &info, real_1d_array &x, real_1d_array &w);
350 
351 
352 /*************************************************************************
353 Returns nodes/weights for Gauss-Laguerre quadrature on [0,+inf) with
354 weight function W(x)=Power(x,Alpha)*Exp(-x)
355 
356 INPUT PARAMETERS:
357  N - number of nodes, >=1
358  Alpha - power-law coefficient, Alpha>-1
359 
360 OUTPUT PARAMETERS:
361  Info - error code:
362  * -4 an error was detected when calculating
363  weights/nodes. Alpha is too close to -1 to
364  obtain weights/nodes with high enough accuracy
365  or, may be, N is too large. Try to use
366  multiple precision version.
367  * -3 internal eigenproblem solver hasn't converged
368  * -1 incorrect N/Alpha was passed
369  * +1 OK
370  X - array[0..N-1] - array of quadrature nodes,
371  in ascending order.
372  W - array[0..N-1] - array of quadrature weights.
373 
374 
375  -- ALGLIB --
376  Copyright 12.05.2009 by Bochkanov Sergey
377 *************************************************************************/
378 void gqgenerategausslaguerre(const ae_int_t n, const double alpha, ae_int_t &info, real_1d_array &x, real_1d_array &w);
379 
380 
381 /*************************************************************************
382 Returns nodes/weights for Gauss-Hermite quadrature on (-inf,+inf) with
383 weight function W(x)=Exp(-x*x)
384 
385 INPUT PARAMETERS:
386  N - number of nodes, >=1
387 
388 OUTPUT PARAMETERS:
389  Info - error code:
390  * -4 an error was detected when calculating
391  weights/nodes. May be, N is too large. Try to
392  use multiple precision version.
393  * -3 internal eigenproblem solver hasn't converged
394  * -1 incorrect N/Alpha was passed
395  * +1 OK
396  X - array[0..N-1] - array of quadrature nodes,
397  in ascending order.
398  W - array[0..N-1] - array of quadrature weights.
399 
400 
401  -- ALGLIB --
402  Copyright 12.05.2009 by Bochkanov Sergey
403 *************************************************************************/
405 
406 /*************************************************************************
407 Computation of nodes and weights of a Gauss-Kronrod quadrature formula
408 
409 The algorithm generates the N-point Gauss-Kronrod quadrature formula with
410 weight function given by coefficients alpha and beta of a recurrence
411 relation which generates a system of orthogonal polynomials:
412 
413  P-1(x) = 0
414  P0(x) = 1
415  Pn+1(x) = (x-alpha(n))*Pn(x) - beta(n)*Pn-1(x)
416 
417 and zero moment Mu0
418 
419  Mu0 = integral(W(x)dx,a,b)
420 
421 
422 INPUT PARAMETERS:
423  Alpha - alpha coefficients, array[0..floor(3*K/2)].
424  Beta - beta coefficients, array[0..ceil(3*K/2)].
425  Beta[0] is not used and may be arbitrary.
426  Beta[I]>0.
427  Mu0 - zeroth moment of the weight function.
428  N - number of nodes of the Gauss-Kronrod quadrature formula,
429  N >= 3,
430  N = 2*K+1.
431 
432 OUTPUT PARAMETERS:
433  Info - error code:
434  * -5 no real and positive Gauss-Kronrod formula can
435  be created for such a weight function with a
436  given number of nodes.
437  * -4 N is too large, task may be ill conditioned -
438  x[i]=x[i+1] found.
439  * -3 internal eigenproblem solver hasn't converged
440  * -2 Beta[i]<=0
441  * -1 incorrect N was passed
442  * +1 OK
443  X - array[0..N-1] - array of quadrature nodes,
444  in ascending order.
445  WKronrod - array[0..N-1] - Kronrod weights
446  WGauss - array[0..N-1] - Gauss weights (interleaved with zeros
447  corresponding to extended Kronrod nodes).
448 
449  -- ALGLIB --
450  Copyright 08.05.2009 by Bochkanov Sergey
451 *************************************************************************/
452 void gkqgeneraterec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss);
453 
454 
455 /*************************************************************************
456 Returns Gauss and Gauss-Kronrod nodes/weights for Gauss-Legendre
457 quadrature with N points.
458 
459 GKQLegendreCalc (calculation) or GKQLegendreTbl (precomputed table) is
460 used depending on machine precision and number of nodes.
461 
462 INPUT PARAMETERS:
463  N - number of Kronrod nodes, must be odd number, >=3.
464 
465 OUTPUT PARAMETERS:
466  Info - error code:
467  * -4 an error was detected when calculating
468  weights/nodes. N is too large to obtain
469  weights/nodes with high enough accuracy.
470  Try to use multiple precision version.
471  * -3 internal eigenproblem solver hasn't converged
472  * -1 incorrect N was passed
473  * +1 OK
474  X - array[0..N-1] - array of quadrature nodes, ordered in
475  ascending order.
476  WKronrod - array[0..N-1] - Kronrod weights
477  WGauss - array[0..N-1] - Gauss weights (interleaved with zeros
478  corresponding to extended Kronrod nodes).
479 
480 
481  -- ALGLIB --
482  Copyright 12.05.2009 by Bochkanov Sergey
483 *************************************************************************/
485 
486 
487 /*************************************************************************
488 Returns Gauss and Gauss-Kronrod nodes/weights for Gauss-Jacobi
489 quadrature on [-1,1] with weight function
490 
491  W(x)=Power(1-x,Alpha)*Power(1+x,Beta).
492 
493 INPUT PARAMETERS:
494  N - number of Kronrod nodes, must be odd number, >=3.
495  Alpha - power-law coefficient, Alpha>-1
496  Beta - power-law coefficient, Beta>-1
497 
498 OUTPUT PARAMETERS:
499  Info - error code:
500  * -5 no real and positive Gauss-Kronrod formula can
501  be created for such a weight function with a
502  given number of nodes.
503  * -4 an error was detected when calculating
504  weights/nodes. Alpha or Beta are too close
505  to -1 to obtain weights/nodes with high enough
506  accuracy, or, may be, N is too large. Try to
507  use multiple precision version.
508  * -3 internal eigenproblem solver hasn't converged
509  * -1 incorrect N was passed
510  * +1 OK
511  * +2 OK, but quadrature rule have exterior nodes,
512  x[0]<-1 or x[n-1]>+1
513  X - array[0..N-1] - array of quadrature nodes, ordered in
514  ascending order.
515  WKronrod - array[0..N-1] - Kronrod weights
516  WGauss - array[0..N-1] - Gauss weights (interleaved with zeros
517  corresponding to extended Kronrod nodes).
518 
519 
520  -- ALGLIB --
521  Copyright 12.05.2009 by Bochkanov Sergey
522 *************************************************************************/
523 void gkqgenerategaussjacobi(const ae_int_t n, const double alpha, const double beta, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss);
524 
525 
526 /*************************************************************************
527 Returns Gauss and Gauss-Kronrod nodes for quadrature with N points.
528 
529 Reduction to tridiagonal eigenproblem is used.
530 
531 INPUT PARAMETERS:
532  N - number of Kronrod nodes, must be odd number, >=3.
533 
534 OUTPUT PARAMETERS:
535  Info - error code:
536  * -4 an error was detected when calculating
537  weights/nodes. N is too large to obtain
538  weights/nodes with high enough accuracy.
539  Try to use multiple precision version.
540  * -3 internal eigenproblem solver hasn't converged
541  * -1 incorrect N was passed
542  * +1 OK
543  X - array[0..N-1] - array of quadrature nodes, ordered in
544  ascending order.
545  WKronrod - array[0..N-1] - Kronrod weights
546  WGauss - array[0..N-1] - Gauss weights (interleaved with zeros
547  corresponding to extended Kronrod nodes).
548 
549  -- ALGLIB --
550  Copyright 12.05.2009 by Bochkanov Sergey
551 *************************************************************************/
552 void gkqlegendrecalc(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss);
553 
554 
555 /*************************************************************************
556 Returns Gauss and Gauss-Kronrod nodes for quadrature with N points using
557 pre-calculated table. Nodes/weights were computed with accuracy up to
558 1.0E-32 (if MPFR version of ALGLIB is used). In standard double precision
559 accuracy reduces to something about 2.0E-16 (depending on your compiler's
560 handling of long floating point constants).
561 
562 INPUT PARAMETERS:
563  N - number of Kronrod nodes.
564  N can be 15, 21, 31, 41, 51, 61.
565 
566 OUTPUT PARAMETERS:
567  X - array[0..N-1] - array of quadrature nodes, ordered in
568  ascending order.
569  WKronrod - array[0..N-1] - Kronrod weights
570  WGauss - array[0..N-1] - Gauss weights (interleaved with zeros
571  corresponding to extended Kronrod nodes).
572 
573 
574  -- ALGLIB --
575  Copyright 12.05.2009 by Bochkanov Sergey
576 *************************************************************************/
577 void gkqlegendretbl(const ae_int_t n, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss, double &eps);
578 
579 /*************************************************************************
580 Integration of a smooth function F(x) on a finite interval [a,b].
581 
582 Fast-convergent algorithm based on a Gauss-Kronrod formula is used. Result
583 is calculated with accuracy close to the machine precision.
584 
585 Algorithm works well only with smooth integrands. It may be used with
586 continuous non-smooth integrands, but with less performance.
587 
588 It should never be used with integrands which have integrable singularities
589 at lower or upper limits - algorithm may crash. Use AutoGKSingular in such
590 cases.
591 
592 INPUT PARAMETERS:
593  A, B - interval boundaries (A<B, A=B or A>B)
594 
595 OUTPUT PARAMETERS
596  State - structure which stores algorithm state
597 
598 SEE ALSO
599  AutoGKSmoothW, AutoGKSingular, AutoGKResults.
600 
601 
602  -- ALGLIB --
603  Copyright 06.05.2009 by Bochkanov Sergey
604 *************************************************************************/
605 void autogksmooth(const double a, const double b, autogkstate &state);
606 
607 
608 /*************************************************************************
609 Integration of a smooth function F(x) on a finite interval [a,b].
610 
611 This subroutine is same as AutoGKSmooth(), but it guarantees that interval
612 [a,b] is partitioned into subintervals which have width at most XWidth.
613 
614 Subroutine can be used when integrating nearly-constant function with
615 narrow "bumps" (about XWidth wide). If "bumps" are too narrow, AutoGKSmooth
616 subroutine can overlook them.
617 
618 INPUT PARAMETERS:
619  A, B - interval boundaries (A<B, A=B or A>B)
620 
621 OUTPUT PARAMETERS
622  State - structure which stores algorithm state
623 
624 SEE ALSO
625  AutoGKSmooth, AutoGKSingular, AutoGKResults.
626 
627 
628  -- ALGLIB --
629  Copyright 06.05.2009 by Bochkanov Sergey
630 *************************************************************************/
631 void autogksmoothw(const double a, const double b, const double xwidth, autogkstate &state);
632 
633 
634 /*************************************************************************
635 Integration on a finite interval [A,B].
636 Integrand have integrable singularities at A/B.
637 
638 F(X) must diverge as "(x-A)^alpha" at A, as "(B-x)^beta" at B, with known
639 alpha/beta (alpha>-1, beta>-1). If alpha/beta are not known, estimates
640 from below can be used (but these estimates should be greater than -1 too).
641 
642 One of alpha/beta variables (or even both alpha/beta) may be equal to 0,
643 which means than function F(x) is non-singular at A/B. Anyway (singular at
644 bounds or not), function F(x) is supposed to be continuous on (A,B).
645 
646 Fast-convergent algorithm based on a Gauss-Kronrod formula is used. Result
647 is calculated with accuracy close to the machine precision.
648 
649 INPUT PARAMETERS:
650  A, B - interval boundaries (A<B, A=B or A>B)
651  Alpha - power-law coefficient of the F(x) at A,
652  Alpha>-1
653  Beta - power-law coefficient of the F(x) at B,
654  Beta>-1
655 
656 OUTPUT PARAMETERS
657  State - structure which stores algorithm state
658 
659 SEE ALSO
660  AutoGKSmooth, AutoGKSmoothW, AutoGKResults.
661 
662 
663  -- ALGLIB --
664  Copyright 06.05.2009 by Bochkanov Sergey
665 *************************************************************************/
666 void autogksingular(const double a, const double b, const double alpha, const double beta, autogkstate &state);
667 
668 
669 /*************************************************************************
670 This function provides reverse communication interface
671 Reverse communication interface is not documented or recommended to use.
672 See below for functions which provide better documented API
673 *************************************************************************/
674 bool autogkiteration(const autogkstate &state);
675 
676 
677 /*************************************************************************
678 This function is used to launcn iterations of the 1-dimensional integrator
679 
680 It accepts following parameters:
681  func - callback which calculates f(x) for given x
682  ptr - optional pointer which is passed to func; can be NULL
683 
684 
685  -- ALGLIB --
686  Copyright 07.05.2009 by Bochkanov Sergey
687 
688 *************************************************************************/
690  void (*func)(double x, double xminusa, double bminusx, double &y, void *ptr),
691  void *ptr = NULL);
692 
693 
694 /*************************************************************************
695 Adaptive integration results
696 
697 Called after AutoGKIteration returned False.
698 
699 Input parameters:
700  State - algorithm state (used by AutoGKIteration).
701 
702 Output parameters:
703  V - integral(f(x)dx,a,b)
704  Rep - optimization report (see AutoGKReport description)
705 
706  -- ALGLIB --
707  Copyright 14.11.2007 by Bochkanov Sergey
708 *************************************************************************/
709 void autogkresults(const autogkstate &state, double &v, autogkreport &rep);
710 }
711 
713 //
714 // THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (FUNCTIONS)
715 //
717 namespace alglib_impl
718 {
719 void gqgeneraterec(/* Real */ ae_vector* alpha,
720  /* Real */ ae_vector* beta,
721  double mu0,
722  ae_int_t n,
723  ae_int_t* info,
724  /* Real */ ae_vector* x,
725  /* Real */ ae_vector* w,
726  ae_state *_state);
727 void gqgenerategausslobattorec(/* Real */ ae_vector* alpha,
728  /* Real */ ae_vector* beta,
729  double mu0,
730  double a,
731  double b,
732  ae_int_t n,
733  ae_int_t* info,
734  /* Real */ ae_vector* x,
735  /* Real */ ae_vector* w,
736  ae_state *_state);
737 void gqgenerategaussradaurec(/* Real */ ae_vector* alpha,
738  /* Real */ ae_vector* beta,
739  double mu0,
740  double a,
741  ae_int_t n,
742  ae_int_t* info,
743  /* Real */ ae_vector* x,
744  /* Real */ ae_vector* w,
745  ae_state *_state);
747  ae_int_t* info,
748  /* Real */ ae_vector* x,
749  /* Real */ ae_vector* w,
750  ae_state *_state);
752  double alpha,
753  double beta,
754  ae_int_t* info,
755  /* Real */ ae_vector* x,
756  /* Real */ ae_vector* w,
757  ae_state *_state);
759  double alpha,
760  ae_int_t* info,
761  /* Real */ ae_vector* x,
762  /* Real */ ae_vector* w,
763  ae_state *_state);
765  ae_int_t* info,
766  /* Real */ ae_vector* x,
767  /* Real */ ae_vector* w,
768  ae_state *_state);
769 void gkqgeneraterec(/* Real */ ae_vector* alpha,
770  /* Real */ ae_vector* beta,
771  double mu0,
772  ae_int_t n,
773  ae_int_t* info,
774  /* Real */ ae_vector* x,
775  /* Real */ ae_vector* wkronrod,
776  /* Real */ ae_vector* wgauss,
777  ae_state *_state);
779  ae_int_t* info,
780  /* Real */ ae_vector* x,
781  /* Real */ ae_vector* wkronrod,
782  /* Real */ ae_vector* wgauss,
783  ae_state *_state);
785  double alpha,
786  double beta,
787  ae_int_t* info,
788  /* Real */ ae_vector* x,
789  /* Real */ ae_vector* wkronrod,
790  /* Real */ ae_vector* wgauss,
791  ae_state *_state);
793  ae_int_t* info,
794  /* Real */ ae_vector* x,
795  /* Real */ ae_vector* wkronrod,
796  /* Real */ ae_vector* wgauss,
797  ae_state *_state);
799  /* Real */ ae_vector* x,
800  /* Real */ ae_vector* wkronrod,
801  /* Real */ ae_vector* wgauss,
802  double* eps,
803  ae_state *_state);
804 void autogksmooth(double a,
805  double b,
806  autogkstate* state,
807  ae_state *_state);
808 void autogksmoothw(double a,
809  double b,
810  double xwidth,
811  autogkstate* state,
812  ae_state *_state);
813 void autogksingular(double a,
814  double b,
815  double alpha,
816  double beta,
817  autogkstate* state,
818  ae_state *_state);
821  double* v,
822  autogkreport* rep,
823  ae_state *_state);
824 void _autogkreport_init(void* _p, ae_state *_state);
825 void _autogkreport_init_copy(void* _dst, void* _src, ae_state *_state);
826 void _autogkreport_clear(void* _p);
827 void _autogkreport_destroy(void* _p);
828 void _autogkinternalstate_init(void* _p, ae_state *_state);
829 void _autogkinternalstate_init_copy(void* _dst, void* _src, ae_state *_state);
832 void _autogkstate_init(void* _p, ae_state *_state);
833 void _autogkstate_init_copy(void* _dst, void* _src, ae_state *_state);
834 void _autogkstate_clear(void* _p);
835 void _autogkstate_destroy(void* _p);
836 
837 }
838 #endif
839 
void _autogkstate_destroy(void *_p)
void autogksingular(const double a, const double b, const double alpha, const double beta, autogkstate &state)
void gqgenerategaussradaurec(ae_vector *alpha, ae_vector *beta, double mu0, double a, ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
void gkqlegendretbl(ae_int_t n, ae_vector *x, ae_vector *wkronrod, ae_vector *wgauss, double *eps, ae_state *_state)
alglib_impl::autogkstate * p_struct
Definition: integration.h:163
void gkqgenerategaussjacobi(const ae_int_t n, const double alpha, const double beta, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss)
void gqgenerategaussradaurec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const double a, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w)
void gqgenerategaussjacobi(const ae_int_t n, const double alpha, const double beta, ae_int_t &info, real_1d_array &x, real_1d_array &w)
void autogksmooth(double a, double b, autogkstate *state, ae_state *_state)
bool autogkiteration(const autogkstate &state)
autogkstate & operator=(const autogkstate &rhs)
void gkqlegendrecalc(ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *wkronrod, ae_vector *wgauss, ae_state *_state)
void autogksmoothw(const double a, const double b, const double xwidth, autogkstate &state)
_autogkreport_owner & operator=(const _autogkreport_owner &rhs)
void _autogkreport_clear(void *_p)
void gqgenerategausslobattorec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const double a, const double b, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w)
void _autogkreport_init(void *_p, ae_state *_state)
void gqgenerategausslegendre(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w)
void gkqgeneraterec(ae_vector *alpha, ae_vector *beta, double mu0, ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *wkronrod, ae_vector *wgauss, ae_state *_state)
void gkqgenerategausslegendre(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss)
void gkqgenerategausslegendre(ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *wkronrod, ae_vector *wgauss, ae_state *_state)
void gqgeneraterec(ae_vector *alpha, ae_vector *beta, double mu0, ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
alglib_impl::autogkreport * p_struct
Definition: integration.h:130
autogkreport & operator=(const autogkreport &rhs)
#define ae_bool
Definition: ap.h:193
void autogksmooth(const double a, const double b, autogkstate &state)
void autogkresults(const autogkstate &state, double &v, autogkreport &rep)
void gqgeneraterec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w)
void _autogkreport_init_copy(void *_dst, void *_src, ae_state *_state)
void _autogkinternalstate_clear(void *_p)
void gkqlegendretbl(const ae_int_t n, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss, double &eps)
void autogkintegrate(autogkstate &state, void(*func)(double x, double xminusa, double bminusx, double &y, void *ptr), void *ptr=NULL)
void gqgenerategausshermite(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w)
ae_bool autogkiteration(autogkstate *state, ae_state *_state)
void _autogkinternalstate_destroy(void *_p)
void gkqlegendrecalc(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss)
void gkqgenerategaussjacobi(ae_int_t n, double alpha, double beta, ae_int_t *info, ae_vector *x, ae_vector *wkronrod, ae_vector *wgauss, ae_state *_state)
ae_int_t & terminationtype
Definition: integration.h:129
void autogksmoothw(double a, double b, double xwidth, autogkstate *state, ae_state *_state)
void _autogkreport_destroy(void *_p)
void _autogkstate_init(void *_p, ae_state *_state)
void autogkresults(autogkstate *state, double *v, autogkreport *rep, ae_state *_state)
void gqgenerategausslegendre(ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
virtual ~autogkstate()
alglib_impl::ae_int_t ae_int_t
Definition: ap.h:965
void _autogkstate_init_copy(void *_dst, void *_src, ae_state *_state)
void gqgenerategaussjacobi(ae_int_t n, double alpha, double beta, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
_autogkstate_owner & operator=(const _autogkstate_owner &rhs)
void _autogkinternalstate_init_copy(void *_dst, void *_src, ae_state *_state)
double beta(const double a, const double b)
alglib_impl::autogkstate * c_ptr()
void gqgenerategausshermite(ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
void gqgenerategausslaguerre(ae_int_t n, double alpha, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
double beta(double a, double b, ae_state *_state)
struct alglib_impl::ae_matrix ae_matrix
void autogksingular(double a, double b, double alpha, double beta, autogkstate *state, ae_state *_state)
void gqgenerategausslaguerre(const ae_int_t n, const double alpha, ae_int_t &info, real_1d_array &x, real_1d_array &w)
alglib_impl::autogkreport * c_ptr()
ae_int_t & nintervals
Definition: integration.h:131
void _autogkstate_clear(void *_p)
ptrdiff_t ae_int_t
Definition: ap.h:185
void gkqgeneraterec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss)
void _autogkinternalstate_init(void *_p, ae_state *_state)
void gqgenerategausslobattorec(ae_vector *alpha, ae_vector *beta, double mu0, double a, double b, ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich