From 404bfef9e23dfc3166cb2005367e7e8a41863914 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Thu, 23 Dec 2004 10:07:17 +0000 Subject: base class macros svn path=/trunk/externals/tb/; revision=2426 --- chaos/src/tent_map.hpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'chaos/src/tent_map.hpp') 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); -- cgit v1.2.1