Skip to content

Commit 90f2feb

Browse files
committed
Updates to ExprTk
1 parent 14c59f4 commit 90f2feb

23 files changed

+50
-46
lines changed

exprtk/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# **************************************************************
33
# * C++ Mathematical Expression Toolkit Library *
44
# * *
5-
# * Author: Arash Partow (1999-2021) *
5+
# * Author: Arash Partow (1999-2022) *
66
# * URL: http://www.partow.net/programming/exprtk/index.html *
77
# * *
88
# * Copyright notice: *

exprtk/exprtk.hpp

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
******************************************************************
33
* C++ Mathematical Expression Toolkit Library *
44
* *
5-
* Author: Arash Partow (1999-2021) *
5+
* Author: Arash Partow (1999-2022) *
66
* URL: https://www.partow.net/programming/exprtk/index.html *
77
* *
88
* Copyright notice: *
@@ -37903,45 +37903,49 @@ namespace exprtk
3790337903

3790437904
virtual ~base_func() {}
3790537905

37906-
#define assign(Index) \
37906+
#define exprtk_assign(Index) \
3790737907
(*v[Index]) = v##Index; \
3790837908

3790937909
inline void update(const T& v0)
3791037910
{
37911-
assign(0)
37911+
exprtk_assign(0)
3791237912
}
3791337913

3791437914
inline void update(const T& v0, const T& v1)
3791537915
{
37916-
assign(0) assign(1)
37916+
exprtk_assign(0) exprtk_assign(1)
3791737917
}
3791837918

3791937919
inline void update(const T& v0, const T& v1, const T& v2)
3792037920
{
37921-
assign(0) assign(1)
37922-
assign(2)
37921+
exprtk_assign(0) exprtk_assign(1)
37922+
exprtk_assign(2)
3792337923
}
3792437924

3792537925
inline void update(const T& v0, const T& v1, const T& v2, const T& v3)
3792637926
{
37927-
assign(0) assign(1)
37928-
assign(2) assign(3)
37927+
exprtk_assign(0) exprtk_assign(1)
37928+
exprtk_assign(2) exprtk_assign(3)
3792937929
}
3793037930

3793137931
inline void update(const T& v0, const T& v1, const T& v2, const T& v3, const T& v4)
3793237932
{
37933-
assign(0) assign(1)
37934-
assign(2) assign(3)
37935-
assign(4)
37933+
exprtk_assign(0) exprtk_assign(1)
37934+
exprtk_assign(2) exprtk_assign(3)
37935+
exprtk_assign(4)
3793637936
}
3793737937

3793837938
inline void update(const T& v0, const T& v1, const T& v2, const T& v3, const T& v4, const T& v5)
3793937939
{
37940-
assign(0) assign(1)
37941-
assign(2) assign(3)
37942-
assign(4) assign(5)
37940+
exprtk_assign(0) exprtk_assign(1)
37941+
exprtk_assign(2) exprtk_assign(3)
37942+
exprtk_assign(4) exprtk_assign(5)
3794337943
}
3794437944

37945+
#ifdef exprtk_assign
37946+
#undef exprtk_assign
37947+
#endif
37948+
3794537949
inline function_t& setup(expression_t& expr)
3794637950
{
3794737951
expression = expr;
@@ -40682,11 +40686,11 @@ namespace exprtk
4068240686
namespace information
4068340687
{
4068440688
static const char* library = "Mathematical Expression Toolkit";
40685-
static const char* version = "2.718281828459045235360287471352"
40686-
"66249775724709369995957496696762"
40687-
"77240766303535475945713821785251"
40688-
"66427427466391932003059921817413";
40689-
static const char* date = "20210101";
40689+
static const char* version = "2.7182818284590452353602874713526"
40690+
"624977572470936999595749669676277"
40691+
"240766303535475945713821785251664"
40692+
"274274663919320030599218174135966";
40693+
static const char* date = "20220101";
4069040694

4069140695
static inline std::string data()
4069240696
{

exprtk/exprtk_benchmark.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* ExprTk vs Native Benchmarks *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_01.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 1 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_02.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 2 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_03.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 3 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_04.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 4 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_05.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 5 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_06.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 6 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_07.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 7 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_08.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 8 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_09.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 9 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_10.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 10 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_11.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 11 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_12.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 12 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_13.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 13 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *
@@ -28,8 +28,8 @@ template <typename T>
2828
void savitzky_golay_filter()
2929
{
3030
typedef exprtk::symbol_table<T> symbol_table_t;
31-
typedef exprtk::expression<T> expression_t;
32-
typedef exprtk::parser<T> parser_t;
31+
typedef exprtk::expression<T> expression_t;
32+
typedef exprtk::parser<T> parser_t;
3333

3434
const std::string sgfilter_program =
3535
" var weight[9] := "
@@ -69,15 +69,15 @@ void savitzky_golay_filter()
6969
// Generate a signal with noise.
7070
for (T t = T(-5); t <= T(+5); t += T(10.0 / n))
7171
{
72-
T noise = T(0.5 * (rand() / (RAND_MAX + 1.0) - 0.5));
72+
const T noise = T(0.5 * (rand() / (RAND_MAX + 1.0) - 0.5));
7373
v_in.push_back(sin(2.0 * pi * t) + noise);
7474
}
7575

7676
v_out.resize(v_in.size());
7777

7878
symbol_table_t symbol_table;
79-
symbol_table.add_vector("v_in" , v_in);
80-
symbol_table.add_vector("v_out",v_out);
79+
symbol_table.add_vector("v_in" , v_in );
80+
symbol_table.add_vector("v_out", v_out);
8181

8282
expression_t expression;
8383
expression.register_symbol_table(symbol_table);

exprtk/exprtk_simple_example_14.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 14 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_15.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 15 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 16 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_17.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 17 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_18.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 18 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_simple_example_19.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Simple Example 19 *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

exprtk/exprtk_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* C++ Mathematical Expression Toolkit Library *
44
* *
55
* Examples and Unit-Tests *
6-
* Author: Arash Partow (1999-2021) *
6+
* Author: Arash Partow (1999-2022) *
77
* URL: http://www.partow.net/programming/exprtk/index.html *
88
* *
99
* Copyright notice: *

0 commit comments

Comments
 (0)