SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Integration.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (w) 2014 Wu Lin
8  * Written (W) 2013 Roman Votyakov
9  *
10  * The abscissae and weights for Gauss-Kronrod rules are taken form
11  * QUADPACK, which is in public domain.
12  * http://www.netlib.org/quadpack/
13  *
14  * See method comments which functions are adapted from GNU Octave,
15  * file quadgk.m: Copyright (C) 2008-2012 David Bateman under GPLv3
16  * http://www.gnu.org/software/octave/
17  *
18  * See method comments which functions are adapted from
19  * Gaussian Process Machine Learning Toolbox, file util/gauher.m,
20  * http://www.gaussianprocess.org/gpml/code/matlab/doc/
21  *
22  */
23 
24 #ifndef _INTEGRATION_H_
25 #define _INTEGRATION_H_
26 
27 #include <shogun/lib/config.h>
28 
29 #ifdef HAVE_EIGEN3
30 
31 #include <shogun/base/SGObject.h>
35 
36 namespace shogun
37 {
38 template<class T> class SGVector;
39 
43 class CIntegration : public CSGObject
44 {
45 public:
75  float64_t b, float64_t abs_tol=1e-10, float64_t rel_tol=1e-5,
76  uint32_t max_iter=1000, index_t sn=10);
77 
100 
127 
128 
139 
140 
151 
156  virtual const char* get_name() const { return "Integration"; }
157 
158 private:
174  static void evaluate_quadgk(CFunction* f, CDynamicArray<float64_t>* subs,
176  float64_t* xgk, float64_t* wg, float64_t* wgk);
177 
193  static void evaluate_quadgk15(CFunction* f, CDynamicArray<float64_t>* subs,
195 
211  static void evaluate_quadgk21(CFunction* f, CDynamicArray<float64_t>* subs,
213 
225  static float64_t evaluate_quadgh(CFunction* f, index_t n, float64_t* xh,
226  float64_t* wh);
227 
241  static float64_t evaluate_quadgh64(CFunction* f);
242 };
243 }
244 #endif /* HAVE_EIGEN3 */
245 #endif /* _INTEGRATION_H_ */

SHOGUN Machine Learning Toolbox - Documentation