SciDAVis
1.D4
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scidavis
src
MyParser.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : MyParser.h
3
Project : SciDAVis
4
--------------------------------------------------------------------
5
Copyright : (C) 2006 by Ion Vasilief, Tilman Benkert
6
Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net
7
Description : Parser class based on muParser
8
9
***************************************************************************/
10
11
/***************************************************************************
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* *
18
* This program is distributed in the hope that it will be useful, *
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21
* GNU General Public License for more details. *
22
* *
23
* You should have received a copy of the GNU General Public License *
24
* along with this program; if not, write to the Free Software *
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26
* Boston, MA 02110-1301 USA *
27
* *
28
***************************************************************************/
29
#ifndef MYPARSER_H
30
#define MYPARSER_H
31
32
#include <muParser.h>
33
#include <gsl/gsl_math.h>
34
#include <gsl/gsl_sf.h>
35
36
#include <qstringlist.h>
37
38
using namespace
mu;
39
49
class
MyParser
:
public
Parser
50
{
51
public
:
52
MyParser
();
53
54
static
QStringList functionsList();
55
static
QString explainFunction(
int
index);
56
57
static
double
bessel_J0(
double
x)
58
{
59
return
gsl_sf_bessel_J0 (x);
60
}
61
62
static
double
bessel_J1(
double
x)
63
{
64
return
gsl_sf_bessel_J1 (x);
65
}
66
67
static
double
bessel_Jn(
double
x,
double
n)
68
{
69
return
gsl_sf_bessel_Jn ((
int
)n, x);
70
}
71
72
static
double
bessel_Y0(
double
x)
73
{
74
return
gsl_sf_bessel_Y0 (x);
75
}
76
77
static
double
bessel_Y1(
double
x)
78
{
79
return
gsl_sf_bessel_Y1 (x);
80
}
81
static
double
bessel_Yn(
double
x,
double
n)
82
{
83
return
gsl_sf_bessel_Yn ((
int
)n, x);
84
}
85
static
double
beta(
double
a,
double
b)
86
{
87
return
gsl_sf_beta (a, b);
88
}
89
static
double
erf(
double
x)
90
{
91
return
gsl_sf_erf (x);
92
}
93
static
double
erfc(
double
x)
94
{
95
return
gsl_sf_erfc (x);
96
}
97
static
double
erfz(
double
x)
98
{
99
return
gsl_sf_erf_Z (x);
100
}
101
static
double
erfq(
double
x)
102
{
103
return
gsl_sf_erf_Q (x);
104
}
105
static
double
gamma(
double
x)
106
{
107
return
gsl_sf_gamma (x);
108
}
109
static
double
gammaln(
double
x)
110
{
111
return
gsl_sf_lngamma (x);
112
}
113
static
double
hazard(
double
x)
114
{
115
return
gsl_sf_hazard (x);
116
}
117
};
118
119
#endif
Generated by
1.8.1