SHOGUN  v3.0.0
 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) 2013 Roman Votyakov
8  *
9  * The abscissae and weights for Gauss-Kronrod rules are taken form
10  * QUADPACK, which is in public domain.
11  * http://www.netlib.org/quadpack/
12  *
13  * See method comments which functions are adapted from GNU Octave,
14  * file quadgk.m: Copyright (C) 2008-2012 David Bateman under GPLv3
15  * http://www.gnu.org/software/octave/
16  */
17 
18 #ifndef _INTEGRATION_H_
19 #define _INTEGRATION_H_
20 
21 #include <shogun/lib/config.h>
22 
23 #ifdef HAVE_EIGEN3
24 
25 #include <shogun/base/SGObject.h>
29 
30 namespace shogun
31 {
32 
36 class CIntegration : public CSGObject
37 {
38 public:
68  float64_t b, float64_t abs_tol=1e-10, float64_t rel_tol=1e-5,
69  uint32_t max_iter=1000, index_t sn=10);
70 
93 
98  virtual const char* get_name() const { return "Integration"; }
99 
100 private:
116  static void evaluate_quadgk(CFunction* f, CDynamicArray<float64_t>* subs,
118  float64_t* xgk, float64_t* wg, float64_t* wgk);
119 
135  static void evaluate_quadgk15(CFunction* f, CDynamicArray<float64_t>* subs,
137 
153  static void evaluate_quadgk21(CFunction* f, CDynamicArray<float64_t>* subs,
155 
167  static float64_t evaluate_quadgh(CFunction* f, index_t n, float64_t* xh,
168  float64_t* wh);
169 
183  static float64_t evaluate_quadgh64(CFunction* f);
184 };
185 }
186 #endif /* HAVE_EIGEN3 */
187 #endif /* _INTEGRATION_H_ */

SHOGUN Machine Learning Toolbox - Documentation