SHOGUN
v3.0.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
mathematics
Integration.h
浏览该文件的文档.
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
>
26
#include <
shogun/lib/DynamicArray.h
>
27
#include <
shogun/mathematics/Math.h
>
28
#include <
shogun/mathematics/Function.h
>
29
30
namespace
shogun
31
{
32
36
class
CIntegration
:
public
CSGObject
37
{
38
public
:
67
static
float64_t
integrate_quadgk
(
CFunction
* f,
float64_t
a,
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
92
static
float64_t
integrate_quadgh
(
CFunction
* f);
93
98
virtual
const
char
*
get_name
()
const
{
return
"Integration"
; }
99
100
private
:
116
static
void
evaluate_quadgk(
CFunction
* f,
CDynamicArray<float64_t>
* subs,
117
CDynamicArray<float64_t>
* q,
CDynamicArray<float64_t>
* err,
index_t
n,
118
float64_t
* xgk,
float64_t
* wg,
float64_t
* wgk);
119
135
static
void
evaluate_quadgk15(
CFunction
* f,
CDynamicArray<float64_t>
* subs,
136
CDynamicArray<float64_t>
* q,
CDynamicArray<float64_t>
* err);
137
153
static
void
evaluate_quadgk21(
CFunction
* f,
CDynamicArray<float64_t>
* subs,
154
CDynamicArray<float64_t>
* q,
CDynamicArray<float64_t>
* err);
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_ */
SGObject.h
Math.h
index_t
int32_t index_t
Definition:
common.h:60
shogun::CIntegration::integrate_quadgk
static float64_t integrate_quadgk(CFunction *f, float64_t a, float64_t b, float64_t abs_tol=1e-10, float64_t rel_tol=1e-5, uint32_t max_iter=1000, index_t sn=10)
Definition:
Integration.cpp:249
config.h
shogun::CIntegration
Class that contains certain methods related to numerical integration.
Definition:
Integration.h:36
shogun::CFunction
Class of a function of one variable.
Definition:
Function.h:20
shogun::CSGObject
Class SGObject is the base class of all shogun objects.
Definition:
SGObject.h:114
shogun::CIntegration::integrate_quadgh
static float64_t integrate_quadgh(CFunction *f)
Definition:
Integration.cpp:422
float64_t
double float64_t
Definition:
common.h:48
shogun::CDynamicArray< float64_t >
shogun::CIntegration::get_name
virtual const char * get_name() const
Definition:
Integration.h:98
Function.h
DynamicArray.h
SHOGUN
Machine Learning Toolbox - Documentation