Update of /cvsroot/pure-data/externals/tb/chaos/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14009
Modified Files: Makefile.am chaos.hpp chaos_base.hpp driven_anharmonic.hpp latoocarfian.hpp latoomutalpha.hpp latoomutbeta.hpp latoomutgamma.hpp main.cpp Log Message: stability improvement and others
Index: main.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/tb/chaos/src/main.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main.cpp 1 Jan 2005 11:06:58 -0000 1.8 --- main.cpp 12 Feb 2005 08:58:21 -0000 1.9 *************** *** 24,28 **** void chaos_library_setup() { ! post("chaos~ version "PACKAGE_VERSION"\n");
CHAOS_ADD(bernoulli); --- 24,29 ---- void chaos_library_setup() { ! post("chaos~ version "PACKAGE_VERSION", compiled on "__DATE__" \n"); !
CHAOS_ADD(bernoulli);
Index: chaos.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/tb/chaos/src/chaos.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** chaos.hpp 1 Jan 2005 11:06:58 -0000 1.6 --- chaos.hpp 12 Feb 2005 08:58:20 -0000 1.7 *************** *** 23,26 **** --- 23,27 ---- #define FLEXT_ATTRIBUTES 1
+ #define _USE_MATH_DEFINES /* tg says: define this before including cmath */ #include "flext.h" #include "chaos_defs.hpp"
Index: latoomutalpha.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/tb/chaos/src/latoomutalpha.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** latoomutalpha.hpp 28 Dec 2004 12:38:45 -0000 1.1 --- latoomutalpha.hpp 12 Feb 2005 08:58:21 -0000 1.2 *************** *** 62,65 **** --- 62,77 ---- }
+ /* function has a fix point for x1 == x2 == 0 */ + virtual void m_verify() + { + for (int i = 0; i != get_num_eq(); ++i) + { + #ifndef DOUBLE_PRECISION + if (PD_BIGORSMALL(m_data[i])) + m_data[i] = 0.01; + #endif + } + }; + CHAOS_SYSVAR_FUNCS(x1, 0); CHAOS_SYSVAR_FUNCS(x2, 1);
Index: latoocarfian.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/tb/chaos/src/latoocarfian.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** latoocarfian.hpp 28 Dec 2004 12:38:45 -0000 1.1 --- latoocarfian.hpp 12 Feb 2005 08:58:21 -0000 1.2 *************** *** 77,80 **** --- 77,92 ---- return (f > -0.5) && (f < 1.5); } + + /* function has a fix point for x1 == x2 == 0 */ + virtual void m_verify() + { + for (int i = 0; i != get_num_eq(); ++i) + { + #ifndef DOUBLE_PRECISION + if (PD_BIGORSMALL(m_data[i])) + m_data[i] = 0.01; + #endif + } + }; };
Index: Makefile.am =================================================================== RCS file: /cvsroot/pure-data/externals/tb/chaos/src/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 1 Jan 2005 11:06:58 -0000 1.8 --- Makefile.am 12 Feb 2005 08:58:20 -0000 1.9 *************** *** 1,5 **** NAME = chaos
! BUILT_SOURCES = main.cpp ode_base.cpp chaos_base.cpp chaos_dsp.cpp \ bernoulli_dsp.cpp bernoulli_msg.cpp \ bungalow_tent_dsp.cpp bungalow_tent_msg.cpp \ --- 1,5 ---- NAME = chaos
! BUILT_SOURCES = main.cpp ode_base.cpp chaos_dsp.cpp \ bernoulli_dsp.cpp bernoulli_msg.cpp \ bungalow_tent_dsp.cpp bungalow_tent_msg.cpp \
Index: latoomutbeta.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/tb/chaos/src/latoomutbeta.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** latoomutbeta.hpp 28 Dec 2004 12:38:45 -0000 1.1 --- latoomutbeta.hpp 12 Feb 2005 08:58:21 -0000 1.2 *************** *** 59,62 **** --- 59,75 ---- }
+ + /* function has a fix point for x1 == x2 == 0 */ + virtual void m_verify() + { + for (int i = 0; i != get_num_eq(); ++i) + { + #ifndef DOUBLE_PRECISION + if (PD_BIGORSMALL(m_data[i])) + m_data[i] = 0.01; + #endif + } + }; + CHAOS_SYSVAR_FUNCS(x1, 0); CHAOS_SYSVAR_FUNCS(x2, 1);
Index: driven_anharmonic.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/tb/chaos/src/driven_anharmonic.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** driven_anharmonic.hpp 27 Dec 2004 22:55:41 -0000 1.1 --- driven_anharmonic.hpp 12 Feb 2005 08:58:20 -0000 1.2 *************** *** 72,76 **** if (m_t > 2 * M_PI) ! m_t = fmod(m_t, 2*M_PI); } --- 72,76 ---- if (m_t > 2 * M_PI) ! m_t = fmod(m_t, (data_t)2*M_PI); }
Index: chaos_base.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/tb/chaos/src/chaos_base.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** chaos_base.hpp 1 Jan 2005 11:06:58 -0000 1.5 --- chaos_base.hpp 12 Feb 2005 08:58:20 -0000 1.6 *************** *** 57,61 ****
protected: ! virtual void m_step(); int m_num_eq; // number of equations of the system }; --- 57,61 ----
protected: ! virtual void m_step() = 0; int m_num_eq; // number of equations of the system };
Index: latoomutgamma.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/tb/chaos/src/latoomutgamma.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** latoomutgamma.hpp 28 Dec 2004 12:38:45 -0000 1.1 --- latoomutgamma.hpp 12 Feb 2005 08:58:21 -0000 1.2 *************** *** 59,62 **** --- 59,75 ---- }
+ + /* function has a fix point for x1 == x2 == 0 */ + virtual void m_verify() + { + for (int i = 0; i != get_num_eq(); ++i) + { + #ifndef DOUBLE_PRECISION + if (PD_BIGORSMALL(m_data[i])) + m_data[i] = 0.01; + #endif + } + }; + CHAOS_SYSVAR_FUNCS(x1, 0); CHAOS_SYSVAR_FUNCS(x2, 1);