Commit Graph

233 Commits

Author SHA1 Message Date
148bcae793 Merge 35e46282b6 into 85c4183237 2017-01-08 11:19:07 +00:00
35e46282b6 Added support for functions with internal data.
Brief:
Let's say you want to add a function to the parser, which gives you
values from a specific array.
something like:
float values1[200]={...};
float values2[200]={...};
float values3[200]={...};
float getValue(void* v,float x)
{
	return ((float*)v)[(int)x%200];
}
int main()
{
	parser.add_function("values1",getValue,values1);
	parser.add_function("values2",getValue,values2);
	parser.add_function("values3",getValue,values3);
	float x;
	parser.add_variable("x",x);
	parser.parse("values1(x)*values2(x)");
}
........
I also added functors for functions like rand that doesn't get
arguments.
2017-01-08 13:13:44 +02:00
85c4183237 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-12-19 06:06:23 +11:00
bf0b538e77 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-12-18 17:44:17 +11:00
54c923572a C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-12-18 15:34:51 +11:00
d296b0b73b C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-12-15 10:46:23 +11:00
fca5cde103 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-26 17:01:09 +11:00
6db84b654f C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-19 20:07:59 +11:00
e21b7d2e0b C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-19 18:21:34 +11:00
bf24f1fc52 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-19 18:20:26 +11:00
3209f74e7f C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-18 13:17:34 +11:00
165e10a5f0 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-17 09:30:38 +11:00
bf5e55fc37 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-15 10:47:18 +11:00
c57053fba1 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-13 11:22:37 +11:00
57041af631 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-13 07:52:26 +11:00
4e8e9b98e7 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-11 12:46:39 +11:00
e7bf0da424 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-10 18:40:57 +11:00
ee004640a0 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-10 17:30:19 +11:00
a4fd5ceb54 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-10 13:20:38 +11:00
6b0dfbced9 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-10 12:17:33 +11:00
9a269be6a4 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-09 16:31:52 +11:00
b3f673f75e C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-06 08:20:01 +11:00
d86f6da090 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-05 13:33:35 +11:00
5fbbe49c96 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-04 15:09:09 +11:00
2634a0b0b4 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-04 10:27:29 +11:00
778726493b C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-03 08:49:58 +11:00
8605c9fc50 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-03 07:47:15 +11:00
a945f92ecd C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-02 23:47:34 +11:00
47b91ed6e7 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-02 21:43:42 +11:00
67718cb601 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-02 20:23:18 +11:00
83645a61f9 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-10-02 20:16:28 +11:00
46b918c99a C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-29 08:53:05 +10:00
41648363a0 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-27 23:20:31 +10:00
94214bf65d C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-26 19:16:08 +10:00
5728bb1327 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-26 10:50:06 +10:00
d63c4c274d C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-17 14:33:51 +10:00
cfe8fd136b C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-17 12:51:11 +10:00
2db206be89 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-16 09:30:36 +10:00
f3d7beab91 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-10 13:15:59 +10:00
cfde61cb85 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-06 09:15:02 +10:00
92dc4470c4 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-06 08:27:19 +10:00
e0b0aa5130 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-09-01 09:21:23 +10:00
ed5eec1836 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-08-30 11:00:17 +10:00
379317db93 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-08-27 13:31:09 +10:00
288644de2d C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-08-24 03:30:08 +10:00
9de391ed3c C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-08-22 20:44:01 +10:00
df884b3554 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-08-22 20:30:35 +10:00
a73cec0a35 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-08-22 19:09:47 +10:00
0cbb6ee004 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-08-22 18:54:54 +10:00
a05c9a55c7 C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html 2016-08-22 18:38:35 +10:00