aboutsummaryrefslogtreecommitdiff
path: root/chaos/src/bernoulli_map.hpp
diff options
context:
space:
mode:
authorTim Blechmann <timblech@users.sourceforge.net>2004-12-27 14:44:11 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:11:58 +0200
commitb2f2fd990f9059db784a7849726c6fc5006c70f9 (patch)
treec867375b241055491d7665624aa24aa84c00c9b1 /chaos/src/bernoulli_map.hpp
parenteced45909ba691a454fec179360ec1c2663f773a (diff)
a lot of new objects ...
svn path=/trunk/externals/tb/; revision=2431
Diffstat (limited to 'chaos/src/bernoulli_map.hpp')
-rw-r--r--chaos/src/bernoulli_map.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/chaos/src/bernoulli_map.hpp b/chaos/src/bernoulli_map.hpp
index 50bca13..25d19f8 100644
--- a/chaos/src/bernoulli_map.hpp
+++ b/chaos/src/bernoulli_map.hpp
@@ -25,17 +25,17 @@
// taken from Willi-Hans Steeb: Chaos and Fractals
class bernoulli:
- protected map_base
+ public map_base
{
public:
bernoulli()
{
- m_num_eq = 1:
+ m_num_eq = 1;
m_data = new data_t[1];
- CHAOS_SYS_INIT(x,0.5)
+ CHAOS_SYS_INIT(x,0.5);
}
- ~Bernoulli()
+ ~bernoulli()
{
delete m_data;
}
@@ -43,6 +43,9 @@ public:
virtual void m_step()
{
data_t x = m_data[0];
+
+ if (x <= 0)
+ x = 0.00001; //stability
if (x < 0.5f)
m_data[0] = 2.f * x;