diff options
author | Tim Blechmann <timblech@users.sourceforge.net> | 2004-12-23 10:07:17 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:11:57 +0200 |
commit | 404bfef9e23dfc3166cb2005367e7e8a41863914 (patch) | |
tree | 3995ab20cf7ec984560c44e4fdeef1106ce8ff1c /chaos/src/tent_map.hpp | |
parent | 5233c01a26329306c9f1d08c1a39733aee2cc518 (diff) |
base class macros
svn path=/trunk/externals/tb/; revision=2426
Diffstat (limited to 'chaos/src/tent_map.hpp')
-rw-r--r-- | chaos/src/tent_map.hpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/chaos/src/tent_map.hpp b/chaos/src/tent_map.hpp index 16de333..137599a 100644 --- a/chaos/src/tent_map.hpp +++ b/chaos/src/tent_map.hpp @@ -33,7 +33,7 @@ public: { m_num_eq = 1; m_data = new data_t[1]; - set_x(0.5); + CHAOS_SYS_INIT(x, 0.5); } ~tent() @@ -50,14 +50,21 @@ public: else m_data[0] = 2.f * (1.f - data); } + + CHAOS_SYSPAR_FUNCS_PRED(x, m_pred_x); + bool m_pred_x(t_float f) + { + return (f >= 0) && (f < 1); + } }; -#define LOGISTIC_CALLBACKS \ -MAP_CALLBACKS \ -FLEXT_CALLVAR_F(m_system->get_x, m_system->set_x); +#define LOGISTIC_CALLBACKS \ +MAP_CALLBACKS \ +CHAOS_SYS_CALLBACKS(x); + +#define LOGISTIC_ATTRIBUTES \ +MAP_ATTRIBUTES \ +CHAOS_SYS_ATTRIBUTE(x); -#define LOGISTIC_ATTRIBUTES \ -MAP_ATTRIBUTES \ -FLEXT_ADDATTR_VAR("x",m_system->get_x, m_system->set_x); |