Release 0.4.11
authorpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 3 Mar 2008 05:17:03 +0000 (05:17 +0000)
committerpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 3 Mar 2008 05:17:03 +0000 (05:17 +0000)
git-svn-id: http://svn.voria.com/code@1845 1f10aa63-cdf2-0310-b900-c93c546f37ac

105 files changed:
ETL/tags/0.4.11/AUTHORS [new file with mode: 0644]
ETL/tags/0.4.11/ETL-config.in [new file with mode: 0644]
ETL/tags/0.4.11/ETL.kdevprj [new file with mode: 0644]
ETL/tags/0.4.11/ETL.pbproj/darco.mode1 [new file with mode: 0755]
ETL/tags/0.4.11/ETL.pbproj/darco.pbxuser [new file with mode: 0755]
ETL/tags/0.4.11/ETL.pbproj/etl_profile.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL.pbproj/frameworkfix.cpp [new file with mode: 0644]
ETL/tags/0.4.11/ETL.pbproj/project.pbxproj [new file with mode: 0755]
ETL/tags/0.4.11/ETL.pc.in [new file with mode: 0644]
ETL/tags/0.4.11/ETL.prj [new file with mode: 0644]
ETL/tags/0.4.11/ETL/Makefile.am [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_angle.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_bezier.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_bezier_angle.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_bit_rotate.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_boxblur.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_bspline.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_calculus.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_clock_base.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_clock_gettimeofday.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_clock_system.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_clock_win32hpcount.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_condition.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_curve.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_curve_func.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_fastangle.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_fastangle_tables.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_fixed.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_gaussian.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_handle.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_hermite.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_misc.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_mutex_null.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_mutex_pthreads.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_mutex_pthreads_simple.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_mutex_win32.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_pen.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_random.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_rect.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_ref_count.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_rwlock.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_smach.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_smart_ptr.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_status.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_stringf.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_surface.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_thread.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_trivial.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/_value.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/angle [new file with mode: 0644]
ETL/tags/0.4.11/ETL/bezier [new file with mode: 0644]
ETL/tags/0.4.11/ETL/boxblur [new file with mode: 0644]
ETL/tags/0.4.11/ETL/calculus [new file with mode: 0644]
ETL/tags/0.4.11/ETL/clock [new file with mode: 0644]
ETL/tags/0.4.11/ETL/etl_config.h [new file with mode: 0644]
ETL/tags/0.4.11/ETL/etl_profile_.h.in [new file with mode: 0644]
ETL/tags/0.4.11/ETL/fastangle [new file with mode: 0644]
ETL/tags/0.4.11/ETL/fixed [new file with mode: 0644]
ETL/tags/0.4.11/ETL/gaussian [new file with mode: 0644]
ETL/tags/0.4.11/ETL/handle [new file with mode: 0644]
ETL/tags/0.4.11/ETL/hermite [new file with mode: 0644]
ETL/tags/0.4.11/ETL/ipc [new file with mode: 0644]
ETL/tags/0.4.11/ETL/misc [new file with mode: 0644]
ETL/tags/0.4.11/ETL/mutex [new file with mode: 0644]
ETL/tags/0.4.11/ETL/pen [new file with mode: 0644]
ETL/tags/0.4.11/ETL/random [new file with mode: 0644]
ETL/tags/0.4.11/ETL/rect [new file with mode: 0644]
ETL/tags/0.4.11/ETL/ref_count [new file with mode: 0644]
ETL/tags/0.4.11/ETL/smach [new file with mode: 0644]
ETL/tags/0.4.11/ETL/smart_ptr [new file with mode: 0644]
ETL/tags/0.4.11/ETL/spline [new file with mode: 0644]
ETL/tags/0.4.11/ETL/status [new file with mode: 0644]
ETL/tags/0.4.11/ETL/stringf [new file with mode: 0644]
ETL/tags/0.4.11/ETL/surface [new file with mode: 0644]
ETL/tags/0.4.11/ETL/thread [new file with mode: 0644]
ETL/tags/0.4.11/ETL/trivial [new file with mode: 0644]
ETL/tags/0.4.11/ETL/value [new file with mode: 0644]
ETL/tags/0.4.11/Makefile.am [new file with mode: 0644]
ETL/tags/0.4.11/NEWS [new file with mode: 0644]
ETL/tags/0.4.11/README [new file with mode: 0644]
ETL/tags/0.4.11/config/pkg-support/ETL-devel.info [new file with mode: 0755]
ETL/tags/0.4.11/config/pkg-support/devel-resources/License.rtf [new file with mode: 0755]
ETL/tags/0.4.11/config/pkg-support/devel-resources/ReadMe.rtf [new file with mode: 0755]
ETL/tags/0.4.11/config/pkg-support/devel-resources/Welcome.rtf [new file with mode: 0755]
ETL/tags/0.4.11/config/pkg-support/devel-resources/install.sh [new file with mode: 0755]
ETL/tags/0.4.11/configure.ac [new file with mode: 0644]
ETL/tags/0.4.11/doxygen.cfg.in [new file with mode: 0644]
ETL/tags/0.4.11/m4/ETL.m4 [new file with mode: 0644]
ETL/tags/0.4.11/m4/cxx_macros.m4 [new file with mode: 0644]
ETL/tags/0.4.11/m4/subs.m4 [new file with mode: 0644]
ETL/tags/0.4.11/test/Makefile.am [new file with mode: 0644]
ETL/tags/0.4.11/test/angle.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/benchmark.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/clock.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/fixed.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/handle.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/hermite.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/pen.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/random.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/smach.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/smart_ptr.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/spline.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/stringf.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/surface.cpp [new file with mode: 0644]
ETL/tags/0.4.11/test/value.cpp [new file with mode: 0644]

diff --git a/ETL/tags/0.4.11/AUTHORS b/ETL/tags/0.4.11/AUTHORS
new file mode 100644 (file)
index 0000000..83446da
--- /dev/null
@@ -0,0 +1,12 @@
+Developers:
+
+Robert B. Quattlebaum Jr (darco)
+Adrian Bentley
+
+Contributors:
+
+Paul Wise (pabs)
+Andreas Jochens
+Chris Moore (dooglus)
+Martin Michlmayr
+Ralf Corsepius
diff --git a/ETL/tags/0.4.11/ETL-config.in b/ETL/tags/0.4.11/ETL-config.in
new file mode 100644 (file)
index 0000000..61bce4f
--- /dev/null
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+VERSION=@VERSION@
+PACKAGE=@PACKAGE@
+
+usage()
+{
+       cat <<EOF
+Usage: ETL-config [OPTION]...
+
+Generic options
+  --version    print installed version of ETL.
+  --help        display this help and exit.
+
+Compilation support options
+  --cflags      print pre-processor and compiler flags
+  --libs        print library linking information
+  
+Install directories
+  --prefix --exec-prefix --bindir --libexecdir --datadir
+  --sysconfdir --sharedstatedir --localstatedir --libdir --infodir
+  --mandir --includedir
+
+EOF
+       
+       exit $1
+}
+
+if test $# -eq 0; then
+       usage 1
+fi
+
+case $1 in
+--version)
+       echo $PACKAGE $VERSION
+       exit 0
+       ;;
+--exec-prefix)
+       pkg-config --variable=exec_prefix ETL
+       exit 0
+       ;;
+--prefix)
+       pkg-config --variable=prefix ETL
+       exit 0
+       ;;
+--help)
+       usage 0
+       ;;
+--cxxflags)
+       pkg-config --cflags ETL
+       exit 0
+       ;;
+--cflags)
+       pkg-config --cflags ETL
+       exit 0
+       ;;
+--libs)
+       pkg-config --libs ETL
+       exit 0
+       ;;
+esac
+
+echo Unknown option "$1"
+exit 4
diff --git a/ETL/tags/0.4.11/ETL.kdevprj b/ETL/tags/0.4.11/ETL.kdevprj
new file mode 100644 (file)
index 0000000..bd5dd0d
--- /dev/null
@@ -0,0 +1,651 @@
+[./ChangeLog]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[./ETL.spec]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[./ETL-config]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[./ETL-config.in]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[./ETL.kdevprj]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[./INSTALL]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[./Makefile.am]
+files=./ChangeLog,./ETL-config.in,./INSTALL,./README,./config.log,./ETL.spec,./aclocal.m4,./configure,./ETL.kdevprj,./config.status,./ETL-config,
+sub_dirs=ETL,test,ETL.pbproj,config,autom4te-2.53.cache,
+type=normal
+
+[./README]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[./aclocal.m4]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[./config.log]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[./config.status]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[./configure]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[Config for BinMakefileAm]
+addcxxflags=
+bin_program=ETL
+cxxflags=
+ldadd=
+ldflags=
+
+[ETL.pbproj/Makefile.am]
+files=ETL.pbproj/darco.pbxuser,ETL.pbproj/etl_profile.h,ETL.pbproj/frameworkfix.cpp,ETL.pbproj/project.pbxproj,
+sub_dirs=
+type=normal
+
+[ETL.pbproj/darco.pbxuser]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL.pbproj/etl_profile.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL.pbproj/frameworkfix.cpp]
+dist=true
+install=false
+install_location=
+type=SOURCE
+
+[ETL.pbproj/project.pbxproj]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/Makefile.am]
+files=ETL/etl_profile.h.in,ETL/_angle.h,ETL/_bit_rotate.h,ETL/_bspline.h,ETL/_calculus.h,ETL/_clock_base.h,ETL/_clock_gettimeofday.h,ETL/_clock_system.h,ETL/_clock_win32hpcount.h,ETL/_condition.h,ETL/_curve.h,ETL/_curve_func.h,ETL/_fastangle.h,ETL/_fastangle_tables.h,ETL/_fixed.h,ETL/_handle.h,ETL/_hermite.h,ETL/_mutex_null.h,ETL/_mutex_pthreads.h,ETL/_mutex_win32.h,ETL/_random.h,ETL/_rwlock.h,ETL/_smach.h,ETL/_stringf.h,ETL/_surface.h,ETL/_thread.h,ETL/_trivial.h,ETL/angle,ETL/calculus,ETL/clock,ETL/etl_config.h,ETL/fastangle,ETL/fixed,ETL/handle,ETL/hermite,ETL/ipc,ETL/random,ETL/smach,ETL/spline,ETL/stringf,ETL/surface,ETL/thread,ETL/trivial,ETL/etl_profile.h,ETL/stamp-h1,
+sub_dirs=
+type=normal
+
+[ETL/_angle.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_bit_rotate.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_bspline.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_calculus.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_clock_base.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_clock_gettimeofday.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_clock_system.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_clock_win32hpcount.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_condition.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_curve.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_curve_func.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_fastangle.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_fastangle_tables.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_fixed.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_handle.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_hermite.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_mutex_null.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_mutex_pthreads.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_mutex_win32.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_random.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_rwlock.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_smach.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_stringf.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_surface.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_thread.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/_trivial.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/angle]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/calculus]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/clock]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/etl_config.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/etl_profile.h]
+dist=true
+install=false
+install_location=
+type=HEADER
+
+[ETL/etl_profile.h.in]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/fastangle]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/fixed]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/handle]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/hermite]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/ipc]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/random]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/smach]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/spline]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/stamp-h1]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/stringf]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/surface]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/thread]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[ETL/trivial]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[General]
+AMChanged=false
+author=darco
+email=darco@alnitak.orion.voria.net
+kdevprj_version=1.3
+lfv_open_groups=
+makefiles=./Makefile.am,autom4te-2.53.cache/Makefile.am,config/Makefile.am,config/pkg-support/Makefile.am,config/pkg-support/devel-resources/Makefile.am,ETL.pbproj/Makefile.am,test/Makefile.am,ETL/Makefile.am,
+project_name=ETL
+project_type=normal_empty
+sub_dir=
+version=
+version_control=CVS
+workspace=1
+
+[LFV Groups]
+GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS,
+Headers=*.h,*.hxx,*.hpp,*.H,
+Others=*,
+Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l,
+Translations=*.ts,*.po,
+User Interface=*.ui,*.kdevdlg,*.rc,
+groups=Headers,Sources,GNU,Translations,User Interface,Others
+
+[autom4te-2.53.cache/Makefile.am]
+files=autom4te-2.53.cache/requests,autom4te-2.53.cache/output.0,autom4te-2.53.cache/traces.0,
+sub_dirs=
+type=normal
+
+[autom4te-2.53.cache/output.0]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[autom4te-2.53.cache/requests]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[autom4te-2.53.cache/traces.0]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/ETL.m4]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/Makefile.am]
+files=config/ETL.m4,config/build.cfg,config/configure.ac,config/cxx_macros.m4,config/project.spec.in,config/sdl.m4,config/install-sh,config/mkinstalldirs,config/missing,config/config.guess,config/config.sub,config/depcomp,
+sub_dirs=pkg-support,
+type=normal
+
+[config/build.cfg]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/config.guess]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/config.sub]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/configure.ac]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/cxx_macros.m4]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/depcomp]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/install-sh]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/missing]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/mkinstalldirs]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/pkg-support/ETL-devel.info]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/pkg-support/Makefile.am]
+files=config/pkg-support/ETL-devel.info,
+sub_dirs=devel-resources,
+type=normal
+
+[config/pkg-support/devel-resources/License.rtf]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/pkg-support/devel-resources/Makefile.am]
+files=config/pkg-support/devel-resources/License.rtf,config/pkg-support/devel-resources/ReadMe.rtf,config/pkg-support/devel-resources/Welcome.rtf,config/pkg-support/devel-resources/install.sh,
+sub_dirs=
+type=normal
+
+[config/pkg-support/devel-resources/ReadMe.rtf]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/pkg-support/devel-resources/Welcome.rtf]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/pkg-support/devel-resources/install.sh]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/project.spec.in]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[config/sdl.m4]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[test/Makefile.am]
+files=test/angle.cpp,test/clock.cpp,test/fixed.cpp,test/handle.cpp,test/hermite.cpp,test/random.cpp,test/smach.cpp,test/spline.cpp,test/stringf.cpp,test/handle,test/angle,test/clock,test/fixed,test/hermite,test/spline,test/random,test/stringf,
+sub_dirs=
+type=normal
+
+[test/angle]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[test/angle.cpp]
+dist=true
+install=false
+install_location=
+type=SOURCE
+
+[test/clock]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[test/clock.cpp]
+dist=true
+install=false
+install_location=
+type=SOURCE
+
+[test/fixed]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[test/fixed.cpp]
+dist=true
+install=false
+install_location=
+type=SOURCE
+
+[test/handle]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[test/handle.cpp]
+dist=true
+install=false
+install_location=
+type=SOURCE
+
+[test/hermite]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[test/hermite.cpp]
+dist=true
+install=false
+install_location=
+type=SOURCE
+
+[test/random]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[test/random.cpp]
+dist=true
+install=false
+install_location=
+type=SOURCE
+
+[test/smach.cpp]
+dist=true
+install=false
+install_location=
+type=SOURCE
+
+[test/spline]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[test/spline.cpp]
+dist=true
+install=false
+install_location=
+type=SOURCE
+
+[test/stringf]
+dist=true
+install=false
+install_location=
+type=DATA
+
+[test/stringf.cpp]
+dist=true
+install=false
+install_location=
+type=SOURCE
diff --git a/ETL/tags/0.4.11/ETL.pbproj/darco.mode1 b/ETL/tags/0.4.11/ETL.pbproj/darco.mode1
new file mode 100755 (executable)
index 0000000..5525007
--- /dev/null
@@ -0,0 +1,1121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>ActivePerspectiveName</key>
+       <string>Project</string>
+       <key>AllowedModules</key>
+       <array>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>PBXSmartGroupTreeModule</string>
+                       <key>Name</key>
+                       <string>Groups and Files Outline View</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>PBXNavigatorGroup</string>
+                       <key>Name</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>XCTaskListModule</string>
+                       <key>Name</key>
+                       <string>Task List</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>XCDetailModule</string>
+                       <key>Name</key>
+                       <string>File and Smart Group Detail Viewer</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>1</string>
+                       <key>Module</key>
+                       <string>PBXBuildResultsModule</string>
+                       <key>Name</key>
+                       <string>Detailed Build Results Viewer</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>1</string>
+                       <key>Module</key>
+                       <string>PBXProjectFindModule</string>
+                       <key>Name</key>
+                       <string>Project Batch Find Tool</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>PBXRunSessionModule</string>
+                       <key>Name</key>
+                       <string>Run Log</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>PBXBookmarksModule</string>
+                       <key>Name</key>
+                       <string>Bookmarks Tool</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>PBXClassBrowserModule</string>
+                       <key>Name</key>
+                       <string>Class Browser</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>PBXCVSModule</string>
+                       <key>Name</key>
+                       <string>Source Code Control Tool</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>PBXDebugBreakpointsModule</string>
+                       <key>Name</key>
+                       <string>Debug Breakpoints Tool</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>XCDockableInspector</string>
+                       <key>Name</key>
+                       <string>Inspector</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>n</string>
+                       <key>Module</key>
+                       <string>PBXOpenQuicklyModule</string>
+                       <key>Name</key>
+                       <string>Open Quickly Tool</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>1</string>
+                       <key>Module</key>
+                       <string>PBXDebugSessionModule</string>
+                       <key>Name</key>
+                       <string>Debugger</string>
+               </dict>
+               <dict>
+                       <key>BundleLoadPath</key>
+                       <string></string>
+                       <key>MaxInstances</key>
+                       <string>1</string>
+                       <key>Module</key>
+                       <string>PBXDebugCLIModule</string>
+                       <key>Name</key>
+                       <string>Debug Console</string>
+               </dict>
+       </array>
+       <key>Description</key>
+       <string>This workspace mimics that found in Xcode 1.2, with various minor improvements such as including attached editors to the build results window and the project find window.</string>
+       <key>DockingSystemVisible</key>
+       <false/>
+       <key>Extension</key>
+       <string>mode1</string>
+       <key>FirstTimeWindowDisplayed</key>
+       <false/>
+       <key>Identifier</key>
+       <string>com.apple.perspectives.project.mode1</string>
+       <key>MajorVersion</key>
+       <integer>31</integer>
+       <key>MinorVersion</key>
+       <integer>0</integer>
+       <key>Name</key>
+       <string>Default Workspace</string>
+       <key>Notifications</key>
+       <array/>
+       <key>OpenEditors</key>
+       <array/>
+       <key>Perspectives</key>
+       <array>
+               <dict>
+                       <key>ChosenToolbarItems</key>
+                       <array>
+                               <string>active-target-popup</string>
+                               <string>action</string>
+                               <string>NSToolbarFlexibleSpaceItem</string>
+                               <string>buildOrClean</string>
+                               <string>build-and-runOrDebug</string>
+                               <string>clean-target</string>
+                               <string>com.apple.ide.PBXToolbarStopButton</string>
+                               <string>get-info</string>
+                               <string>toggle-editor</string>
+                               <string>NSToolbarFlexibleSpaceItem</string>
+                               <string>com.apple.pbx.toolbar.searchfield</string>
+                       </array>
+                       <key>ControllerClassBaseName</key>
+                       <string></string>
+                       <key>IconName</key>
+                       <string>WindowOfProject</string>
+                       <key>Identifier</key>
+                       <string>perspective.project</string>
+                       <key>IsVertical</key>
+                       <false/>
+                       <key>Layout</key>
+                       <array>
+                               <dict>
+                                       <key>BecomeActive</key>
+                                       <true/>
+                                       <key>ContentConfiguration</key>
+                                       <dict>
+                                               <key>PBXBottomSmartGroupGIDs</key>
+                                               <array>
+                                                       <string>1C37FBAC04509CD000000102</string>
+                                                       <string>1C37FAAC04509CD000000102</string>
+                                                       <string>1C08E77C0454961000C914BD</string>
+                                                       <string>1C37FABC05509CD000000102</string>
+                                                       <string>1C37FABC05539CD112110102</string>
+                                                       <string>E2644B35053B69B200211256</string>
+                                                       <string>1C37FABC04509CD000100104</string>
+                                               </array>
+                                               <key>PBXProjectModuleGUID</key>
+                                               <string>1CE0B1FE06471DED0097A5F4</string>
+                                               <key>PBXProjectModuleLabel</key>
+                                               <string>Files</string>
+                                               <key>PBXProjectStructureProvided</key>
+                                               <string>yes</string>
+                                               <key>PBXSmartGroupTreeModuleColumnData</key>
+                                               <dict>
+                                                       <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+                                                       <array>
+                                                               <real>265</real>
+                                                       </array>
+                                                       <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+                                                       <array>
+                                                               <string>MainColumn</string>
+                                                       </array>
+                                               </dict>
+                                               <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+                                               <dict>
+                                                       <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+                                                       <array>
+                                                               <string>F550016102F0983D01000102</string>
+                                                               <string>F550017202F0ABE401000102</string>
+                                                               <string>1C37FABC05509CD000000102</string>
+                                                       </array>
+                                                       <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+                                                       <array>
+                                                               <array>
+                                                                       <integer>0</integer>
+                                                               </array>
+                                                       </array>
+                                                       <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+                                                       <string>{{0, 1044}, {265, 435}}</string>
+                                               </dict>
+                                               <key>PBXTopSmartGroupGIDs</key>
+                                               <array/>
+                                       </dict>
+                                       <key>GeometryConfiguration</key>
+                                       <dict>
+                                               <key>Frame</key>
+                                               <string>{{0, 0}, {282, 453}}</string>
+                                               <key>GroupTreeTableConfiguration</key>
+                                               <array>
+                                                       <string>MainColumn</string>
+                                                       <real>265</real>
+                                               </array>
+                                               <key>RubberWindowFrame</key>
+                                               <string>46 184 812 495 0 0 1152 848 </string>
+                                       </dict>
+                                       <key>Module</key>
+                                       <string>PBXSmartGroupTreeModule</string>
+                                       <key>Proportion</key>
+                                       <string>282pt</string>
+                               </dict>
+                               <dict>
+                                       <key>Dock</key>
+                                       <array>
+                                               <dict>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1CE0B20306471E060097A5F4</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>_angle.h</string>
+                                                               <key>PBXSplitModuleInNavigatorKey</key>
+                                                               <dict>
+                                                                       <key>Split0</key>
+                                                                       <dict>
+                                                                               <key>PBXProjectModuleGUID</key>
+                                                                               <string>1CE0B20406471E060097A5F4</string>
+                                                                               <key>PBXProjectModuleLabel</key>
+                                                                               <string>_angle.h</string>
+                                                                               <key>bookmark</key>
+                                                                               <string>A6E2EB1707656ADC002AF736</string>
+                                                                               <key>history</key>
+                                                                               <array>
+                                                                                       <string>A6E2EAF207656836002AF736</string>
+                                                                               </array>
+                                                                       </dict>
+                                                                       <key>SplitCount</key>
+                                                                       <string>1</string>
+                                                               </dict>
+                                                               <key>StatusBarVisibility</key>
+                                                               <true/>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 0}, {524, 0}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>46 184 812 495 0 0 1152 848 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXNavigatorGroup</string>
+                                                       <key>Proportion</key>
+                                                       <string>0pt</string>
+                                               </dict>
+                                               <dict>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1CE0B20506471E060097A5F4</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>Targets</string>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 7}, {524, 446}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>46 184 812 495 0 0 1152 848 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>XCDetailModule</string>
+                                                       <key>Proportion</key>
+                                                       <string>446pt</string>
+                                               </dict>
+                                       </array>
+                                       <key>Proportion</key>
+                                       <string>524pt</string>
+                               </dict>
+                       </array>
+                       <key>Name</key>
+                       <string>Project</string>
+                       <key>ServiceClasses</key>
+                       <array>
+                               <string>XCModuleDock</string>
+                               <string>PBXSmartGroupTreeModule</string>
+                               <string>XCModuleDock</string>
+                               <string>PBXNavigatorGroup</string>
+                               <string>XCDetailModule</string>
+                       </array>
+                       <key>TableOfContents</key>
+                       <array>
+                               <string>A6E2EAF407656836002AF736</string>
+                               <string>1CE0B1FE06471DED0097A5F4</string>
+                               <string>A6E2EAF507656836002AF736</string>
+                               <string>1CE0B20306471E060097A5F4</string>
+                               <string>1CE0B20506471E060097A5F4</string>
+                       </array>
+                       <key>ToolbarConfiguration</key>
+                       <string>xcode.toolbar.config.default</string>
+               </dict>
+       </array>
+       <key>PerspectivesBarVisible</key>
+       <false/>
+       <key>StatusbarIsVisible</key>
+       <true/>
+       <key>TimeStamp</key>
+       <real>0.0</real>
+       <key>ToolbarDisplayMode</key>
+       <integer>1</integer>
+       <key>ToolbarIsVisible</key>
+       <true/>
+       <key>ToolbarSizeMode</key>
+       <integer>1</integer>
+       <key>Type</key>
+       <string>Perspectives</string>
+       <key>UpdateMessage</key>
+       <string></string>
+       <key>WindowJustification</key>
+       <integer>5</integer>
+       <key>WindowOrderList</key>
+       <array>
+               <string>A6E2EAFD076568E5002AF736</string>
+               <string>A6E2EAFB076568E5002AF736</string>
+               <string>/Users/darco/Projects/Voria/ETL/ETL.pbproj</string>
+       </array>
+       <key>WindowString</key>
+       <string>46 184 812 495 0 0 1152 848 </string>
+       <key>WindowTools</key>
+       <array>
+               <dict>
+                       <key>FirstTimeWindowDisplayed</key>
+                       <false/>
+                       <key>Identifier</key>
+                       <string>windowTool.build</string>
+                       <key>Layout</key>
+                       <array>
+                               <dict>
+                                       <key>Dock</key>
+                                       <array>
+                                               <dict>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1CD0528F0623707200166675</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>&lt;No Editor&gt;</string>
+                                                               <key>PBXSplitModuleInNavigatorKey</key>
+                                                               <dict>
+                                                                       <key>Split0</key>
+                                                                       <dict>
+                                                                               <key>PBXProjectModuleGUID</key>
+                                                                               <string>1CD052900623707200166675</string>
+                                                                       </dict>
+                                                                       <key>SplitCount</key>
+                                                                       <string>1</string>
+                                                               </dict>
+                                                               <key>StatusBarVisibility</key>
+                                                               <true/>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 0}, {500, 66}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>377 21 500 500 0 0 1152 848 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXNavigatorGroup</string>
+                                                       <key>Proportion</key>
+                                                       <string>66pt</string>
+                                               </dict>
+                                               <dict>
+                                                       <key>BecomeActive</key>
+                                                       <true/>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>XCMainBuildResultsModuleGUID</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>Build</string>
+                                                               <key>XCBuildResultsTrigger_Collapse</key>
+                                                               <integer>1021</integer>
+                                                               <key>XCBuildResultsTrigger_Open</key>
+                                                               <integer>1011</integer>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 73}, {500, 385}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>377 21 500 500 0 0 1152 848 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXBuildResultsModule</string>
+                                                       <key>Proportion</key>
+                                                       <string>385pt</string>
+                                               </dict>
+                                       </array>
+                                       <key>Proportion</key>
+                                       <string>458pt</string>
+                               </dict>
+                       </array>
+                       <key>Name</key>
+                       <string>Build Results</string>
+                       <key>ServiceClasses</key>
+                       <array>
+                               <string>PBXBuildResultsModule</string>
+                       </array>
+                       <key>StatusbarIsVisible</key>
+                       <true/>
+                       <key>TableOfContents</key>
+                       <array>
+                               <string>A6E2EAFB076568E5002AF736</string>
+                               <string>A6E2EAFC076568E5002AF736</string>
+                               <string>1CD0528F0623707200166675</string>
+                               <string>XCMainBuildResultsModuleGUID</string>
+                       </array>
+                       <key>ToolbarConfiguration</key>
+                       <string>xcode.toolbar.config.build</string>
+                       <key>WindowString</key>
+                       <string>377 21 500 500 0 0 1152 848 </string>
+                       <key>WindowToolGUID</key>
+                       <string>A6E2EAFB076568E5002AF736</string>
+                       <key>WindowToolIsVisible</key>
+                       <true/>
+               </dict>
+               <dict>
+                       <key>Identifier</key>
+                       <string>windowTool.debugger</string>
+                       <key>Layout</key>
+                       <array>
+                               <dict>
+                                       <key>Dock</key>
+                                       <array>
+                                               <dict>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>Debugger</key>
+                                                               <dict>
+                                                                       <key>HorizontalSplitView</key>
+                                                                       <dict>
+                                                                               <key>_collapsingFrameDimension</key>
+                                                                               <real>0.0</real>
+                                                                               <key>_indexOfCollapsedView</key>
+                                                                               <integer>0</integer>
+                                                                               <key>_percentageOfCollapsedView</key>
+                                                                               <real>0.0</real>
+                                                                               <key>isCollapsed</key>
+                                                                               <string>yes</string>
+                                                                               <key>sizes</key>
+                                                                               <array>
+                                                                                       <string>{{0, 0}, {317, 164}}</string>
+                                                                                       <string>{{317, 0}, {377, 164}}</string>
+                                                                               </array>
+                                                                       </dict>
+                                                                       <key>VerticalSplitView</key>
+                                                                       <dict>
+                                                                               <key>_collapsingFrameDimension</key>
+                                                                               <real>0.0</real>
+                                                                               <key>_indexOfCollapsedView</key>
+                                                                               <integer>0</integer>
+                                                                               <key>_percentageOfCollapsedView</key>
+                                                                               <real>0.0</real>
+                                                                               <key>isCollapsed</key>
+                                                                               <string>yes</string>
+                                                                               <key>sizes</key>
+                                                                               <array>
+                                                                                       <string>{{0, 0}, {694, 164}}</string>
+                                                                                       <string>{{0, 164}, {694, 216}}</string>
+                                                                               </array>
+                                                                       </dict>
+                                                               </dict>
+                                                               <key>LauncherConfigVersion</key>
+                                                               <string>8</string>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1C162984064C10D400B95A72</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>Debug - GLUTExamples (Underwater)</string>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>DebugConsoleDrawerSize</key>
+                                                               <string>{100, 120}</string>
+                                                               <key>DebugConsoleVisible</key>
+                                                               <string>None</string>
+                                                               <key>DebugConsoleWindowFrame</key>
+                                                               <string>{{200, 200}, {500, 300}}</string>
+                                                               <key>DebugSTDIOWindowFrame</key>
+                                                               <string>{{200, 200}, {500, 300}}</string>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 0}, {694, 380}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>321 238 694 422 0 0 1440 878 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXDebugSessionModule</string>
+                                                       <key>Proportion</key>
+                                                       <string>380pt</string>
+                                               </dict>
+                                       </array>
+                                       <key>Proportion</key>
+                                       <string>380pt</string>
+                               </dict>
+                       </array>
+                       <key>Name</key>
+                       <string>Debugger</string>
+                       <key>ServiceClasses</key>
+                       <array>
+                               <string>PBXDebugSessionModule</string>
+                       </array>
+                       <key>StatusbarIsVisible</key>
+                       <true/>
+                       <key>TableOfContents</key>
+                       <array>
+                               <string>1CD10A99069EF8BA00B06720</string>
+                               <string>1C0AD2AB069F1E9B00FABCE6</string>
+                               <string>1C162984064C10D400B95A72</string>
+                               <string>1C0AD2AC069F1E9B00FABCE6</string>
+                       </array>
+                       <key>ToolbarConfiguration</key>
+                       <string>xcode.toolbar.config.debug</string>
+                       <key>WindowString</key>
+                       <string>321 238 694 422 0 0 1440 878 </string>
+                       <key>WindowToolGUID</key>
+                       <string>1CD10A99069EF8BA00B06720</string>
+                       <key>WindowToolIsVisible</key>
+                       <false/>
+               </dict>
+               <dict>
+                       <key>Identifier</key>
+                       <string>windowTool.find</string>
+                       <key>Layout</key>
+                       <array>
+                               <dict>
+                                       <key>Dock</key>
+                                       <array>
+                                               <dict>
+                                                       <key>Dock</key>
+                                                       <array>
+                                                               <dict>
+                                                                       <key>ContentConfiguration</key>
+                                                                       <dict>
+                                                                               <key>PBXProjectModuleGUID</key>
+                                                                               <string>1CDD528C0622207200134675</string>
+                                                                               <key>PBXProjectModuleLabel</key>
+                                                                               <string>&lt;No Editor&gt;</string>
+                                                                               <key>PBXSplitModuleInNavigatorKey</key>
+                                                                               <dict>
+                                                                                       <key>Split0</key>
+                                                                                       <dict>
+                                                                                               <key>PBXProjectModuleGUID</key>
+                                                                                               <string>1CD0528D0623707200166675</string>
+                                                                                       </dict>
+                                                                                       <key>SplitCount</key>
+                                                                                       <string>1</string>
+                                                                               </dict>
+                                                                               <key>StatusBarVisibility</key>
+                                                                               <true/>
+                                                                       </dict>
+                                                                       <key>GeometryConfiguration</key>
+                                                                       <dict>
+                                                                               <key>Frame</key>
+                                                                               <string>{{0, 0}, {781, 167}}</string>
+                                                                               <key>RubberWindowFrame</key>
+                                                                               <string>62 385 781 470 0 0 1440 878 </string>
+                                                                       </dict>
+                                                                       <key>Module</key>
+                                                                       <string>PBXNavigatorGroup</string>
+                                                                       <key>Proportion</key>
+                                                                       <string>781pt</string>
+                                                               </dict>
+                                                       </array>
+                                                       <key>Proportion</key>
+                                                       <string>50%</string>
+                                               </dict>
+                                               <dict>
+                                                       <key>BecomeActive</key>
+                                                       <true/>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1CD0528E0623707200166675</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>Project Find</string>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>Frame</key>
+                                                               <string>{{8, 0}, {773, 254}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>62 385 781 470 0 0 1440 878 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXProjectFindModule</string>
+                                                       <key>Proportion</key>
+                                                       <string>50%</string>
+                                               </dict>
+                                       </array>
+                                       <key>Proportion</key>
+                                       <string>428pt</string>
+                               </dict>
+                       </array>
+                       <key>Name</key>
+                       <string>Project Find</string>
+                       <key>ServiceClasses</key>
+                       <array>
+                               <string>PBXProjectFindModule</string>
+                       </array>
+                       <key>StatusbarIsVisible</key>
+                       <true/>
+                       <key>TableOfContents</key>
+                       <array>
+                               <string>1C530D57069F1CE1000CFCEE</string>
+                               <string>1C530D58069F1CE1000CFCEE</string>
+                               <string>1C530D59069F1CE1000CFCEE</string>
+                               <string>1CDD528C0622207200134675</string>
+                               <string>1C530D5A069F1CE1000CFCEE</string>
+                               <string>1CE0B1FE06471DED0097A5F4</string>
+                               <string>1CD0528E0623707200166675</string>
+                       </array>
+                       <key>WindowString</key>
+                       <string>62 385 781 470 0 0 1440 878 </string>
+                       <key>WindowToolGUID</key>
+                       <string>1C530D57069F1CE1000CFCEE</string>
+                       <key>WindowToolIsVisible</key>
+                       <false/>
+               </dict>
+               <dict>
+                       <key>Identifier</key>
+                       <string>MENUSEPARATOR</string>
+               </dict>
+               <dict>
+                       <key>Identifier</key>
+                       <string>windowTool.debuggerConsole</string>
+                       <key>Layout</key>
+                       <array>
+                               <dict>
+                                       <key>Dock</key>
+                                       <array>
+                                               <dict>
+                                                       <key>BecomeActive</key>
+                                                       <true/>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1C78EAAC065D492600B07095</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>Debugger Console</string>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 0}, {440, 358}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>650 41 440 400 0 0 1280 1002 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXDebugCLIModule</string>
+                                                       <key>Proportion</key>
+                                                       <string>358pt</string>
+                                               </dict>
+                                       </array>
+                                       <key>Proportion</key>
+                                       <string>358pt</string>
+                               </dict>
+                       </array>
+                       <key>Name</key>
+                       <string>Debugger Console</string>
+                       <key>ServiceClasses</key>
+                       <array>
+                               <string>PBXDebugCLIModule</string>
+                       </array>
+                       <key>StatusbarIsVisible</key>
+                       <true/>
+                       <key>TableOfContents</key>
+                       <array>
+                               <string>1C78EAAD065D492600B07095</string>
+                               <string>1C78EAAE065D492600B07095</string>
+                               <string>1C78EAAC065D492600B07095</string>
+                       </array>
+                       <key>WindowString</key>
+                       <string>650 41 440 400 0 0 1280 1002 </string>
+               </dict>
+               <dict>
+                       <key>FirstTimeWindowDisplayed</key>
+                       <false/>
+                       <key>Identifier</key>
+                       <string>windowTool.run</string>
+                       <key>Layout</key>
+                       <array>
+                               <dict>
+                                       <key>Dock</key>
+                                       <array>
+                                               <dict>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>LauncherConfigVersion</key>
+                                                               <string>3</string>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1CD0528B0623707200166675</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>Run</string>
+                                                               <key>Runner</key>
+                                                               <dict>
+                                                                       <key>HorizontalSplitView</key>
+                                                                       <dict>
+                                                                               <key>_collapsingFrameDimension</key>
+                                                                               <real>0.0</real>
+                                                                               <key>_indexOfCollapsedView</key>
+                                                                               <integer>0</integer>
+                                                                               <key>_percentageOfCollapsedView</key>
+                                                                               <real>0.0</real>
+                                                                               <key>isCollapsed</key>
+                                                                               <string>yes</string>
+                                                                               <key>sizes</key>
+                                                                               <array>
+                                                                                       <string>{{0, 0}, {493, 167}}</string>
+                                                                                       <string>{{0, 176}, {493, 267}}</string>
+                                                                               </array>
+                                                                       </dict>
+                                                                       <key>VerticalSplitView</key>
+                                                                       <dict>
+                                                                               <key>_collapsingFrameDimension</key>
+                                                                               <real>0.0</real>
+                                                                               <key>_indexOfCollapsedView</key>
+                                                                               <integer>0</integer>
+                                                                               <key>_percentageOfCollapsedView</key>
+                                                                               <real>0.0</real>
+                                                                               <key>isCollapsed</key>
+                                                                               <string>yes</string>
+                                                                               <key>sizes</key>
+                                                                               <array>
+                                                                                       <string>{{0, 0}, {405, 443}}</string>
+                                                                                       <string>{{414, 0}, {514, 443}}</string>
+                                                                               </array>
+                                                                       </dict>
+                                                               </dict>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 0}, {458, 143}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>653 537 458 185 0 0 1152 848 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXRunSessionModule</string>
+                                                       <key>Proportion</key>
+                                                       <string>143pt</string>
+                                               </dict>
+                                       </array>
+                                       <key>Proportion</key>
+                                       <string>143pt</string>
+                               </dict>
+                       </array>
+                       <key>Name</key>
+                       <string>Run Log</string>
+                       <key>ServiceClasses</key>
+                       <array>
+                               <string>PBXRunSessionModule</string>
+                       </array>
+                       <key>StatusbarIsVisible</key>
+                       <true/>
+                       <key>TableOfContents</key>
+                       <array>
+                               <string>A6E2EAFD076568E5002AF736</string>
+                               <string>A6E2EAFE076568E5002AF736</string>
+                               <string>1CD0528B0623707200166675</string>
+                               <string>A6E2EAFF076568E5002AF736</string>
+                       </array>
+                       <key>ToolbarConfiguration</key>
+                       <string>xcode.toolbar.config.run</string>
+                       <key>WindowString</key>
+                       <string>653 537 458 185 0 0 1152 848 </string>
+                       <key>WindowToolGUID</key>
+                       <string>A6E2EAFD076568E5002AF736</string>
+                       <key>WindowToolIsVisible</key>
+                       <false/>
+               </dict>
+               <dict>
+                       <key>Identifier</key>
+                       <string>windowTool.scm</string>
+                       <key>Layout</key>
+                       <array>
+                               <dict>
+                                       <key>Dock</key>
+                                       <array>
+                                               <dict>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1C78EAB2065D492600B07095</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>&lt;No Editor&gt;</string>
+                                                               <key>PBXSplitModuleInNavigatorKey</key>
+                                                               <dict>
+                                                                       <key>Split0</key>
+                                                                       <dict>
+                                                                               <key>PBXProjectModuleGUID</key>
+                                                                               <string>1C78EAB3065D492600B07095</string>
+                                                                       </dict>
+                                                                       <key>SplitCount</key>
+                                                                       <string>1</string>
+                                                               </dict>
+                                                               <key>StatusBarVisibility</key>
+                                                               <true/>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 0}, {452, 0}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>743 379 452 308 0 0 1280 1002 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXNavigatorGroup</string>
+                                                       <key>Proportion</key>
+                                                       <string>0pt</string>
+                                               </dict>
+                                               <dict>
+                                                       <key>BecomeActive</key>
+                                                       <true/>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1CD052920623707200166675</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>SCM</string>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>ConsoleFrame</key>
+                                                               <string>{{0, 259}, {452, 0}}</string>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 7}, {452, 259}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>743 379 452 308 0 0 1280 1002 </string>
+                                                               <key>TableConfiguration</key>
+                                                               <array>
+                                                                       <string>Status</string>
+                                                                       <real>30</real>
+                                                                       <string>FileName</string>
+                                                                       <real>199</real>
+                                                                       <string>Path</string>
+                                                                       <real>197.09500122070312</real>
+                                                               </array>
+                                                               <key>TableFrame</key>
+                                                               <string>{{0, 0}, {452, 250}}</string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXCVSModule</string>
+                                                       <key>Proportion</key>
+                                                       <string>259pt</string>
+                                               </dict>
+                                       </array>
+                                       <key>Proportion</key>
+                                       <string>266pt</string>
+                               </dict>
+                       </array>
+                       <key>Name</key>
+                       <string>SCM</string>
+                       <key>ServiceClasses</key>
+                       <array>
+                               <string>PBXCVSModule</string>
+                       </array>
+                       <key>StatusbarIsVisible</key>
+                       <true/>
+                       <key>TableOfContents</key>
+                       <array>
+                               <string>1C78EAB4065D492600B07095</string>
+                               <string>1C78EAB5065D492600B07095</string>
+                               <string>1C78EAB2065D492600B07095</string>
+                               <string>1CD052920623707200166675</string>
+                       </array>
+                       <key>WindowString</key>
+                       <string>743 379 452 308 0 0 1280 1002 </string>
+               </dict>
+               <dict>
+                       <key>Identifier</key>
+                       <string>windowTool.breakpoints</string>
+                       <key>Layout</key>
+                       <array>
+                               <dict>
+                                       <key>Dock</key>
+                                       <array>
+                                               <dict>
+                                                       <key>BecomeActive</key>
+                                                       <true/>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1CD052930623707200166675</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>Breakpoints</string>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>BreakpointsTreeTableConfiguration</key>
+                                                               <array>
+                                                                       <string>enabledColumn</string>
+                                                                       <real>16</real>
+                                                                       <string>breakpointColumn</string>
+                                                                       <real>201.5830078125</real>
+                                                               </array>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 0}, {240, 195}}</string>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>342 421 240 216 0 0 1440 878 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXDebugBreakpointsModule</string>
+                                                       <key>Proportion</key>
+                                                       <string>195pt</string>
+                                               </dict>
+                                       </array>
+                                       <key>Proportion</key>
+                                       <string>195pt</string>
+                               </dict>
+                       </array>
+                       <key>Name</key>
+                       <string>Breakpoints</string>
+                       <key>ServiceClasses</key>
+                       <array>
+                               <string>PBXDebugBreakpointsModule</string>
+                       </array>
+                       <key>StatusbarIsVisible</key>
+                       <false/>
+                       <key>TableOfContents</key>
+                       <array>
+                               <string>1C0AD2AD069F1E9B00FABCE6</string>
+                               <string>1C0AD2AE069F1E9B00FABCE6</string>
+                               <string>1CD052930623707200166675</string>
+                       </array>
+                       <key>WindowString</key>
+                       <string>342 421 240 216 0 0 1440 878 </string>
+                       <key>WindowToolGUID</key>
+                       <string>1C0AD2AD069F1E9B00FABCE6</string>
+                       <key>WindowToolIsVisible</key>
+                       <false/>
+               </dict>
+               <dict>
+                       <key>Identifier</key>
+                       <string>windowTool.bookmarks</string>
+                       <key>Layout</key>
+                       <array>
+                               <dict>
+                                       <key>Dock</key>
+                                       <array>
+                                               <dict>
+                                                       <key>Module</key>
+                                                       <string>PBXBookmarksModule</string>
+                                                       <key>Proportion</key>
+                                                       <string>166pt</string>
+                                               </dict>
+                                       </array>
+                                       <key>Proportion</key>
+                                       <string>166pt</string>
+                               </dict>
+                       </array>
+                       <key>Name</key>
+                       <string>Bookmarks</string>
+                       <key>ServiceClasses</key>
+                       <array>
+                               <string>PBXBookmarksModule</string>
+                       </array>
+                       <key>StatusbarIsVisible</key>
+                       <false/>
+                       <key>WindowString</key>
+                       <string>538 42 401 187 0 0 1280 1002 </string>
+               </dict>
+               <dict>
+                       <key>Identifier</key>
+                       <string>windowTool.classBrowser</string>
+                       <key>Layout</key>
+                       <array>
+                               <dict>
+                                       <key>Dock</key>
+                                       <array>
+                                               <dict>
+                                                       <key>BecomeActive</key>
+                                                       <true/>
+                                                       <key>ContentConfiguration</key>
+                                                       <dict>
+                                                               <key>OptionsSetName</key>
+                                                               <string>Hierarchy, all classes</string>
+                                                               <key>PBXProjectModuleGUID</key>
+                                                               <string>1CA6456E063B45B4001379D8</string>
+                                                               <key>PBXProjectModuleLabel</key>
+                                                               <string>Class Browser - NSObject</string>
+                                                       </dict>
+                                                       <key>GeometryConfiguration</key>
+                                                       <dict>
+                                                               <key>ClassesFrame</key>
+                                                               <string>{{0, 0}, {374, 96}}</string>
+                                                               <key>ClassesTreeTableConfiguration</key>
+                                                               <array>
+                                                                       <string>PBXClassNameColumnIdentifier</string>
+                                                                       <real>208</real>
+                                                                       <string>PBXClassBookColumnIdentifier</string>
+                                                                       <real>22</real>
+                                                               </array>
+                                                               <key>Frame</key>
+                                                               <string>{{0, 0}, {630, 331}}</string>
+                                                               <key>MembersFrame</key>
+                                                               <string>{{0, 105}, {374, 395}}</string>
+                                                               <key>MembersTreeTableConfiguration</key>
+                                                               <array>
+                                                                       <string>PBXMemberTypeIconColumnIdentifier</string>
+                                                                       <real>22</real>
+                                                                       <string>PBXMemberNameColumnIdentifier</string>
+                                                                       <real>216</real>
+                                                                       <string>PBXMemberTypeColumnIdentifier</string>
+                                                                       <real>97</real>
+                                                                       <string>PBXMemberBookColumnIdentifier</string>
+                                                                       <real>22</real>
+                                                               </array>
+                                                               <key>PBXModuleWindowStatusBarHidden2</key>
+                                                               <true/>
+                                                               <key>RubberWindowFrame</key>
+                                                               <string>385 179 630 352 0 0 1440 878 </string>
+                                                       </dict>
+                                                       <key>Module</key>
+                                                       <string>PBXClassBrowserModule</string>
+                                                       <key>Proportion</key>
+                                                       <string>331pt</string>
+                                               </dict>
+                                       </array>
+                                       <key>Proportion</key>
+                                       <string>331pt</string>
+                               </dict>
+                       </array>
+                       <key>Name</key>
+                       <string>Class Browser</string>
+                       <key>ServiceClasses</key>
+                       <array>
+                               <string>PBXClassBrowserModule</string>
+                       </array>
+                       <key>StatusbarIsVisible</key>
+                       <false/>
+                       <key>TableOfContents</key>
+                       <array>
+                               <string>1C0AD2AF069F1E9B00FABCE6</string>
+                               <string>1C0AD2B0069F1E9B00FABCE6</string>
+                               <string>1CA6456E063B45B4001379D8</string>
+                       </array>
+                       <key>ToolbarConfiguration</key>
+                       <string>xcode.toolbar.config.classbrowser</string>
+                       <key>WindowString</key>
+                       <string>385 179 630 352 0 0 1440 878 </string>
+                       <key>WindowToolGUID</key>
+                       <string>1C0AD2AF069F1E9B00FABCE6</string>
+                       <key>WindowToolIsVisible</key>
+                       <false/>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/ETL/tags/0.4.11/ETL.pbproj/darco.pbxuser b/ETL/tags/0.4.11/ETL.pbproj/darco.pbxuser
new file mode 100755 (executable)
index 0000000..63eaae6
--- /dev/null
@@ -0,0 +1,859 @@
+// !$*UTF8*$!
+{
+       A6E2EADA07656777002AF736 = {
+               fallbackIsa = XCSourceControlManager;
+               isSCMEnabled = 0;
+               isa = PBXSourceControlManager;
+               scmConfiguration = {
+               };
+               scmType = "";
+       };
+       A6E2EADB07656777002AF736 = {
+               indexTemplatePath = "";
+               isa = PBXCodeSenseManager;
+               usesDefaults = 1;
+               wantsCodeCompletion = 1;
+               wantsCodeCompletionAutoSuggestions = 0;
+               wantsCodeCompletionCaseSensitivity = 1;
+               wantsCodeCompletionListAlways = 1;
+               wantsCodeCompletionOnlyMatchingItems = 1;
+               wantsCodeCompletionParametersIncluded = 1;
+               wantsCodeCompletionPlaceholdersInserted = 1;
+               wantsCodeCompletionTabCompletes = 1;
+               wantsIndex = 1;
+       };
+       A6E2EAF207656836002AF736 = {
+               fRef = F5060A1C02F342A901000102;
+               isa = PBXBookmark;
+       };
+       A6E2EB1707656ADC002AF736 = {
+               fRef = F5060A1C02F342A901000102;
+               isa = PBXTextBookmark;
+               name = "_angle.h: 1";
+               rLen = 0;
+               rLoc = 0;
+               rType = 0;
+               vrLen = 0;
+               vrLoc = 0;
+       };
+       F5060A1C02F342A901000102 = {
+               uiCtxt = {
+                       sepNavIntBoundsRect = "{{0, 0}, {608, 6187}}";
+                       sepNavSelRange = "{0, 0}";
+                       sepNavVisRect = "{{0, 0}, {0, 0}}";
+               };
+       };
+       F5060A3602F37B5E01000102 = {
+               activeExec = 0;
+               executables = (
+                       F5060A3802F37B5E01000102,
+               );
+       };
+       F5060A3802F37B5E01000102 = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               dylibVariantSuffix = "";
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Handle Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+       F5060A3C02F37BAC01000102 = {
+               activeExec = 0;
+               executables = (
+                       F5060A4402F37BAC01000102,
+               );
+       };
+       F5060A4402F37BAC01000102 = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               dylibVariantSuffix = "";
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Angle Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+       F5060A4802F37BDD01000102 = {
+               activeExec = 0;
+       };
+       F5060A5102F37D8201000102 = {
+               activeExec = 0;
+               executables = (
+                       F5060A5902F37D8201000102,
+               );
+       };
+       F5060A5902F37D8201000102 = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               dylibVariantSuffix = "";
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Smach Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+       F5060A5A02F37D8501000102 = {
+               activeExec = 0;
+               executables = (
+                       F5060A6202F37D8501000102,
+               );
+       };
+       F5060A6202F37D8501000102 = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               dylibVariantSuffix = "";
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Random Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+       F5060A6702F37DEF01000102 = {
+               activeExec = 0;
+               executables = (
+                       F5060A6F02F37DEF01000102,
+               );
+       };
+       F5060A6F02F37DEF01000102 = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               dylibVariantSuffix = "";
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Fixed Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+       F513069D032666F8012F4765 = {
+               activeExec = 0;
+       };
+       F51307D803269B0F012F4765 = {
+               activeExec = 0;
+               executables = (
+                       F51307E103269B0F012F4765,
+               );
+       };
+       F51307E103269B0F012F4765 = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               dylibVariantSuffix = "";
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Stringf Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+       F54AEB2B02F6899D01000102 = {
+               activeExec = 0;
+               executables = (
+                       F54AEB3302F6899D01000102,
+               );
+       };
+       F54AEB3302F6899D01000102 = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               dylibVariantSuffix = "";
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Clock Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+       F550016502F0983D01000102 = {
+               activeBuildStyle = F550016402F0983D01000102;
+               activeExecutable = F5060A5902F37D8201000102;
+               activeTarget = F513069D032666F8012F4765;
+               addToTargets = (
+                       F588A3BC02F0CCE501000102,
+               );
+               breakpoints = (
+                       F5AD1D3D03098DA401B5FFC8,
+               );
+               codeSenseManager = A6E2EADB07656777002AF736;
+               executables = (
+                       F5060A3802F37B5E01000102,
+                       F5060A4402F37BAC01000102,
+                       F5060A5902F37D8201000102,
+                       F5060A6202F37D8501000102,
+                       F5060A6F02F37DEF01000102,
+                       F54AEB3302F6899D01000102,
+                       F576CB76031841EA01A80006,
+                       F5CAA207031AD533012F434D,
+                       F51307E103269B0F012F4765,
+                       F58D9F8E037F146301A80006,
+                       F58D9F97037F14FE01A80006,
+               );
+               perUserDictionary = {
+                       PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+                               PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+                               PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+                               PBXFileTableDataSourceColumnWidthsKey = (
+                                       20,
+                                       279,
+                                       20,
+                                       54,
+                                       43,
+                                       43,
+                                       20,
+                               );
+                               PBXFileTableDataSourceColumnsKey = (
+                                       PBXFileDataSource_FiletypeID,
+                                       PBXFileDataSource_Filename_ColumnID,
+                                       PBXFileDataSource_Built_ColumnID,
+                                       PBXFileDataSource_ObjectSize_ColumnID,
+                                       PBXFileDataSource_Errors_ColumnID,
+                                       PBXFileDataSource_Warnings_ColumnID,
+                                       PBXFileDataSource_Target_ColumnID,
+                               );
+                       };
+                       PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
+                               PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+                               PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+                               PBXFileTableDataSourceColumnWidthsKey = (
+                                       20,
+                                       241,
+                                       62,
+                                       20,
+                                       56,
+                                       43,
+                                       43,
+                               );
+                               PBXFileTableDataSourceColumnsKey = (
+                                       PBXFileDataSource_FiletypeID,
+                                       PBXFileDataSource_Filename_ColumnID,
+                                       PBXTargetDataSource_PrimaryAttribute,
+                                       PBXFileDataSource_Built_ColumnID,
+                                       PBXFileDataSource_ObjectSize_ColumnID,
+                                       PBXFileDataSource_Errors_ColumnID,
+                                       PBXFileDataSource_Warnings_ColumnID,
+                               );
+                       };
+                       PBXPerProjectTemplateStateSaveDate = 124086103;
+                       PBXPrepackagedSmartGroups_v2 = (
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       absolutePathToBundle = "";
+                                       activationKey = OldTargetSmartGroup;
+                                       clz = PBXTargetSmartGroup;
+                                       description = "Displays all targets of the project.";
+                                       globalID = 1C37FABC04509CD000000102;
+                                       name = Targets;
+                                       preferences = {
+                                               image = Targets;
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       absolutePathToBundle = "";
+                                       clz = PBXTargetSmartGroup2;
+                                       description = "Displays all targets of the project as well as nested build phases.";
+                                       globalID = 1C37FBAC04509CD000000102;
+                                       name = Targets;
+                                       preferences = {
+                                               image = Targets;
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       absolutePathToBundle = "";
+                                       clz = PBXExecutablesSmartGroup;
+                                       description = "Displays all executables of the project.";
+                                       globalID = 1C37FAAC04509CD000000102;
+                                       name = Executables;
+                                       preferences = {
+                                               image = Executable;
+                                       };
+                               },
+                               {
+                                       " PBXTransientLocationAtTop " = bottom;
+                                       absolutePathToBundle = "";
+                                       clz = PBXErrorsWarningsSmartGroup;
+                                       description = "Displays files with errors or warnings.";
+                                       globalID = 1C08E77C0454961000C914BD;
+                                       name = "Errors and Warnings";
+                                       preferences = {
+                                               fnmatch = "";
+                                               image = WarningsErrors;
+                                               recursive = 1;
+                                               regex = "";
+                                               root = "<PROJECT>";
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       absolutePathToBundle = "";
+                                       clz = PBXFilenameSmartGroup;
+                                       description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.";
+                                       globalID = 1CC0EA4004350EF90044410B;
+                                       name = "Implementation Files";
+                                       preferences = {
+                                               canSave = 1;
+                                               fnmatch = "";
+                                               image = SmartFolder;
+                                               isLeaf = 0;
+                                               recursive = 1;
+                                               regex = "?*\\.[mcMC]";
+                                               root = "<PROJECT>";
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       absolutePathToBundle = "";
+                                       clz = PBXFilenameSmartGroup;
+                                       description = "This group displays Interface Builder NIB Files.";
+                                       globalID = 1CC0EA4004350EF90041110B;
+                                       name = "NIB Files";
+                                       preferences = {
+                                               canSave = 1;
+                                               fnmatch = "*.nib";
+                                               image = SmartFolder;
+                                               isLeaf = 0;
+                                               recursive = 1;
+                                               regex = "";
+                                               root = "<PROJECT>";
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = no;
+                                       absolutePathToBundle = "";
+                                       clz = PBXFindSmartGroup;
+                                       description = "Displays Find Results.";
+                                       globalID = 1C37FABC05509CD000000102;
+                                       name = "Find Results";
+                                       preferences = {
+                                               image = spyglass;
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = no;
+                                       absolutePathToBundle = "";
+                                       clz = PBXBookmarksSmartGroup;
+                                       description = "Displays Project Bookmarks.";
+                                       globalID = 1C37FABC05539CD112110102;
+                                       name = Bookmarks;
+                                       preferences = {
+                                               image = Bookmarks;
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       absolutePathToBundle = "";
+                                       clz = XCSCMSmartGroup;
+                                       description = "Displays files with interesting SCM status.";
+                                       globalID = E2644B35053B69B200211256;
+                                       name = SCM;
+                                       preferences = {
+                                               image = PBXRepository;
+                                               isLeaf = 0;
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       absolutePathToBundle = "";
+                                       clz = PBXSymbolsSmartGroup;
+                                       description = "Displays all symbols for the project.";
+                                       globalID = 1C37FABC04509CD000100104;
+                                       name = "Project Symbols";
+                                       preferences = {
+                                               image = ProjectSymbols;
+                                               isLeaf = 1;
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       absolutePathToBundle = "";
+                                       clz = PBXFilenameSmartGroup;
+                                       description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.";
+                                       globalID = PBXTemplateMarker;
+                                       name = "Simple Filter SmartGroup";
+                                       preferences = {
+                                               canSave = 1;
+                                               fnmatch = "*.nib";
+                                               image = SmartFolder;
+                                               isLeaf = 0;
+                                               recursive = 1;
+                                               regex = "";
+                                               root = "<PROJECT>";
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       absolutePathToBundle = "";
+                                       clz = PBXFilenameSmartGroup;
+                                       description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.";
+                                       globalID = PBXTemplateMarker;
+                                       name = "Simple Regular Expression SmartGroup";
+                                       preferences = {
+                                               canSave = 1;
+                                               fnmatch = "";
+                                               image = SmartFolder;
+                                               isLeaf = 0;
+                                               recursive = 1;
+                                               regex = "?*\\.[mcMC]";
+                                               root = "<PROJECT>";
+                                       };
+                               },
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       clz = XDDesignSmartGroup;
+                                       description = "Displays Xdesign models";
+                                       globalID = 2E4A936305E6979E00701470;
+                                       name = Design;
+                                       preferences = {
+                                               image = Design;
+                                               isLeaf = 0;
+                                       };
+                               },
+                       );
+                       PBXWorkspaceContents = (
+                               {
+                                       LeftSlideOut = {
+                                               Split0 = {
+                                                       Split0 = {
+                                                               NavContent0 = {
+                                                                       bookmark = A6FEFDFB05DF3B2E00140006;
+                                                                       history = (
+                                                                               F530FB0803650921012F4ADF,
+                                                                               F5429FB903A918AB01A80006,
+                                                                               F5429FBA03A918AB01A80006,
+                                                                               F5C1F0ED03BCE61101A80006,
+                                                                               A64F6F3B052BE34900140006,
+                                                                               A64F6F3C052BE34900140006,
+                                                                               A64F6F3D052BE34900140006,
+                                                                               A64F6F3E052BE34900140006,
+                                                                               A63F3B810551700E00140006,
+                                                                               A63F3B820551700E00140006,
+                                                                               A64EF6BF05A73A8F00140006,
+                                                                       );
+                                                                       prevStack = (
+                                                                               F5429FBC03A918AB01A80006,
+                                                                               F5429FBD03A918AB01A80006,
+                                                                               F5429FBE03A918AB01A80006,
+                                                                               F5C1F0EF03BCE61101A80006,
+                                                                               A64F6F41052BE34900140006,
+                                                                               A64F6F42052BE34900140006,
+                                                                               A64F6F43052BE34900140006,
+                                                                               A64F6F44052BE34900140006,
+                                                                               A64F6F45052BE34900140006,
+                                                                               A64F6F46052BE34900140006,
+                                                                               A63F3B830551700E00140006,
+                                                                               A63F3B840551700E00140006,
+                                                                       );
+                                                               };
+                                                               NavCount = 1;
+                                                               NavGeometry0 = {
+                                                                       Frame = "{{0, 0}, {992, 458}}";
+                                                                       NavBarVisible = YES;
+                                                               };
+                                                               NavSplitVertical = NO;
+                                                       };
+                                                       SplitCount = 1;
+                                                       Tab1 = {
+                                                               Debugger = {
+                                                                       Split0 = {
+                                                                               SplitCount = 2;
+                                                                       };
+                                                                       SplitCount = 1;
+                                                                       TabCount = 2;
+                                                               };
+                                                               LauncherConfigVersion = 7;
+                                                       };
+                                                       Tab2 = {
+                                                               LauncherConfigVersion = 3;
+                                                               Runner = {
+                                                               };
+                                                       };
+                                                       TabCount = 5;
+                                               };
+                                               SplitCount = 1;
+                                               Tab1 = {
+                                                       OptionsSetName = "Hierarchy, all classes";
+                                               };
+                                               TabCount = 5;
+                                       };
+                               },
+                       );
+                       PBXWorkspaceGeometries = (
+                               {
+                                       ContentSize = "{1276, 770}";
+                                       LeftSlideOut = {
+                                               ActiveTab = 0;
+                                               ActiveTabName = PBXGroupTreeModule;
+                                               Collapsed = NO;
+                                               Frame = "{{0, 23}, {1276, 747}}";
+                                               Split0 = {
+                                                       ActiveTab = 2;
+                                                       ActiveTabName = PBXBuildResultsModule;
+                                                       Collapsed = NO;
+                                                       Frame = "{{284, 0}, {992, 747}}";
+                                                       Split0 = {
+                                                               Frame = "{{0, 289}, {992, 458}}";
+                                                       };
+                                                       SplitCount = 1;
+                                                       Tab0 = {
+                                                               Frame = "{{0, 0}, {572, 214}}";
+                                                       };
+                                                       Tab1 = {
+                                                               Debugger = {
+                                                                       Collapsed = NO;
+                                                                       Frame = "{{0, 0}, {992, 150}}";
+                                                                       Split0 = {
+                                                                               Frame = "{{0, 24}, {992, 126}}";
+                                                                               Split0 = {
+                                                                                       Frame = "{{0, 0}, {488, 126}}";
+                                                                               };
+                                                                               Split1 = {
+                                                                                       DebugVariablesTableConfiguration = (
+                                                                                               Name,
+                                                                                               123,
+                                                                                               Value,
+                                                                                               85,
+                                                                                               Summary,
+                                                                                               261.123,
+                                                                                       );
+                                                                                       Frame = "{{497, 0}, {495, 126}}";
+                                                                               };
+                                                                               SplitCount = 2;
+                                                                       };
+                                                                       SplitCount = 1;
+                                                                       Tab0 = {
+                                                                               Frame = "{{0, 0}, {100, 50}}";
+                                                                       };
+                                                                       Tab1 = {
+                                                                               Frame = "{{0, 0}, {100, 50}}";
+                                                                       };
+                                                                       TabCount = 2;
+                                                                       TabsVisible = YES;
+                                                               };
+                                                               Frame = "{{0, 0}, {992, 125}}";
+                                                               LauncherConfigVersion = 7;
+                                                       };
+                                                       Tab2 = {
+                                                               Frame = "{{0, 0}, {992, 254}}";
+                                                               LauncherConfigVersion = 3;
+                                                               Runner = {
+                                                                       Frame = "{{0, 0}, {992, 254}}";
+                                                               };
+                                                       };
+                                                       Tab3 = {
+                                                               BuildMessageFrame = "{{0, 0}, {994, 232}}";
+                                                               BuildTranscriptFrame = "{{0, 241}, {994, 2}}";
+                                                               BuildTranscriptFrameExpanded = YES;
+                                                               Frame = "{{0, 0}, {992, 265}}";
+                                                       };
+                                                       Tab4 = {
+                                                               Frame = "{{0, 0}, {612, 295}}";
+                                                       };
+                                                       TabCount = 5;
+                                                       TabsVisible = YES;
+                                               };
+                                               SplitCount = 1;
+                                               Tab0 = {
+                                                       Frame = "{{0, 0}, {260, 747}}";
+                                                       GroupTreeTableConfiguration = (
+                                                               TargetStatusColumn,
+                                                               18,
+                                                               MainColumn,
+                                                               205,
+                                                               SCMStatusColumn,
+                                                               22,
+                                                       );
+                                               };
+                                               Tab1 = {
+                                                       ClassesFrame = "{{0, 0}, {247, 330}}";
+                                                       ClassesTreeTableConfiguration = (
+                                                               PBXBookColumnIdentifier,
+                                                               20,
+                                                               PBXClassColumnIdentifier,
+                                                               204,
+                                                       );
+                                                       Frame = "{{0, 0}, {245, 549}}";
+                                                       MembersFrame = "{{0, 339}, {247, 210}}";
+                                                       MembersTreeTableConfiguration = (
+                                                               PBXBookColumnIdentifier,
+                                                               20,
+                                                               PBXMethodColumnIdentifier,
+                                                               203,
+                                                       );
+                                               };
+                                               Tab2 = {
+                                                       Frame = "{{0, 0}, {226, 549}}";
+                                               };
+                                               Tab3 = {
+                                                       Frame = "{{0, 0}, {191, 747}}";
+                                                       TargetTableConfiguration = (
+                                                               ActiveObject,
+                                                               16,
+                                                               ObjectNames,
+                                                               202.296,
+                                                       );
+                                               };
+                                               Tab4 = {
+                                                       BreakpointsTreeTableConfiguration = (
+                                                               breakpointColumn,
+                                                               138,
+                                                               enabledColumn,
+                                                               31,
+                                                       );
+                                                       Frame = "{{0, 0}, {191, 549}}";
+                                               };
+                                               TabCount = 5;
+                                               TabsVisible = YES;
+                                       };
+                                       NavBarShownByDefault = YES;
+                                       StatusViewVisible = YES;
+                                       Template = F5F68CF101725D4C0D7A8F4C;
+                                       ToolbarVisible = YES;
+                                       WindowLocation = "{4, 0}";
+                               },
+                       );
+                       PBXWorkspaceStateSaveDate = 124086103;
+               };
+               perUserProjectItems = {
+                       A6E2EAF207656836002AF736 = A6E2EAF207656836002AF736;
+                       A6E2EB1707656ADC002AF736 = A6E2EB1707656ADC002AF736;
+               };
+               sourceControlManager = A6E2EADA07656777002AF736;
+               userBuildSettings = {
+               };
+       };
+       F576CB6D031841EA01A80006 = {
+               activeExec = 0;
+               executables = (
+                       F576CB76031841EA01A80006,
+               );
+       };
+       F576CB76031841EA01A80006 = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               dylibVariantSuffix = "";
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Hermite Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+       F588A3BC02F0CCE501000102 = {
+               activeExec = 0;
+       };
+       F58D9F85037F146301A80006 = {
+               activeExec = 0;
+               executables = (
+                       F58D9F8E037F146301A80006,
+               );
+       };
+       F58D9F8E037F146301A80006 = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Pen Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+       F58D9F8F037F14FE01A80006 = {
+               activeExec = 0;
+               executables = (
+                       F58D9F97037F14FE01A80006,
+               );
+       };
+       F58D9F97037F14FE01A80006 = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               dylibVariantSuffix = "";
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Surface Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+       F5AD1D3D03098DA401B5FFC8 = {
+               fileReference = F5060A1E02F342A901000102;
+               isa = PBXFileBreakpoint;
+               lineNumber = 5;
+               state = 2;
+       };
+       F5CAA1FE031AD533012F434D = {
+               activeExec = 0;
+               executables = (
+                       F5CAA207031AD533012F434D,
+               );
+       };
+       F5CAA207031AD533012F434D = {
+               activeArgIndex = 2147483647;
+               activeArgIndices = (
+               );
+               argumentStrings = (
+               );
+               configStateDict = {
+               };
+               cppStopOnCatchEnabled = 0;
+               cppStopOnThrowEnabled = 0;
+               customDataFormattersEnabled = 1;
+               debuggerPlugin = GDBDebugging;
+               disassemblyDisplayState = 0;
+               dylibVariantSuffix = "";
+               enableDebugStr = 1;
+               environmentEntries = (
+               );
+               isa = PBXExecutable;
+               libgmallocEnabled = 0;
+               name = "Spline Test";
+               shlibInfoDictList = (
+               );
+               sourceDirectories = (
+               );
+       };
+}
diff --git a/ETL/tags/0.4.11/ETL.pbproj/etl_profile.h b/ETL/tags/0.4.11/ETL.pbproj/etl_profile.h
new file mode 100644 (file)
index 0000000..e63e0fe
--- /dev/null
@@ -0,0 +1,40 @@
+/* include/etl_profile.h.  Generated by configure.  */
+/* include/etl_profile.h.in.  Generated from configure.in by autoheader.  */
+
+
+#ifndef __VETL_PROFILE_H
+#define __VETL_PROFILE_H
+
+/* define if target is big endian */
+#define WORDS_BIGENDIAN
+
+#ifndef HAVE_GETTIMEOFDAY
+#define HAVE_GETTIMEOFDAY
+#endif
+
+#ifndef HAVE_PTHREAD_H
+#define HAVE_PTHREAD_H
+#endif
+
+#ifndef HAVE_SCHED_H
+#define HAVE_SCHED_H
+#endif
+
+#ifndef HAVE_PTHREAD_CREATE
+#define HAVE_PTHREAD_CREATE
+#endif
+
+#ifndef HAVE_VASPRINTF
+#define HAVE_VASPRINTF
+#endif
+
+#ifndef HAVE_VSNPRINTF
+#define HAVE_VSNPRINTF
+#endif
+
+#ifndef HAVE_VSPRINTF
+#define HAVE_VSPRINTF
+#endif
+
+#endif // __VETL_CONFIG_H
+
diff --git a/ETL/tags/0.4.11/ETL.pbproj/frameworkfix.cpp b/ETL/tags/0.4.11/ETL.pbproj/frameworkfix.cpp
new file mode 100644 (file)
index 0000000..0aee6e8
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ *  untitled.cpp
+ *  ETL
+ *
+ *  Created by Robert Quattlebaum on Mon Aug 26 2002.
+ *
+ */
+
diff --git a/ETL/tags/0.4.11/ETL.pbproj/project.pbxproj b/ETL/tags/0.4.11/ETL.pbproj/project.pbxproj
new file mode 100755 (executable)
index 0000000..1be00a6
--- /dev/null
@@ -0,0 +1,3111 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 39;
+       objects = {
+               A63F3B3E054DA00200140006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _misc.h;
+                       path = ETL/_misc.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               A63F3B3F054DA00200140006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = misc;
+                       path = ETL/misc;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               A63F3B40054DA00200140006 = {
+                       fileRef = A63F3B3E054DA00200140006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                                       Private,
+                               );
+                       };
+               };
+               A63F3B42054DA02500140006 = {
+                       fileRef = A63F3B3F054DA00200140006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               A64F6D24052A9DCC00140006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _ref_count.h;
+                       path = ETL/_ref_count.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               A64F6D25052A9DCC00140006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = ref_count;
+                       path = ETL/ref_count;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               A64F6D26052A9DCC00140006 = {
+                       fileRef = A64F6D24052A9DCC00140006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                                       Private,
+                               );
+                       };
+               };
+               A64F6D28052A9DFF00140006 = {
+                       fileRef = A64F6D25052A9DCC00140006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               A6E2EAC007656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EAC107656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F51307D803269B0F012F4765;
+                       remoteInfo = "Stringf Test";
+               };
+               A6E2EAC207656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F5060A6702F37DEF01000102;
+                       remoteInfo = "Fixed Test";
+               };
+               A6E2EAC307656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F5060A5A02F37D8501000102;
+                       remoteInfo = "Random Test";
+               };
+               A6E2EAC407656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F5060A5102F37D8201000102;
+                       remoteInfo = "Smach Test";
+               };
+               A6E2EAC507656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F5060A3C02F37BAC01000102;
+                       remoteInfo = "Angle Test";
+               };
+               A6E2EAC607656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F5060A3602F37B5E01000102;
+                       remoteInfo = "Handle Test";
+               };
+               A6E2EAC707656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F576CB6D031841EA01A80006;
+                       remoteInfo = "Hermite Test";
+               };
+               A6E2EAC807656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F54AEB2B02F6899D01000102;
+                       remoteInfo = "Clock Test";
+               };
+               A6E2EAC907656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F5CAA1FE031AD533012F434D;
+                       remoteInfo = "Spline Test";
+               };
+               A6E2EACA07656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EACB07656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EACC07656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EACD07656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EACE07656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EACF07656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EAD007656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EAD107656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EAD207656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EAD307656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EAD407656757002AF736 = {
+                       containerPortal = F550016502F0983D01000102;
+                       isa = PBXContainerItemProxy;
+                       proxyType = 1;
+                       remoteGlobalIDString = F588A3BC02F0CCE501000102;
+                       remoteInfo = "ETL Framework";
+               };
+               A6E2EADC076567C1002AF736 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _rect.h;
+                       path = ETL/_rect.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               A6E2EADD076567C1002AF736 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _value.h;
+                       path = ETL/_value.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               A6E2EADE076567C1002AF736 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = rect;
+                       path = ETL/rect;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               A6E2EADF076567C1002AF736 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = value;
+                       path = ETL/value;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               A6E2EAE0076567C1002AF736 = {
+                       fileRef = A6E2EADC076567C1002AF736;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               A6E2EAE1076567C1002AF736 = {
+                       fileRef = A6E2EADD076567C1002AF736;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               A6E2EAE2076567C1002AF736 = {
+                       fileRef = A6E2EADE076567C1002AF736;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               A6E2EAE3076567C1002AF736 = {
+                       fileRef = A6E2EADF076567C1002AF736;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+//A60
+//A61
+//A62
+//A63
+//A64
+//F50
+//F51
+//F52
+//F53
+//F54
+               F504527502F391C901000102 = {
+                       buildSettings = {
+                               COPY_PHASE_STRIP = NO;
+                               DEBUGGING_SYMBOLS = YES;
+                               OPTIMIZATION_CFLAGS = "-O0";
+                               PROFILING_CODE = YES;
+                       };
+                       isa = PBXBuildStyle;
+                       name = "Development (GCC3)";
+               };
+               F5060A0302F3337A01000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = etl_profile.h;
+                       path = ETL.pbproj/etl_profile.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A0402F3337A01000102 = {
+                       fileRef = F5060A0302F3337A01000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5060A0502F3366801000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = ipc;
+                       path = ETL/ipc;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A0602F3366801000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = thread;
+                       path = ETL/thread;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A0702F3366801000102 = {
+                       fileRef = F5060A0502F3366801000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F5060A0802F3366801000102 = {
+                       fileRef = F5060A0602F3366801000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F5060A1C02F342A901000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _angle.h;
+                       path = ETL/_angle.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A1D02F342A901000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _curve.h;
+                       path = ETL/_curve.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A1E02F342A901000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _fixed.h;
+                       path = ETL/_fixed.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A1F02F342A901000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _handle.h;
+                       path = ETL/_handle.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A2102F342A901000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _smach.h;
+                       path = ETL/_smach.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A2202F342A901000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _thread.h;
+                       path = ETL/_thread.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A2302F342A901000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _trivial.h;
+                       path = ETL/_trivial.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A2402F342A901000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = fixed;
+                       path = ETL/fixed;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A2502F342A901000102 = {
+                       fileRef = F5060A1C02F342A901000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5060A2602F342A901000102 = {
+                       fileRef = F5060A1D02F342A901000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5060A2702F342A901000102 = {
+                       fileRef = F5060A1E02F342A901000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5060A2802F342A901000102 = {
+                       fileRef = F5060A1F02F342A901000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5060A2A02F342A901000102 = {
+                       fileRef = F5060A2102F342A901000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5060A2B02F342A901000102 = {
+                       fileRef = F5060A2202F342A901000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5060A2C02F342A901000102 = {
+                       fileRef = F5060A2302F342A901000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5060A2D02F342A901000102 = {
+                       fileRef = F5060A2402F342A901000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F5060A2E02F379BC01000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _random.h;
+                       path = ETL/_random.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A2F02F379BC01000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = random;
+                       path = ETL/random;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A3002F379BC01000102 = {
+                       fileRef = F5060A2E02F379BC01000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5060A3102F379BC01000102 = {
+                       fileRef = F5060A2F02F379BC01000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F5060A3202F37B5E01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A3302F37B5E01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5060A3B02F37BA101000102,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A3402F37B5E01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5060A3A02F37B6E01000102,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A3502F37B5E01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A3602F37B5E01000102 = {
+                       buildPhases = (
+                               F5060A3202F37B5E01000102,
+                               F5060A3302F37B5E01000102,
+                               F5060A3402F37B5E01000102,
+                               F5060A3502F37B5E01000102,
+                       );
+                       buildSettings = {
+                               HEADER_SEARCH_PATHS = build/ETL.framework/Versions/A/Headers;
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Handle Test";
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F5060A4602F37BCA01000102,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Handle Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F5060A3702F37B5E01000102;
+               };
+               F5060A3702F37B5E01000102 = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Handle Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F5060A3A02F37B6E01000102 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5060A3B02F37BA101000102 = {
+                       fileRef = F588A3D602F0CF9101000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5060A3C02F37BAC01000102 = {
+                       buildPhases = (
+                               F5060A3D02F37BAC01000102,
+                               F5060A3E02F37BAC01000102,
+                               F5060A4002F37BAC01000102,
+                               F5060A4202F37BAC01000102,
+                       );
+                       buildSettings = {
+                               DEBUGGING_SYMBOLS = NO;
+                               HEADER_SEARCH_PATHS = ETL.pbproj;
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Angle Test";
+                               PROFILING_CODE = YES;
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F5060A4702F37BCD01000102,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Angle Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F5060A4302F37BAC01000102;
+               };
+               F5060A3D02F37BAC01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A3E02F37BAC01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5060A4502F37BBA01000102,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A4002F37BAC01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5060A4102F37BAC01000102,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A4102F37BAC01000102 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5060A4202F37BAC01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A4302F37BAC01000102 = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Angle Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F5060A4502F37BBA01000102 = {
+                       fileRef = F5627F1902F0D1F801000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5060A4602F37BCA01000102 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EAD407656757002AF736;
+               };
+               F5060A4702F37BCD01000102 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EACB07656757002AF736;
+               };
+               F5060A4802F37BDD01000102 = {
+                       buildPhases = (
+                       );
+                       buildSettings = {
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "All Tests";
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F51307E203269B1E012F4765,
+                               F5CAA305031AEFBC012F434D,
+                               F54AEB3502F689AD01000102,
+                               F5CAA306031AEFC1012F434D,
+                               F5060A4A02F37BF601000102,
+                               F5060A4902F37BF401000102,
+                               F5060A6502F37DD001000102,
+                               F5060A6602F37DD201000102,
+                               F5060A7402F37E3401000102,
+                       );
+                       isa = PBXAggregateTarget;
+                       name = "All Tests";
+                       productName = "All Tests";
+               };
+               F5060A4902F37BF401000102 = {
+                       isa = PBXTargetDependency;
+                       target = F5060A3C02F37BAC01000102;
+                       targetProxy = A6E2EAC507656757002AF736;
+               };
+               F5060A4A02F37BF601000102 = {
+                       isa = PBXTargetDependency;
+                       target = F5060A3602F37B5E01000102;
+                       targetProxy = A6E2EAC607656757002AF736;
+               };
+               F5060A4B02F37D3301000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = fixed.cpp;
+                       path = test/fixed.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A4C02F37D3301000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = random.cpp;
+                       path = test/random.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A4D02F37D3301000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = smach.cpp;
+                       path = test/smach.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5060A5102F37D8201000102 = {
+                       buildPhases = (
+                               F5060A5202F37D8201000102,
+                               F5060A5302F37D8201000102,
+                               F5060A5502F37D8201000102,
+                               F5060A5702F37D8201000102,
+                       );
+                       buildSettings = {
+                               HEADER_SEARCH_PATHS = build/ETL.framework/Versions/A/Headers;
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Smach Test";
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F5060A7102F37E2601000102,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Smach Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F5060A5802F37D8201000102;
+               };
+               F5060A5202F37D8201000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A5302F37D8201000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5060A6302F37DB001000102,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A5502F37D8201000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5060A5602F37D8201000102,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A5602F37D8201000102 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5060A5702F37D8201000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A5802F37D8201000102 = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Smach Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F5060A5A02F37D8501000102 = {
+                       buildPhases = (
+                               F5060A5B02F37D8501000102,
+                               F5060A5C02F37D8501000102,
+                               F5060A5E02F37D8501000102,
+                               F5060A6002F37D8501000102,
+                       );
+                       buildSettings = {
+                               HEADER_SEARCH_PATHS = "ETL.pbproj include";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Random Test";
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F5060A7202F37E2901000102,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Random Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F5060A6102F37D8501000102;
+               };
+               F5060A5B02F37D8501000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A5C02F37D8501000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5060A6402F37DB501000102,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A5E02F37D8501000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5060A5F02F37D8501000102,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A5F02F37D8501000102 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5060A6002F37D8501000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A6102F37D8501000102 = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Random Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F5060A6302F37DB001000102 = {
+                       fileRef = F5060A4D02F37D3301000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5060A6402F37DB501000102 = {
+                       fileRef = F5060A4C02F37D3301000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5060A6502F37DD001000102 = {
+                       isa = PBXTargetDependency;
+                       target = F5060A5102F37D8201000102;
+                       targetProxy = A6E2EAC407656757002AF736;
+               };
+               F5060A6602F37DD201000102 = {
+                       isa = PBXTargetDependency;
+                       target = F5060A5A02F37D8501000102;
+                       targetProxy = A6E2EAC307656757002AF736;
+               };
+               F5060A6702F37DEF01000102 = {
+                       buildPhases = (
+                               F5060A6802F37DEF01000102,
+                               F5060A6902F37DEF01000102,
+                               F5060A6B02F37DEF01000102,
+                               F5060A6D02F37DEF01000102,
+                       );
+                       buildSettings = {
+                               HEADER_SEARCH_PATHS = "ETL.pbproj include";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Fixed Test";
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F5060A7302F37E2B01000102,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Fixed Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F5060A6E02F37DEF01000102;
+               };
+               F5060A6802F37DEF01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A6902F37DEF01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5060A7002F37E0001000102,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A6B02F37DEF01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5060A6C02F37DEF01000102,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A6C02F37DEF01000102 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5060A6D02F37DEF01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5060A6E02F37DEF01000102 = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Fixed Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F5060A7002F37E0001000102 = {
+                       fileRef = F5060A4B02F37D3301000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5060A7102F37E2601000102 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EAD307656757002AF736;
+               };
+               F5060A7202F37E2901000102 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EACD07656757002AF736;
+               };
+               F5060A7302F37E2B01000102 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EACA07656757002AF736;
+               };
+               F5060A7402F37E3401000102 = {
+                       isa = PBXTargetDependency;
+                       target = F5060A6702F37DEF01000102;
+                       targetProxy = A6E2EAC207656757002AF736;
+               };
+               F50AFD3D0370620B01A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _bezier_angle.h;
+                       path = ETL/_bezier_angle.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F50AFD3E0370620B01A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _bezier.h;
+                       path = ETL/_bezier.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F50AFD3F0370620B01A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = bezier;
+                       path = ETL/bezier;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F50AFD400370620B01A80006 = {
+                       fileRef = F50AFD3D0370620B01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                                       Private,
+                               );
+                       };
+               };
+               F50AFD410370620B01A80006 = {
+                       fileRef = F50AFD3E0370620B01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                                       Private,
+                               );
+                       };
+               };
+               F50AFD420370620B01A80006 = {
+                       fileRef = F50AFD3F0370620B01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F50AFD490373BEC801A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _status.h;
+                       path = ETL/_status.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F50AFD4A0373BEC801A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = status;
+                       path = ETL/status;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F50AFD4B0373BEC801A80006 = {
+                       fileRef = F50AFD490373BEC801A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                                       Private,
+                               );
+                       };
+               };
+               F50AFD4D0373BEE001A80006 = {
+                       fileRef = F50AFD4A0373BEC801A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F51305C10325EF93012F4765 = {
+                       children = (
+                               F51305C20325EFB8012F4765,
+                               F51305C70325EFB8012F4765,
+                       );
+                       isa = PBXGroup;
+                       name = "Package Files";
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51305C20325EFB8012F4765 = {
+                       children = (
+                               F51305C40325EFB8012F4765,
+                               F5D988CB03325BFC01A80006,
+                               F5D988CC03325BFC01A80006,
+                               F5D988CD03325BFC01A80006,
+                       );
+                       isa = PBXGroup;
+                       name = "devel-resources";
+                       path = "config/pkg-support/devel-resources";
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51305C40325EFB8012F4765 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text.script.sh;
+                       path = install.sh;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51305C70325EFB8012F4765 = {
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = "ETL-devel.info";
+                       path = "config/pkg-support/ETL-devel.info";
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F513067A03266039012F4765 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text.script.sh;
+                       path = "ETL-config.in";
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5130699032666F8012F4765 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F51306A2032668FA012F4765,
+                               F51306A6032668FF012F4765,
+                               F5D988D503325CDB01A80006,
+                               F5D988D603325CDE01A80006,
+                               F5D988D403325CD801A80006,
+                       );
+                       isa = PBXResourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F513069D032666F8012F4765 = {
+                       buildPhases = (
+                               F5C1EE4903BCE00701A80006,
+                               F513069F03266806012F4765,
+                               F51306A00326682D012F4765,
+                               F5130699032666F8012F4765,
+                               F51306D203266E6A012F4765,
+                       );
+                       buildSettings = {
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "ETL-devel";
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                               WRAPPER_EXTENSION = pkg;
+                       };
+                       dependencies = (
+                               F51306B303266DAC012F4765,
+                       );
+                       isa = PBXBundleTarget;
+                       name = "Devel Package";
+                       productInstallPath = "$(USER_LIBRARY_DIR)/Bundles";
+                       productName = Untitled;
+                       productReference = F513069E032666F8012F4765;
+                       productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string></string>
+       <key>CFBundleGetInfoString</key>
+       <string></string>
+       <key>CFBundleIconFile</key>
+       <string></string>
+       <key>CFBundleIdentifier</key>
+       <string></string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string></string>
+       <key>CFBundlePackageType</key>
+       <string>PKG</string>
+       <key>CFBundleShortVersionString</key>
+       <string></string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>0.0.1d1</string>
+</dict>
+</plist>
+";
+               };
+               F513069E032666F8012F4765 = {
+                       explicitFileType = wrapper.cfbundle;
+                       isa = PBXFileReference;
+                       path = "ETL-devel.pkg";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F513069F03266806012F4765 = {
+                       buildActionMask = 2147483647;
+                       dstPath = "pkg-tmp";
+                       dstSubfolderSpec = 16;
+                       files = (
+                               F51306A1032668E7012F4765,
+                       );
+                       isa = PBXCopyFilesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F51306A00326682D012F4765 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXShellScriptBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = ". config/build.cfg\n\nset -x\n\n# clean up the framework, remove extra files\nrm -rf build/pkg-tmp/ETL.framework/Resources/pbdevelopment.plist\n\n# remove the .DS_Store file to keep tool from crapping out\nrm -rf pkg-support/devel-resources/.DS_Store\n\nsed \"\ns:@_VERSION_@:$VERSION:;\ns:@_PACKAGE_@:$PACKAGE:;\ns:@_RELEASE_@:$RELEASE:;\ns:@_PACKAGE_NAME_@:$PACKAGE_NAME:;\n\" < config/pkg-support/ETL-devel.info > build/ETL-devel.info\n\n# create the .pkg\npackage build/pkg-tmp build/ETL-devel.info -d  build \n\n# remove temporary files\nrm -rf build/pkg-tmp build/ETL-devel.info\n\n# compress\n(cd build; sleep 1; tar -zcvf ETL-devel.pkg.tar.gz ETL-devel.pkg)";
+               };
+               F51306A1032668E7012F4765 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F51306A2032668FA012F4765 = {
+                       fileRef = F51305C40325EFB8012F4765;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F51306A6032668FF012F4765 = {
+                       fileRef = F513067A03266039012F4765;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F51306B303266DAC012F4765 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EAD007656757002AF736;
+               };
+               F51306D203266E6A012F4765 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXShellScriptBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = ". config/build.cfg\n\nDIR=build/ETL-devel.pkg/Contents/Resources\n\nsed \"\ns:@_VERSION_@:$VERSION:;\ns:@_PACKAGE_@:$PACKAGE:;\ns:@_RELEASE_@:$RELEASE:;\ns:@_PACKAGE_NAME_@:$PACKAGE_NAME:;\n\" < $DIR/install.sh > $DIR/ETL-devel.post_install\ncp $DIR/ETL-devel.post_install $DIR/ETL-devel.post_upgrade\n\nrm $DIR/install.sh\n\n# add execute flag to scripts\nchmod 755 $DIR/ETL-devel.post_install $DIR/ETL-devel.post_upgrade\n";
+               };
+               F51307D2032699F1012F4765 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _stringf.h;
+                       path = ETL/_stringf.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51307D3032699F1012F4765 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = stringf;
+                       path = ETL/stringf;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51307D4032699F1012F4765 = {
+                       fileRef = F51307D2032699F1012F4765;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                                       Private,
+                               );
+                       };
+               };
+               F51307D603269AA2012F4765 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = stringf.cpp;
+                       path = test/stringf.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51307D803269B0F012F4765 = {
+                       buildPhases = (
+                               F51307DA03269B0F012F4765,
+                               F51307DB03269B0F012F4765,
+                               F51307DD03269B0F012F4765,
+                               F51307DF03269B0F012F4765,
+                       );
+                       buildSettings = {
+                               HEADER_SEARCH_PATHS = "ETL.pbproj include";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Stringf Test";
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F51307D903269B0F012F4765,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Stringf Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F51307E003269B0F012F4765;
+               };
+               F51307D903269B0F012F4765 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EAD107656757002AF736;
+               };
+               F51307DA03269B0F012F4765 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F51307DB03269B0F012F4765 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F51307E503269DBE012F4765,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F51307DD03269B0F012F4765 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F51307DE03269B0F012F4765,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F51307DE03269B0F012F4765 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F51307DF03269B0F012F4765 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F51307E003269B0F012F4765 = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Stringf Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F51307E203269B1E012F4765 = {
+                       isa = PBXTargetDependency;
+                       target = F51307D803269B0F012F4765;
+                       targetProxy = A6E2EAC107656757002AF736;
+               };
+               F51307E403269DA6012F4765 = {
+                       fileRef = F51307D3032699F1012F4765;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F51307E503269DBE012F4765 = {
+                       fileRef = F51307D603269AA2012F4765;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F51307F90326A75C012F4765 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = ETL.m4;
+                       path = config/ETL.m4;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51307FA0326A75C012F4765 = {
+                       fileRef = F51307F90326A75C012F4765;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F519539B0332717E01A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXShellScriptBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/bash;
+                       shellScript = ". config/build.cfg\nset -x\nexport FRAMEWORK_VERSION=$VERSION\n";
+               };
+               F51F41DF02FF6A8F010001CC = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _condition.h;
+                       path = ETL/_condition.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51F41E002FF6A8F010001CC = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _mutex_pthreads.h;
+                       path = ETL/_mutex_pthreads.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51F41E102FF6A8F010001CC = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _mutex_win32.h;
+                       path = ETL/_mutex_win32.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51F41E202FF6A8F010001CC = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _rwlock.h;
+                       path = ETL/_rwlock.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51F41E302FF6A8F010001CC = {
+                       fileRef = F51F41DF02FF6A8F010001CC;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F51F41E402FF6A8F010001CC = {
+                       fileRef = F51F41E002FF6A8F010001CC;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F51F41E502FF6A8F010001CC = {
+                       fileRef = F51F41E102FF6A8F010001CC;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F51F41E602FF6A8F010001CC = {
+                       fileRef = F51F41E202FF6A8F010001CC;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F51F41E702FF71F6010001CC = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _surface.h;
+                       path = ETL/_surface.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51F41E802FF71F6010001CC = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = surface;
+                       path = ETL/surface;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51F41E902FF71F6010001CC = {
+                       fileRef = F51F41E702FF71F6010001CC;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F51F41EA02FF71F6010001CC = {
+                       fileRef = F51F41E802FF71F6010001CC;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F51F41EB02FFBD64010001CC = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _bit_rotate.h;
+                       path = ETL/_bit_rotate.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F51F41EC02FFBD64010001CC = {
+                       fileRef = F51F41EB02FFBD64010001CC;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F54A063F030DA3DD01CC8267 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _fastangle_tables.h;
+                       path = ETL/_fastangle_tables.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F54A0640030DA3DD01CC8267 = {
+                       fileRef = F54A063F030DA3DD01CC8267;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F54A06CF030DE8A501CC8267 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = fastangle;
+                       path = ETL/fastangle;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F54A06D0030DE8A501CC8267 = {
+                       fileRef = F54A06CF030DE8A501CC8267;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F54A06D5030E4BCE01CC8267 = {
+                       buildSettings = {
+                               COPY_PHASE_STRIP = YES;
+                               DEBUGGING_SYMBOLS = NO;
+                               OPTIMIZATION_CFLAGS = "-O1";
+                               PROFILING_CODE = NO;
+                       };
+                       isa = PBXBuildStyle;
+                       name = "Slight Optimization";
+               };
+               F54AEAE202F6374901000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _clock_base.h;
+                       path = ETL/_clock_base.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F54AEAE302F6374901000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = clock;
+                       path = ETL/clock;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F54AEAE402F6374901000102 = {
+                       fileRef = F54AEAE202F6374901000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F54AEAE502F6374901000102 = {
+                       fileRef = F54AEAE302F6374901000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F54AEB2702F6785101000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _clock_system.h;
+                       path = ETL/_clock_system.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F54AEB2802F6785101000102 = {
+                       fileRef = F54AEB2702F6785101000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F54AEB2902F6793801000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _clock_gettimeofday.h;
+                       path = ETL/_clock_gettimeofday.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F54AEB2A02F6793801000102 = {
+                       fileRef = F54AEB2902F6793801000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F54AEB2B02F6899D01000102 = {
+                       buildPhases = (
+                               F54AEB2C02F6899D01000102,
+                               F54AEB2D02F6899D01000102,
+                               F54AEB2F02F6899D01000102,
+                               F54AEB3102F6899D01000102,
+                       );
+                       buildSettings = {
+                               HEADER_SEARCH_PATHS = ETL.pbproj;
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Clock Test";
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               USE_GCC3_PFE_SUPPORT = YES;
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F54AEB3402F689A901000102,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Clock Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F54AEB3202F6899D01000102;
+               };
+               F54AEB2C02F6899D01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F54AEB2D02F6899D01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F54AEB3702F689C801000102,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F54AEB2F02F6899D01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F54AEB3002F6899D01000102,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F54AEB3002F6899D01000102 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F54AEB3102F6899D01000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F54AEB3202F6899D01000102 = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Clock Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F54AEB3402F689A901000102 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EACF07656757002AF736;
+               };
+               F54AEB3502F689AD01000102 = {
+                       isa = PBXTargetDependency;
+                       target = F54AEB2B02F6899D01000102;
+                       targetProxy = A6E2EAC807656757002AF736;
+               };
+               F54AEB3602F689C801000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = clock.cpp;
+                       path = test/clock.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F54AEB3702F689C801000102 = {
+                       fileRef = F54AEB3602F689C801000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F54AEB3802F68F8D01000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _fastangle.h;
+                       path = ETL/_fastangle.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F54AEB3902F68F8D01000102 = {
+                       fileRef = F54AEB3802F68F8D01000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F550016102F0983D01000102 = {
+                       children = (
+                               F51305C10325EF93012F4765,
+                               F550017202F0ABE401000102,
+                               F550017302F0ABFA01000102,
+                               F588A3BE02F0CCE501000102,
+                               F550016802F0987601000102,
+                               F550016A02F0987601000102,
+                               F550016B02F0987601000102,
+                               F550016C02F0987601000102,
+                               F550016E02F09B9701000102,
+                               F550017102F0A69401000102,
+                               F588A3B502F0C38001000102,
+                               F513067A03266039012F4765,
+                               F51307F90326A75C012F4765,
+                       );
+                       isa = PBXGroup;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F550016302F0983D01000102 = {
+                       buildSettings = {
+                               COPY_PHASE_STRIP = NO;
+                               DEBUGGING_SYMBOLS = YES;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               OPTIMIZATION_CFLAGS = "-O0";
+                               PROFILING_CODE = YES;
+                               ZERO_LINK = YES;
+                       };
+                       isa = PBXBuildStyle;
+                       name = Development;
+               };
+               F550016402F0983D01000102 = {
+                       buildSettings = {
+                               COPY_PHASE_STRIP = YES;
+                               DEBUGGING_SYMBOLS = NO;
+                               OPTIMIZATION_CFLAGS = "-O3 -ffast-math";
+                               PROFILING_CODE = NO;
+                       };
+                       isa = PBXBuildStyle;
+                       name = "Deployment (GCC3)";
+               };
+               F550016502F0983D01000102 = {
+                       buildSettings = {
+                       };
+                       buildStyles = (
+                               F550016302F0983D01000102,
+                               F504527502F391C901000102,
+                               F550016402F0983D01000102,
+                               F54A06D5030E4BCE01CC8267,
+                       );
+                       hasScannedForEncodings = 1;
+                       isa = PBXProject;
+                       mainGroup = F550016102F0983D01000102;
+                       productRefGroup = F588A3BE02F0CCE501000102;
+                       projectDirPath = "";
+                       targets = (
+                               F588A3BC02F0CCE501000102,
+                               F5060A4802F37BDD01000102,
+                               F5060A3602F37B5E01000102,
+                               F5060A3C02F37BAC01000102,
+                               F5060A5102F37D8201000102,
+                               F5060A5A02F37D8501000102,
+                               F5060A6702F37DEF01000102,
+                               F54AEB2B02F6899D01000102,
+                               F576CB6D031841EA01A80006,
+                               F5CAA1FE031AD533012F434D,
+                               F513069D032666F8012F4765,
+                               F51307D803269B0F012F4765,
+                               F58D9F85037F146301A80006,
+                               F58D9F8F037F14FE01A80006,
+                       );
+               };
+               F550016A02F0987601000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       path = INSTALL;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F550016B02F0987601000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       path = Makefile.am;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F550016C02F0987601000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       path = README;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F550016E02F09B9701000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = build.cfg;
+                       path = config/build.cfg;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F550017102F0A69401000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = project.spec.in;
+                       path = config/project.spec.in;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F550017202F0ABE401000102 = {
+                       children = (
+                               F5CAA30A031AF0E1012F434D,
+                               F550017402F0AC5701000102,
+                               F55001B702F0B61101000102,
+                               F5060A0302F3337A01000102,
+                               F54A063F030DA3DD01CC8267,
+                               F5060A1C02F342A901000102,
+                               A6E2EADC076567C1002AF736,
+                               A6E2EADD076567C1002AF736,
+                               A6E2EADE076567C1002AF736,
+                               A6E2EADF076567C1002AF736,
+                               F54AEB3802F68F8D01000102,
+                               F5060A1D02F342A901000102,
+                               F5060A1E02F342A901000102,
+                               F5060A1F02F342A901000102,
+                               F5060A2102F342A901000102,
+                               F5060A2202F342A901000102,
+                               F5060A2302F342A901000102,
+                               F51F41EB02FFBD64010001CC,
+                               F5060A2E02F379BC01000102,
+                               F54AEAE202F6374901000102,
+                               F54AEB2702F6785101000102,
+                               F54AEB2902F6793801000102,
+                               F5CAA1EF031AB630012F434D,
+                               F51F41E002FF6A8F010001CC,
+                               F51F41E102FF6A8F010001CC,
+                               F5CAA1F2031AB74F012F434D,
+                               F51F41DF02FF6A8F010001CC,
+                               F51F41E202FF6A8F010001CC,
+                               F51F41E702FF71F6010001CC,
+                               F579DD9A0315B65001682FCB,
+                               F579DD9E0315C9F001682FCB,
+                               F5CAA1F4031AB947012F434D,
+                               F5CAA1F9031AD342012F434D,
+                               F51307D2032699F1012F4765,
+                               F50AFD3D0370620B01A80006,
+                               F50AFD3E0370620B01A80006,
+                               F50AFD490373BEC801A80006,
+                               F58D9F76037F141A01A80006,
+                               F58D9F77037F141A01A80006,
+                               F58D9F78037F141A01A80006,
+                               F5D51DF00399C74801A80006,
+                               A64F6D24052A9DCC00140006,
+                               A63F3B3E054DA00200140006,
+                               A64F6D25052A9DCC00140006,
+                               F5D51DF10399C74801A80006,
+                               F5060A2402F342A901000102,
+                               F588A3D202F0CDCC01000102,
+                               F588A3D302F0CDCC01000102,
+                               F5060A0502F3366801000102,
+                               F5060A0602F3366801000102,
+                               F5060A2F02F379BC01000102,
+                               F54AEAE302F6374901000102,
+                               F51F41E802FF71F6010001CC,
+                               F54A06CF030DE8A501CC8267,
+                               F579DD9B0315B65001682FCB,
+                               F5CAA1ED031AB61C012F434D,
+                               F5CAA1F5031AB947012F434D,
+                               F5CAA1FB031AD4E7012F434D,
+                               F51307D3032699F1012F4765,
+                               F5EDFAE8032D514001A80082,
+                               F50AFD3F0370620B01A80006,
+                               F50AFD4A0373BEC801A80006,
+                               F58D9F79037F141A01A80006,
+                               F58D9F7A037F141A01A80006,
+                               F58D9F7B037F141A01A80006,
+                               A63F3B3F054DA00200140006,
+                       );
+                       isa = PBXGroup;
+                       name = "ETL Source";
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F550017302F0ABFA01000102 = {
+                       children = (
+                               F550017502F0AC6D01000102,
+                               F588A3D602F0CF9101000102,
+                               F5627F1902F0D1F801000102,
+                               F5060A4B02F37D3301000102,
+                               F5060A4C02F37D3301000102,
+                               F5060A4D02F37D3301000102,
+                               F54AEB3602F689C801000102,
+                               F576CB6B0318419101A80006,
+                               F5CAA208031AD56B012F434D,
+                               F51307D603269AA2012F4765,
+                               F58D9F98037F154401A80006,
+                       );
+                       isa = PBXGroup;
+                       name = "Test Sources";
+                       path = "";
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F550017402F0AC5701000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = Makefile.am;
+                       path = ETL/Makefile.am;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F550017502F0AC6D01000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = Makefile.am;
+                       path = test/Makefile.am;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F55001B702F0B61101000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = etl_config.h;
+                       path = ETL/etl_config.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5627F1902F0D1F801000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = angle.cpp;
+                       path = test/angle.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F576CB6B0318419101A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = hermite.cpp;
+                       path = test/hermite.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F576CB6D031841EA01A80006 = {
+                       buildPhases = (
+                               F576CB6F031841EA01A80006,
+                               F576CB70031841EA01A80006,
+                               F576CB72031841EA01A80006,
+                               F576CB74031841EA01A80006,
+                       );
+                       buildSettings = {
+                               HEADER_SEARCH_PATHS = "ETL.pbproj include";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Hermite Test";
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F576CB6E031841EA01A80006,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Hermite Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F576CB75031841EA01A80006;
+               };
+               F576CB6E031841EA01A80006 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EACC07656757002AF736;
+               };
+               F576CB6F031841EA01A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F576CB70031841EA01A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F576CB780318421D01A80006,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F576CB72031841EA01A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F576CB73031841EA01A80006,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F576CB73031841EA01A80006 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F576CB74031841EA01A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F576CB75031841EA01A80006 = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Hermite Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F576CB780318421D01A80006 = {
+                       fileRef = F576CB6B0318419101A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F579DD9A0315B65001682FCB = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _hermite.h;
+                       path = ETL/_hermite.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F579DD9B0315B65001682FCB = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = hermite;
+                       path = ETL/hermite;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F579DD9C0315B65001682FCB = {
+                       fileRef = F579DD9A0315B65001682FCB;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F579DD9D0315B65001682FCB = {
+                       fileRef = F579DD9B0315B65001682FCB;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F579DD9E0315C9F001682FCB = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _curve_func.h;
+                       path = ETL/_curve_func.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F579DD9F0315C9F001682FCB = {
+                       fileRef = F579DD9E0315C9F001682FCB;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F588A3B502F0C38001000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = configure.ac;
+                       path = config/configure.ac;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F588A3B702F0CCE501000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F588A3D402F0CDCC01000102,
+                               F5060A0702F3366801000102,
+                               F5060A0802F3366801000102,
+                               F588A3D502F0CDCC01000102,
+                               F5060A2D02F342A901000102,
+                               F5060A3102F379BC01000102,
+                               F54AEAE502F6374901000102,
+                               F51F41EA02FF71F6010001CC,
+                               F54A06D0030DE8A501CC8267,
+                               F579DD9D0315B65001682FCB,
+                               F5CAA1F1031AB64F012F434D,
+                               F5CAA1F8031AB957012F434D,
+                               F5CAA1FD031AD509012F434D,
+                               F51307E403269DA6012F4765,
+                               F5EDFAEA032D516D01A80082,
+                               F50AFD420370620B01A80006,
+                               F50AFD4D0373BEE001A80006,
+                               F58D9F82037F144701A80006,
+                               F58D9F83037F144901A80006,
+                               F58D9F84037F144C01A80006,
+                               F5D51DF40399C7C201A80006,
+                               A64F6D28052A9DFF00140006,
+                               A63F3B42054DA02500140006,
+                               F588A3C502F0CCF701000102,
+                               F5060A0402F3337A01000102,
+                               F5060A2502F342A901000102,
+                               F5060A2602F342A901000102,
+                               F5060A2702F342A901000102,
+                               F5060A2802F342A901000102,
+                               F5060A2A02F342A901000102,
+                               F5060A2B02F342A901000102,
+                               F5060A2C02F342A901000102,
+                               F5060A3002F379BC01000102,
+                               F54AEAE402F6374901000102,
+                               F54AEB2802F6785101000102,
+                               F54AEB2A02F6793801000102,
+                               F54AEB3902F68F8D01000102,
+                               F51F41E302FF6A8F010001CC,
+                               F51F41E402FF6A8F010001CC,
+                               F51F41E502FF6A8F010001CC,
+                               F51F41E602FF6A8F010001CC,
+                               F51F41E902FF71F6010001CC,
+                               F51F41EC02FFBD64010001CC,
+                               F54A0640030DA3DD01CC8267,
+                               F579DD9C0315B65001682FCB,
+                               F579DD9F0315C9F001682FCB,
+                               F5CAA1F0031AB630012F434D,
+                               F5CAA1F3031AB74F012F434D,
+                               F5CAA1F6031AB947012F434D,
+                               F5CAA1FA031AD342012F434D,
+                               F51307D4032699F1012F4765,
+                               F50AFD400370620B01A80006,
+                               F50AFD410370620B01A80006,
+                               F50AFD4B0373BEC801A80006,
+                               F58D9F7C037F141A01A80006,
+                               F58D9F7D037F141A01A80006,
+                               F58D9F7E037F141A01A80006,
+                               F5D51DF20399C74801A80006,
+                               A64F6D26052A9DCC00140006,
+                               A63F3B40054DA00200140006,
+                               A6E2EAE0076567C1002AF736,
+                               A6E2EAE1076567C1002AF736,
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F588A3B802F0CCE501000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F51307FA0326A75C012F4765,
+                               F5D988CE03325BFC01A80006,
+                               F5D988CF03325BFC01A80006,
+                               F5D988D003325BFC01A80006,
+                               A6E2EAE2076567C1002AF736,
+                               A6E2EAE3076567C1002AF736,
+                       );
+                       isa = PBXResourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F588A3B902F0CCE501000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5CAA30B031AF0E1012F434D,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F588A3BA02F0CCE501000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F588A3BB02F0CCE501000102 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F588A3BC02F0CCE501000102 = {
+                       buildPhases = (
+                               F519539B0332717E01A80006,
+                               F588A3B702F0CCE501000102,
+                               F588A3B802F0CCE501000102,
+                               F588A3B902F0CCE501000102,
+                               F588A3BA02F0CCE501000102,
+                               F588A3BB02F0CCE501000102,
+                       );
+                       buildSettings = {
+                               DEBUGGING_SYMBOLS = NO;
+                               DYLIB_COMPATIBILITY_VERSION = 1;
+                               DYLIB_CURRENT_VERSION = 1;
+                               FRAMEWORK_VERSION = A;
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_LIBTOOL_FLAGS = "-static";
+                               OTHER_REZFLAGS = "";
+                               PRINCIPAL_CLASS = "";
+                               PRODUCT_NAME = ETL;
+                               SECTORDER_FLAGS = "";
+                               USE_GCC3_PFE_SUPPORT = YES;
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                               WRAPPER_EXTENSION = framework;
+                       };
+                       dependencies = (
+                       );
+                       isa = PBXFrameworkTarget;
+                       name = "ETL Framework";
+                       productInstallPath = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+                       productName = ETL;
+                       productReference = F588A3BD02F0CCE501000102;
+                       productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string></string>
+       <key>CFBundleGetInfoString</key>
+       <string></string>
+       <key>CFBundleIconFile</key>
+       <string></string>
+       <key>CFBundleIdentifier</key>
+       <string></string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string></string>
+       <key>CFBundlePackageType</key>
+       <string>FMWK</string>
+       <key>CFBundleShortVersionString</key>
+       <string></string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>0.0.1d1</string>
+</dict>
+</plist>
+";
+               };
+               F588A3BD02F0CCE501000102 = {
+                       explicitFileType = wrapper.framework;
+                       isa = PBXFileReference;
+                       path = ETL.framework;
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F588A3BE02F0CCE501000102 = {
+                       children = (
+                               F513069E032666F8012F4765,
+                               F588A3BD02F0CCE501000102,
+                               F5060A3702F37B5E01000102,
+                               F5060A4302F37BAC01000102,
+                               F5060A5802F37D8201000102,
+                               F5060A6102F37D8501000102,
+                               F5060A6E02F37DEF01000102,
+                               F54AEB3202F6899D01000102,
+                               F576CB75031841EA01A80006,
+                               F5CAA206031AD533012F434D,
+                               F51307E003269B0F012F4765,
+                               F58D9F8D037F146301A80006,
+                               F58D9F96037F14FE01A80006,
+                       );
+                       isa = PBXGroup;
+                       name = Products;
+                       path = "";
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F588A3C502F0CCF701000102 = {
+                       fileRef = F55001B702F0B61101000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F588A3D202F0CDCC01000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = angle;
+                       path = ETL/angle;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F588A3D302F0CDCC01000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = handle;
+                       path = ETL/handle;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F588A3D402F0CDCC01000102 = {
+                       fileRef = F588A3D202F0CDCC01000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F588A3D502F0CDCC01000102 = {
+                       fileRef = F588A3D302F0CDCC01000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F588A3D602F0CF9101000102 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = handle.cpp;
+                       path = test/handle.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F58D9F76037F141A01A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _boxblur.h;
+                       path = ETL/_boxblur.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F58D9F77037F141A01A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _gaussian.h;
+                       path = ETL/_gaussian.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F58D9F78037F141A01A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _pen.h;
+                       path = ETL/_pen.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F58D9F79037F141A01A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = boxblur;
+                       path = ETL/boxblur;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F58D9F7A037F141A01A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = gaussian;
+                       path = ETL/gaussian;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F58D9F7B037F141A01A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = pen;
+                       path = ETL/pen;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F58D9F7C037F141A01A80006 = {
+                       fileRef = F58D9F76037F141A01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                                       Private,
+                               );
+                       };
+               };
+               F58D9F7D037F141A01A80006 = {
+                       fileRef = F58D9F77037F141A01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                                       Private,
+                               );
+                       };
+               };
+               F58D9F7E037F141A01A80006 = {
+                       fileRef = F58D9F78037F141A01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                                       Private,
+                               );
+                       };
+               };
+               F58D9F82037F144701A80006 = {
+                       fileRef = F58D9F79037F141A01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F58D9F83037F144901A80006 = {
+                       fileRef = F58D9F7A037F141A01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F58D9F84037F144C01A80006 = {
+                       fileRef = F58D9F7B037F141A01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F58D9F85037F146301A80006 = {
+                       buildPhases = (
+                               F58D9F87037F146301A80006,
+                               F58D9F88037F146301A80006,
+                               F58D9F8A037F146301A80006,
+                               F58D9F8C037F146301A80006,
+                       );
+                       buildSettings = {
+                               HEADER_SEARCH_PATHS = "ETL.pbproj include";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Pen Test";
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F58D9F86037F146301A80006,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Pen Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F58D9F8D037F146301A80006;
+               };
+               F58D9F86037F146301A80006 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EACE07656757002AF736;
+               };
+               F58D9F87037F146301A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F58D9F88037F146301A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F58D9F8A037F146301A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F58D9F8B037F146301A80006,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F58D9F8B037F146301A80006 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F58D9F8C037F146301A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F58D9F8D037F146301A80006 = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Pen Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F58D9F8F037F14FE01A80006 = {
+                       buildPhases = (
+                               F58D9F91037F14FE01A80006,
+                               F58D9F92037F14FE01A80006,
+                               F58D9F93037F14FE01A80006,
+                               F58D9F95037F14FE01A80006,
+                       );
+                       buildSettings = {
+                               HEADER_SEARCH_PATHS = "ETL.pbproj include";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Surface Test";
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F58D9F90037F14FE01A80006,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Surface Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F58D9F96037F14FE01A80006;
+               };
+               F58D9F90037F14FE01A80006 = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EAD207656757002AF736;
+               };
+               F58D9F91037F14FE01A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F58D9F92037F14FE01A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F58D9F9A037F154D01A80006,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F58D9F93037F14FE01A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F58D9F94037F14FE01A80006,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F58D9F94037F14FE01A80006 = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F58D9F95037F14FE01A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F58D9F96037F14FE01A80006 = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Surface Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F58D9F98037F154401A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = surface.cpp;
+                       path = test/surface.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F58D9F9A037F154D01A80006 = {
+                       fileRef = F58D9F98037F154401A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5C1EE4903BCE00701A80006 = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXShellScriptBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "rm -fr ETL-devel.pkg";
+               };
+               F5CAA1ED031AB61C012F434D = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = smach;
+                       path = ETL/smach;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5CAA1EF031AB630012F434D = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _clock_win32hpcount.h;
+                       path = ETL/_clock_win32hpcount.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5CAA1F0031AB630012F434D = {
+                       fileRef = F5CAA1EF031AB630012F434D;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5CAA1F1031AB64F012F434D = {
+                       fileRef = F5CAA1ED031AB61C012F434D;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F5CAA1F2031AB74F012F434D = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _mutex_null.h;
+                       path = ETL/_mutex_null.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5CAA1F3031AB74F012F434D = {
+                       fileRef = F5CAA1F2031AB74F012F434D;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5CAA1F4031AB947012F434D = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _calculus.h;
+                       path = ETL/_calculus.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5CAA1F5031AB947012F434D = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = calculus;
+                       path = ETL/calculus;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5CAA1F6031AB947012F434D = {
+                       fileRef = F5CAA1F4031AB947012F434D;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5CAA1F8031AB957012F434D = {
+                       fileRef = F5CAA1F5031AB947012F434D;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F5CAA1F9031AD342012F434D = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _bspline.h;
+                       path = ETL/_bspline.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5CAA1FA031AD342012F434D = {
+                       fileRef = F5CAA1F9031AD342012F434D;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                                       Public,
+                               );
+                       };
+               };
+               F5CAA1FB031AD4E7012F434D = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = spline;
+                       path = ETL/spline;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5CAA1FD031AD509012F434D = {
+                       fileRef = F5CAA1FB031AD4E7012F434D;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F5CAA1FE031AD533012F434D = {
+                       buildPhases = (
+                               F5CAA200031AD533012F434D,
+                               F5CAA201031AD533012F434D,
+                               F5CAA203031AD533012F434D,
+                               F5CAA205031AD533012F434D,
+                       );
+                       buildSettings = {
+                               HEADER_SEARCH_PATHS = "ETL.pbproj include";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = "Spline Test";
+                               REZ_EXECUTABLE = YES;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                       };
+                       dependencies = (
+                               F5CAA1FF031AD533012F434D,
+                       );
+                       isa = PBXToolTarget;
+                       name = "Spline Test";
+                       productInstallPath = /usr/local/bin;
+                       productName = "Handle Test";
+                       productReference = F5CAA206031AD533012F434D;
+               };
+               F5CAA1FF031AD533012F434D = {
+                       isa = PBXTargetDependency;
+                       target = F588A3BC02F0CCE501000102;
+                       targetProxy = A6E2EAC007656757002AF736;
+               };
+               F5CAA200031AD533012F434D = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5CAA201031AD533012F434D = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5CAA209031AD56B012F434D,
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5CAA203031AD533012F434D = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F5CAA204031AD533012F434D,
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5CAA204031AD533012F434D = {
+                       fileRef = F588A3BD02F0CCE501000102;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5CAA205031AD533012F434D = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               F5CAA206031AD533012F434D = {
+                       explicitFileType = "compiled.mach-o.executable";
+                       isa = PBXFileReference;
+                       path = "Spline Test";
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               F5CAA208031AD56B012F434D = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = spline.cpp;
+                       path = test/spline.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5CAA209031AD56B012F434D = {
+                       fileRef = F5CAA208031AD56B012F434D;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5CAA305031AEFBC012F434D = {
+                       isa = PBXTargetDependency;
+                       target = F5CAA1FE031AD533012F434D;
+                       targetProxy = A6E2EAC907656757002AF736;
+               };
+               F5CAA306031AEFC1012F434D = {
+                       isa = PBXTargetDependency;
+                       target = F576CB6D031841EA01A80006;
+                       targetProxy = A6E2EAC707656757002AF736;
+               };
+               F5CAA30A031AF0E1012F434D = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.cpp.cpp;
+                       name = frameworkfix.cpp;
+                       path = ETL.pbproj/frameworkfix.cpp;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5CAA30B031AF0E1012F434D = {
+                       fileRef = F5CAA30A031AF0E1012F434D;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5D51DF00399C74801A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = _smart_ptr.h;
+                       path = ETL/_smart_ptr.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5D51DF10399C74801A80006 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = smart_ptr;
+                       path = ETL/smart_ptr;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5D51DF20399C74801A80006 = {
+                       fileRef = F5D51DF00399C74801A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                                       Private,
+                               );
+                       };
+               };
+               F5D51DF40399C7C201A80006 = {
+                       fileRef = F5D51DF10399C74801A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               F5D988CB03325BFC01A80006 = {
+                       isa = PBXFileReference;
+                       lastKnownFileType = text.rtf;
+                       path = License.rtf;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5D988CC03325BFC01A80006 = {
+                       isa = PBXFileReference;
+                       lastKnownFileType = text.rtf;
+                       path = ReadMe.rtf;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5D988CD03325BFC01A80006 = {
+                       isa = PBXFileReference;
+                       lastKnownFileType = text.rtf;
+                       path = Welcome.rtf;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5D988CE03325BFC01A80006 = {
+                       fileRef = F5D988CB03325BFC01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5D988CF03325BFC01A80006 = {
+                       fileRef = F5D988CC03325BFC01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5D988D003325BFC01A80006 = {
+                       fileRef = F5D988CD03325BFC01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5D988D403325CD801A80006 = {
+                       fileRef = F5D988CD03325BFC01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5D988D503325CDB01A80006 = {
+                       fileRef = F5D988CC03325BFC01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5D988D603325CDE01A80006 = {
+                       fileRef = F5D988CB03325BFC01A80006;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F5EDFAE8032D514001A80082 = {
+                       fileEncoding = 30;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text;
+                       name = trivial;
+                       path = ETL/trivial;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               F5EDFAEA032D516D01A80082 = {
+                       fileRef = F5EDFAE8032D514001A80082;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+       };
+       rootObject = F550016502F0983D01000102;
+}
diff --git a/ETL/tags/0.4.11/ETL.pc.in b/ETL/tags/0.4.11/ETL.pc.in
new file mode 100644 (file)
index 0000000..93c32bf
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_TARNAME@
+Description: @PACKAGE_NAME@
+Requires:
+Version: @VERSION@
+Libs: @LIBS@
+Cflags: -I${includedir}
diff --git a/ETL/tags/0.4.11/ETL.prj b/ETL/tags/0.4.11/ETL.prj
new file mode 100644 (file)
index 0000000..f7fd779
--- /dev/null
@@ -0,0 +1,169 @@
+# Anjuta Version 1.2.0 
+Compatibility Level: 1 
+
+<PROJECT_DESCRIPTION_START>
+Extended Template library
+
+<PROJECT_DESCRIPTION_END>
+<CONFIG_PROGS_START>
+<CONFIG_PROGS_END>
+<CONFIG_LIBS_START>
+<CONFIG_LIBS_END>
+<CONFIG_HEADERS_START>
+<CONFIG_HEADERS_END>
+<CONFIG_CHARACTERISTICS_START>
+<CONFIG_CHARACTERISTICS_END>
+<CONFIG_LIB_FUNCS_START>
+<CONFIG_LIB_FUNCS_END>
+<CONFIG_ADDITIONAL_START>
+<CONFIG_ADDITIONAL_END>
+<CONFIG_FILES_START>
+<CONFIG_FILES_END>
+<MAKEFILE_AM_START>
+<MAKEFILE_AM_END>
+
+props.file.type=project
+
+anjuta.version=1.2.0
+anjuta.compatibility.level=1
+
+project.name=ETL
+project.type=GENERIC
+project.target.type=EXECUTABLE
+project.version=0.99
+project.author=Robert Quattlebaum
+project.source.target=unknown
+project.has.gettext=0
+project.gui.command=
+project.programming.language=C++
+project.excluded.modules=intl
+
+project.config.extra.modules.before=
+project.config.extra.modules.after=
+project.config.blocked=1
+project.config.disable.overwriting=1 1 1 1 1 1 1 1 1 
+
+project.menu.entry=ETL Version 0.99
+project.menu.group=Application
+project.menu.comment=ETL Version 0.99
+project.menu.icon=
+project.menu.need.terminal=0
+
+project.configure.options=
+anjuta.program.arguments=
+preferences.build.option.jobs=0
+preferences.build.option.silent=0
+preferences.build.option.autosave=0
+preferences.anjuta.make.options=-k
+preferences.make=make
+preferences.build.option.keep.going=1
+preferences.build.option.warn.undef=0
+preferences.autoformat.custom.style= -i8 -sc -bli0 -bl0 -cbi0 -ss
+preferences.indent.opening=0
+preferences.autoformat.disable=1
+preferences.indent.automatic=1
+preferences.use.tabs=1
+preferences.indent.size=4
+preferences.tabsize=4
+preferences.indent.closing=0
+
+module.include.name=.
+module.include.type=
+module.include.files=\
+       ETL/_bit_rotate.h\
+       ETL/_bezier.h\
+       ETL/_fastangle_tables.h\
+       ETL/_boxblur.h\
+       ETL/_clock_system.h\
+       ETL/_gaussian.h\
+       ETL/_rwlock.h\
+       ETL/_stringf.h\
+       ETL/_status.h\
+       ETL/_smart_ptr.h\
+       ETL/_thread.h\
+       ETL/_curve_func.h\
+       ETL/etl_profile_.h\
+       ETL/_curve.h\
+       ETL/_calculus.h\
+       ETL/_trivial.h\
+       ETL/etl_profile.h\
+       ETL/_pen.h\
+       ETL/_misc.h\
+       ETL/_mutex_win32.h\
+       ETL/_clock_gettimeofday.h\
+       ETL/_ref_count.h\
+       ETL/_bezier_angle.h\
+       ETL/_clock_base.h\
+       ETL/_bspline.h\
+       ETL/_smach.h\
+       ETL/_fixed.h\
+       ETL/_condition.h\
+       ETL/_mutex_null.h\
+       ETL/_surface.h\
+       ETL/_fastangle.h\
+       ETL/_mutex_pthreads.h\
+       ETL/_hermite.h\
+       ETL/_handle.h\
+       ETL/_random.h\
+       ETL/_angle.h\
+       ETL/_clock_win32hpcount.h\
+       ETL/etl_config.h\
+       ETL.pbproj/etl_profile.h
+
+module.source.name=.
+module.source.type=
+module.source.files=\
+       test/surface.cpp\
+       test/random.cpp\
+       test/smach.cpp\
+       test/smart_ptr.cpp\
+       test/benchmark.cpp\
+       test/spline.cpp\
+       test/handle.cpp\
+       test/stringf.cpp\
+       test/clock.cpp\
+       test/angle.cpp\
+       test/hermite.cpp\
+       test/fixed.cpp\
+       test/pen.cpp\
+       ETL.pbproj/frameworkfix.cpp
+
+module.pixmap.name=.
+module.pixmap.type=
+module.pixmap.files=
+
+module.data.name=.
+module.data.type=
+module.data.files=
+
+module.help.name=.
+module.help.type=
+module.help.files=
+
+module.doc.name=.
+module.doc.type=
+module.doc.files=\
+       README\
+       INSTALL\
+       ChangeLog
+
+module.po.files=
+
+compiler.options.supports=
+compiler.options.include.paths=\
+       .\
+       ..
+compiler.options.library.paths=
+compiler.options.libraries=
+compiler.options.libraries.selected=
+compiler.options.defines=\
+       HAVE_CONFIG_H
+compiler.options.defines.selected=
+compiler.options.warning.buttons=0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 
+compiler.options.optimize.buttons=0 0 1 0 
+compiler.options.other.buttons=1 0 
+compiler.options.other.c.flags=
+compiler.options.other.l.flags=
+compiler.options.other.l.libs=
+
+project.src.paths=
diff --git a/ETL/tags/0.4.11/ETL/Makefile.am b/ETL/tags/0.4.11/ETL/Makefile.am
new file mode 100644 (file)
index 0000000..68ccdda
--- /dev/null
@@ -0,0 +1,15 @@
+# $Id$
+
+MAINTAINERCLEANFILES=Makefile.in
+
+CLEANFILES=$(top_builddir)/ETL/etl_profile.h
+
+etldir = $(includedir)/ETL
+
+etl_HEADERS= value _value.h rect _rect.h misc _misc.h ref_count _ref_count.h angle fastangle handle ipc thread fixed random clock hermite calculus stringf trivial spline _stringf.h _bspline.h _calculus.h _mutex_null.h _hermite.h _curve_func.h _clock_base.h _clock_system.h _clock_gettimeofday.h _random.h _angle.h _fastangle.h _curve.h _handle.h _thread.h _mutex_pthreads.h _mutex_win32.h _condition.h _rwlock.h smach _smach.h _trivial.h _fixed.h etl_config.h $(top_builddir)/ETL/etl_profile.h _fastangle_tables.h bezier _bezier.h _bezier_angle.h _status.h status pen _pen.h boxblur _boxblur.h gaussian _gaussian.h surface _surface.h smart_ptr _smart_ptr.h _clock_win32hpcount.h mutex _mutex_pthreads_simple.h
+
+$(top_builddir)/ETL/etl_profile.h:$(top_builddir)/ETL/etl_profile_.h
+       sed "s/PACKAGE/ETL/g;" < $(top_builddir)/ETL/etl_profile_.h > $(top_builddir)/ETL/etl_profile.h
+
+# FIXME: figure out why this is in SVN, but isn't installed
+EXTRA_DIST=_bit_rotate.h
diff --git a/ETL/tags/0.4.11/ETL/_angle.h b/ETL/tags/0.4.11/ETL/_angle.h
new file mode 100644 (file)
index 0000000..c15f90d
--- /dev/null
@@ -0,0 +1,516 @@
+#include <stdio.h>
+/* ========================================================================
+** Extended Template and Library
+** Angle Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2007 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_ANGLE_H
+#define __ETL_ANGLE_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <cmath>
+#include <functional>
+
+/* === M A C R O S ========================================================= */
+
+#ifndef PI
+# define PI (3.1415926535897932384626433832795029L)
+# define HALF_PI (PI/2)
+#endif
+
+#define ANGLE_EPSILON (1.0e-6)
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+// ========================================================================
+/*!    \class  angle   _angle.h        ETL/angle
+**     \brief  Abstraction of the concept of an angle
+**  \see angle::deg, angle::rad, angle::rot, angle::sin, angle::cos, angle::tan, fastangle
+**     \writeme
+*/
+class angle
+{
+public:
+       typedef float value_type;
+
+protected:
+       typedef value_type unit;
+
+       unit v; //! Stored in radians; positive values indicate counter-clockwise.
+
+public:
+
+       /*
+       ** Arithmetic Operators
+       */
+
+       const angle     &
+       operator+=(const angle &rhs)
+       { v+=rhs.v; return *this; }
+
+       const angle     &
+       operator-=(const angle &rhs)
+       { v-=rhs.v; return *this; }
+
+       const angle     &
+       operator*=(const unit &rhs)
+       { v*=rhs; return *this; }
+
+       const angle     &
+       operator/=(const unit &rhs)
+       { v/=rhs; return *this; }
+
+       //! Angle Addition Operator
+       angle
+       operator+(const angle &rhs)const
+       { return angle(*this)+=rhs; }
+
+       //! Angle Subtraction Operator
+       /*! \sa angle dist(const angle &) */
+       angle
+       operator-(const angle &rhs)const
+       { return angle(*this)-=rhs; }
+
+       //! Angle Scalar Multiplication Operator
+       /*! This operator will multiply the given
+               angle by the given scalar value. */
+       angle
+       operator*(const unit &rhs)const
+       { return angle(*this)*=rhs; }
+
+       angle
+       operator/(const unit &rhs)const
+       { return angle(*this)/=rhs; }
+
+       //! Angle Negation
+       angle
+       operator-()const
+       {
+               angle ret;
+               ret.v=-v;
+               return ret;
+       }
+
+#ifdef ETL_NOT_USED
+       //! 180 degree rotation operator
+       /*! Returns the angle directly opposite of
+               the given angle, and will yield a result
+               between 0 and 2PI */
+       angle
+       operator~()const
+       {
+               angle ret;
+               ret.v = v+PI;
+               return ret.mod();
+       }
+#endif // ETL_NOT_USED
+
+#ifdef ETL_WRAP_ANGLES
+       /*! Returns true if the shortest
+               angle from the left-hand to the
+               right-hand side is counter-clockwise */
+       bool
+       operator<(const angle &rhs)const
+       { return dist(rhs).v<(value_type)0.0; }
+
+       /*! Returns true if the shortest
+               angle from the left-hand to the
+               right-hand side is clockwise */
+       bool
+       operator>(const angle &rhs)const
+       { return dist(rhs).v>(value_type)0.0; }
+
+       /*! Returns true if the shortest
+               angle from the left-hand to the
+               right-hand side is counter-clockwise,
+               or if the angles are refer to the same
+               point on the unit circle. */
+       bool
+       operator<=(const angle &rhs)const
+       { return dist(rhs).v<=(value_type)0.0; }
+
+       /*! Returns true if the shortest
+               angle from the left-hand to the
+               right-hand side is clockwise,
+               or if the angles are refer to the same
+               point on the unit circle. */
+       bool
+       operator>=(const angle &rhs)const
+       { return dist(rhs).v>=(value_type)0.0; }
+
+       /*! Returns true if the angles
+               are refer to the same point
+               on the unit circle. */
+       bool
+       operator==(const angle &rhs)const
+       { return std::abs(dist(rhs).v)<ANGLE_EPSILON; }
+
+       /*! Returns false if the angles
+               are refer to the same point
+               on the unit circle. */
+       bool
+       operator!=(const angle &rhs)const
+       { return std::abs(dist(rhs).v)>ANGLE_EPSILON; }
+#else // ETL_WRAP_ANGLES
+       /*! Returns true if the left-hand
+               side is less than the
+               right-hand side */
+       bool
+       operator<(const angle &rhs)const
+       { return v < rhs.v; }
+
+       /*! Returns true if the left-hand
+               side is greater than the
+               right-hand side */
+       bool
+       operator>(const angle &rhs)const
+       { return v > rhs.v; }
+
+       /*! Returns true if the left-hand
+               side is less or equal to the
+               right-hand side */
+       bool
+       operator<=(const angle &rhs)const
+       { return v <= rhs.v; }
+
+       /*! Returns true if the left-hand
+               side is greater than or equal
+               to the right-hand side */
+       bool
+       operator>=(const angle &rhs)const
+       { return v >= rhs.v; }
+
+       /*! Returns true if the angles
+               are the same, or close */
+       bool
+       operator==(const angle &rhs)const
+       { return std::abs(v - rhs.v)<ANGLE_EPSILON; }
+
+       /*! Returns false if the angles
+               are different */
+       bool
+       operator!=(const angle &rhs)const
+               { return std::abs(v - rhs.v)>ANGLE_EPSILON; }
+#endif // ETL_WRAP_ANGLES
+
+       //! Absolute Angle Function
+       /*! This function will return the
+               absolute value of the angle. */
+       angle
+       abs()const
+       {
+               angle ret;
+               ret.v=std::abs(v);
+               return ret;
+       }
+
+#ifdef ETL_WRAP_ANGLES
+       //! Angle Difference Function
+       /*! This function will return the
+               shortest physical distance between
+               two angles, from -PI/2 to PI/2
+               \sa angle operator-(const angle &) */
+       angle
+       dist(const angle &rhs)const
+       {
+               angle ret;
+               ret.v=v-rhs.v;
+               ret.v-=rot_floor(ret.v+PI);
+               return ret;
+       }
+
+       //! Rotation Modulus
+       /*! This function will return the
+               value of the angle between 0 and 2PI */
+       angle
+       mod()const
+       {
+               angle ret(*this);
+               ret.v-=rot_floor(ret.v);
+               return ret;
+       }
+#else // ETL_WRAP_ANGLES
+       //! Angle Difference Function
+       /*! This function will return the
+               difference between
+               two angles, just like
+               \sa angle operator-(const angle &) */
+       angle
+       dist(const angle &rhs)const
+       { return angle(*this)-=rhs; }
+
+       //! Rotation Modulus
+       /*! This function will return the
+               value of the angle */
+       angle
+       mod()const
+       {
+               angle ret(*this);
+               return ret;
+       }
+#endif // ETL_WRAP_ANGLES
+
+       //! Zero Rotation (0 degrees)
+       static angle
+       zero()
+       {
+               angle ret;
+               ret.v=0;
+               return ret;
+       }
+
+       //! One Complete Rotation (360 degrees)
+       static angle
+       one()
+       {
+               angle ret;
+               ret.v=PI*2;
+               return ret;
+       }
+
+       //! One Half Rotation (180 degrees)
+       static angle
+       half()
+       {
+               angle ret;
+               ret.v=PI;
+               return ret;
+       }
+
+       bool operator!()const { return std::abs(mod().v) < ANGLE_EPSILON; }
+
+private:
+
+#ifdef ETL_WRAP_ANGLES
+       static value_type rot_floor(value_type x)
+       { return static_cast<value_type>(std::floor(x/(PI*2))*PI*2); }
+#endif // ETL_WRAP_ANGLES
+
+public:
+       /*
+       ** Conversion Classes
+       */
+
+       class rad;
+       class deg;
+       class rot;
+
+       /*
+       ** Trigonometric Classes
+       */
+
+       class sin;
+       class cos;
+       class tan;
+
+       /*
+       ** Friend classes
+       */
+
+       friend class rad;
+       friend class deg;
+       friend class rot;
+       friend class sin;
+       friend class cos;
+       friend class tan;
+
+       /*
+       ** Deprecated
+       */
+
+#ifndef ETL_NO_DEPRECATED
+       typedef rad             radians;
+       typedef deg             degrees;
+       typedef rot             rotations;
+#endif
+}; // END of class angle
+
+// ========================================================================
+/*!    \class  angle::rad      _angle.h        ETL/angle
+**     \brief  Angle representation in radians
+**     \see angle
+**     \writeme
+*/
+class angle::rad : public angle
+{
+public:
+       explicit rad(const value_type &x) { v=x; }
+       rad(const angle &a):angle(a) { }
+       rad     mod()const { return angle::mod(); }
+       rad dist(const angle &rhs)const { return angle::dist(rhs); }
+       value_type get()const { return v; }
+#ifndef ETL_NO_DEPRECATED
+       // operator value_type()const ETL_DEPRECATED_FUNCTION;
+#endif
+}; // END of class angle::radians
+// inline angle::rad::operator angle::value_type()const { return get(); }
+
+// ========================================================================
+/*!    \class  angle::deg      _angle.h        ETL/angle
+**     \brief  Angle representation in degrees
+**     \see angle
+**     \writeme
+*/
+class angle::deg : public angle
+{
+public:
+       explicit deg(const value_type &x) { v=x*((PI*2)/360); }
+       deg(const angle &a):angle(a) { }
+       deg     mod()const { return angle::mod(); }
+       deg dist(const angle &rhs)const { return angle::dist(rhs); }
+       value_type get()const { return v*360/(PI*2); }
+#ifndef ETL_NO_DEPRECATED
+       // operator value_type()const ETL_DEPRECATED_FUNCTION;
+#endif
+}; // END of class angle::degrees
+// inline angle::deg::operator angle::value_type()const { return get(); }
+
+// ========================================================================
+/*!    \class  angle::rot      _angle.h        ETL/angle
+**     \brief  Angle representation in rotations
+**     \see angle
+**     \writeme
+*/
+class angle::rot : public angle
+{
+public:
+       explicit rot(const value_type &x) { v=x*(PI*2); }
+       rot(const angle &a):angle(a) { }
+       rot mod()const { return angle::mod(); }
+       rot dist(const angle &rhs)const { return angle::dist(rhs); }
+       value_type get()const { return v/(PI*2); }
+#ifndef ETL_NO_DEPRECATED
+       // operator value_type()const ETL_DEPRECATED_FUNCTION;
+#endif
+}; // END of class angle::rotations
+// inline angle::rot::operator angle::value_type()const { return get(); }
+
+// ========================================================================
+/*!    \class  angle::sin      _angle.h        ETL/angle
+**     \brief  Angle representation as a sine function
+**     \see angle
+**     \writeme
+*/
+class angle::sin : public angle
+{
+public:
+       explicit sin(const value_type &x) { v=static_cast<value_type>(std::asin(x)); }
+       sin(const angle &a):angle(a) { }
+       sin     mod()const { return angle::mod(); }
+       sin dist(const angle &rhs)const { return angle::dist(rhs); }
+       value_type get()const { return static_cast<value_type>(std::sin(v)); }
+#ifndef ETL_NO_DEPRECATED
+       // operator value_type()const ETL_DEPRECATED_FUNCTION;
+#endif
+}; // END of class angle::sin
+// inline angle::sin::operator angle::value_type()const { return get(); }
+
+// ========================================================================
+/*!    \class  angle::cos      _angle.h        ETL/angle
+**     \brief  Angle representation as a cosine function
+**     \see angle
+**     \writeme
+*/
+class angle::cos : public angle
+{
+public:
+       explicit cos(const value_type &x)       { v=(value_type)(std::acos(x)); }
+       cos(const angle &a):angle(a) { }
+       cos     mod()const { return angle::mod(); }
+       cos dist(const angle &rhs)const { return angle::dist(rhs); }
+       value_type get()const { return (value_type)std::cos(v); }
+#ifndef ETL_NO_DEPRECATED
+       // operator value_type()const ETL_DEPRECATED_FUNCTION;
+#endif
+}; // END of class angle::cos
+// inline angle::cos::operator angle::value_type()const { return get(); }
+
+// ========================================================================
+/*!    \class  angle::tan      _angle.h        ETL/angle
+**     \brief  Angle representation as a tangent function
+**     \see angle
+**     \writeme
+*/
+class angle::tan : public angle
+{
+public:
+       explicit tan(const value_type &x)       { v=(value_type)(std::atan(x)); }
+       tan(const value_type &y,const value_type &x) { v=(value_type)(std::atan2(y,x)); }
+       tan(const angle &a):angle(a) { }
+       tan     mod()const { return angle::mod(); }
+       tan dist(const angle &rhs)const { return angle::dist(rhs); }
+       value_type get()const { return (value_type)std::tan(v); }
+#ifndef ETL_NO_DEPRECATED
+       // operator value_type()const ETL_DEPRECATED_FUNCTION;
+#endif
+}; // END of class angle::tan
+// inline angle::tan::operator angle::value_type()const { return get(); }
+
+_ETL_END_NAMESPACE
+
+//#include <iostream>
+
+template <typename T>
+struct affine_combo<etl::angle, T>
+{
+       typedef T time_type;
+
+       //affine_combo() { std::cerr<<"affine_combo<etl::angle,float>: I was created!"<<std::endl; }
+       //~affine_combo() { std::cerr<<"affine_combo<etl::angle,float>: I was DELETED!"<<std::endl; }
+
+       etl::angle operator()(const etl::angle &a,const etl::angle &b,const time_type &t)const
+       {
+               return b.dist(a)*(float)t+a;
+       }
+
+       etl::angle reverse(const etl::angle &x, const etl::angle &b, const time_type &t)const
+       {
+               return x.dist(b*(float)t)*(float)(time_type(1)/(time_type(1)-t));
+       }
+};
+
+template <>
+struct distance_func<etl::angle> : public std::binary_function<etl::angle, etl::angle, etl::angle>
+{
+       etl::angle operator()(const etl::angle &a,const etl::angle &b)const
+       {
+               etl::angle delta=b.dist(a);
+               //if(delta<etl::angle::zero())
+               //      return delta+etl::angle::one();
+               return delta;
+       }
+
+       etl::angle cook(const etl::angle &x)const { return x; }
+       etl::angle uncook(const etl::angle &x)const { return x; }
+};
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_bezier.h b/ETL/tags/0.4.11/ETL/_bezier.h
new file mode 100644 (file)
index 0000000..a08a42b
--- /dev/null
@@ -0,0 +1,992 @@
+/*! ========================================================================
+** Extended Template Library
+** Bezier Template Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2007 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_BEZIER_H
+#define __ETL_BEZIER_H
+
+/* === H E A D E R S ======================================================= */
+
+#include "_curve_func.h"
+#include <cmath>                               // for ldexp
+// #include <ETL/fixed>                        // not used
+
+/* === M A C R O S ========================================================= */
+
+#define MAXDEPTH 64    /*  Maximum depth for recursion */
+
+/* take binary sign of a, either -1, or 1 if >= 0 */
+#define SGN(a)         (((a)<0) ? -1 : 1)
+
+/* find minimum of a and b */
+#ifndef MIN
+#define MIN(a,b)       (((a)<(b))?(a):(b))
+#endif
+
+/* find maximum of a and b */
+#ifndef MAX
+#define MAX(a,b)       (((a)>(b))?(a):(b))
+#endif
+
+#define        BEZIER_EPSILON  (ldexp(1.0,-MAXDEPTH-1)) /*Flatness control value */
+//#define      BEZIER_EPSILON  0.00005 /*Flatness control value */
+#define        DEGREE  3                       /*  Cubic Bezier curve          */
+#define        W_DEGREE 5                      /*  Degree of eqn to find roots of */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template<typename V,typename T> class bezier;
+
+//! Cubic Bezier Curve Base Class
+// This generic implementation uses the DeCasteljau algorithm.
+// Works for just about anything that has an affine combination function
+template <typename V,typename T=float>
+class bezier_base : public std::unary_function<T,V>
+{
+public:
+       typedef V value_type;
+       typedef T time_type;
+
+private:
+       value_type a,b,c,d;
+       time_type r,s;
+
+protected:
+       affine_combo<value_type,time_type> affine_func;
+
+public:
+       bezier_base():r(0.0),s(1.0) { }
+       bezier_base(
+               const value_type &a, const value_type &b, const value_type &c, const value_type &d,
+               const time_type &r=0.0, const time_type &s=1.0):
+               a(a),b(b),c(c),d(d),r(r),s(s) { sync(); }
+
+       void sync()
+       {
+       }
+
+       value_type
+       operator()(time_type t)const
+       {
+               t=(t-r)/(s-r);
+               return
+               affine_func(
+                       affine_func(
+                               affine_func(a,b,t),
+                               affine_func(b,c,t)
+                       ,t),
+                       affine_func(
+                               affine_func(b,c,t),
+                               affine_func(c,d,t)
+                       ,t)
+               ,t);
+       }
+
+       /*
+       void evaluate(time_type t, value_type &f, value_type &df) const
+       {
+               t=(t-r)/(s-r);
+
+               value_type p1 = affine_func(
+                                                       affine_func(a,b,t),
+                                                       affine_func(b,c,t)
+                                                       ,t);
+               value_type p2 = affine_func(
+                                                       affine_func(b,c,t),
+                                                       affine_func(c,d,t)
+                                               ,t);
+
+               f = affine_func(p1,p2,t);
+               df = (p2-p1)*3;
+       }
+       */
+
+       void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; }
+       void set_r(time_type new_r) { r=new_r; }
+       void set_s(time_type new_s) { s=new_s; }
+       const time_type &get_r()const { return r; }
+       const time_type &get_s()const { return s; }
+       time_type get_dt()const { return s-r; }
+
+       bool intersect_hull(const bezier_base<value_type,time_type> &x)const
+       {
+               return 0;
+       }
+
+       //! Bezier curve intersection function
+       /*! Calculates the time of intersection
+       **      for the calling curve.
+       **
+       **      I still have not figured out a good generic
+       **      method of doing this for a bi-infinite
+       **      cubic bezier curve calculated with the DeCasteljau
+       **      algorithm.
+       **
+       **      One method, although it does not work for the
+       **      entire bi-infinite curve, is to iteratively
+       **      intersect the hulls. However, we would only detect
+       **      intersections that occur between R and S.
+       **
+       **      It is entirely possible that a new construct similar
+       **      to the affine combination function will be necessary
+       **      for this to work properly.
+       **
+       **      For now, this function is BROKEN. (although it works
+       **      for the floating-point specializations, using newton's method)
+       */
+       time_type intersect(const bezier_base<value_type,time_type> &x, time_type near=0.0)const
+       {
+               return 0;
+       }
+
+       /* subdivide at some time t into 2 separate curves left and right
+
+               b0 l1
+               *               0+1 l2
+               b1              *               1+2*1+2 l3
+               *               1+2             *                       0+3*1+3*2+3 l4,r1
+               b2              *               1+2*2+2 r2      *
+               *               2+3     r3      *
+               b3 r4   *
+               *
+
+               0.1 2.3 ->      0.1 2 3 4 5.6
+       */
+/*     void subdivide(bezier_base *left, bezier_base *right, const time_type &time = (time_type)0.5) const
+       {
+               time_type t = (time-r)/(s-r);
+               bezier_base lt,rt;
+
+               value_type temp;
+
+               //1st stage points to keep
+               lt.a = a;
+               rt.d = d;
+
+               //2nd stage calc
+               lt.b = affine_func(a,b,t);
+               temp = affine_func(b,c,t);
+               rt.c = affine_func(c,d,t);
+
+               //3rd stage calc
+               lt.c = affine_func(lt.b,temp,t);
+               rt.b = affine_func(temp,rt.c,t);
+
+               //last stage calc
+               lt.d = rt.a = affine_func(lt.c,rt.b,t);
+
+               //set the time range for l,r (the inside values should be 1, 0 respectively)
+               lt.r = r;
+               rt.s = s;
+
+               //give back the curves
+               if(left) *left = lt;
+               if(right) *right = rt;
+       }
+       */
+       value_type &
+       operator[](int i)
+       { return (&a)[i]; }
+
+       const value_type &
+       operator[](int i) const
+       { return (&a)[i]; }
+};
+
+
+#if 1
+// Fast float implementation of a cubic bezier curve
+template <>
+class bezier_base<float,float> : public std::unary_function<float,float>
+{
+public:
+       typedef float value_type;
+       typedef float time_type;
+private:
+       affine_combo<value_type,time_type> affine_func;
+       value_type a,b,c,d;
+       time_type r,s;
+
+       value_type _coeff[4];
+       time_type drs; // reciprocal of (s-r)
+public:
+       bezier_base():r(0.0),s(1.0),drs(1.0) { }
+       bezier_base(
+               const value_type &a, const value_type &b, const value_type &c, const value_type &d,
+               const time_type &r=0.0, const time_type &s=1.0):
+               a(a),b(b),c(c),d(d),r(r),s(s),drs(1.0/(s-r)) { sync(); }
+
+       void sync()
+       {
+//             drs=1.0/(s-r);
+               _coeff[0]=                 a;
+               _coeff[1]=           b*3 - a*3;
+               _coeff[2]=     c*3 - b*6 + a*3;
+               _coeff[3]= d - c*3 + b*3 - a;
+       }
+
+       // Cost Summary: 4 products, 3 sums, and 1 difference.
+       inline value_type
+       operator()(time_type t)const
+       { t-=r; t*=drs; return _coeff[0]+(_coeff[1]+(_coeff[2]+(_coeff[3])*t)*t)*t; }
+
+       void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=1.0/(s-r); }
+       void set_r(time_type new_r) { r=new_r; drs=1.0/(s-r); }
+       void set_s(time_type new_s) { s=new_s; drs=1.0/(s-r); }
+       const time_type &get_r()const { return r; }
+       const time_type &get_s()const { return s; }
+       time_type get_dt()const { return s-r; }
+
+       //! Bezier curve intersection function
+       /*! Calculates the time of intersection
+       **      for the calling curve.
+       */
+       time_type intersect(const bezier_base<value_type,time_type> &x, time_type t=0.0,int i=15)const
+       {
+               //BROKEN - the time values of the 2 curves should be independent
+               value_type system[4];
+               system[0]=_coeff[0]-x._coeff[0];
+               system[1]=_coeff[1]-x._coeff[1];
+               system[2]=_coeff[2]-x._coeff[2];
+               system[3]=_coeff[3]-x._coeff[3];
+
+               t-=r;
+               t*=drs;
+
+               // Newton's method
+               // Inner loop cost summary: 7 products, 5 sums, 1 difference
+               for(;i;i--)
+                       t-= (system[0]+(system[1]+(system[2]+(system[3])*t)*t)*t)/
+                               (system[1]+(system[2]*2+(system[3]*3)*t)*t);
+
+               t*=(s-r);
+               t+=r;
+
+               return t;
+       }
+
+       value_type &
+       operator[](int i)
+       { return (&a)[i]; }
+
+       const value_type &
+       operator[](int i) const
+       { return (&a)[i]; }
+};
+
+
+// Fast double implementation of a cubic bezier curve
+template <>
+class bezier_base<double,float> : public std::unary_function<float,double>
+{
+public:
+       typedef double value_type;
+       typedef float time_type;
+private:
+       affine_combo<value_type,time_type> affine_func;
+       value_type a,b,c,d;
+       time_type r,s;
+
+       value_type _coeff[4];
+       time_type drs; // reciprocal of (s-r)
+public:
+       bezier_base():r(0.0),s(1.0),drs(1.0) { }
+       bezier_base(
+               const value_type &a, const value_type &b, const value_type &c, const value_type &d,
+               const time_type &r=0.0, const time_type &s=1.0):
+               a(a),b(b),c(c),d(d),r(r),s(s),drs(1.0/(s-r)) { sync(); }
+
+       void sync()
+       {
+//             drs=1.0/(s-r);
+               _coeff[0]=                 a;
+               _coeff[1]=           b*3 - a*3;
+               _coeff[2]=     c*3 - b*6 + a*3;
+               _coeff[3]= d - c*3 + b*3 - a;
+       }
+
+       // 4 products, 3 sums, and 1 difference.
+       inline value_type
+       operator()(time_type t)const
+       { t-=r; t*=drs; return _coeff[0]+(_coeff[1]+(_coeff[2]+(_coeff[3])*t)*t)*t; }
+
+       void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=1.0/(s-r); }
+       void set_r(time_type new_r) { r=new_r; drs=1.0/(s-r); }
+       void set_s(time_type new_s) { s=new_s; drs=1.0/(s-r); }
+       const time_type &get_r()const { return r; }
+       const time_type &get_s()const { return s; }
+       time_type get_dt()const { return s-r; }
+
+       //! Bezier curve intersection function
+       /*! Calculates the time of intersection
+       **      for the calling curve.
+       */
+       time_type intersect(const bezier_base<value_type,time_type> &x, time_type t=0.0,int i=15)const
+       {
+               //BROKEN - the time values of the 2 curves should be independent
+               value_type system[4];
+               system[0]=_coeff[0]-x._coeff[0];
+               system[1]=_coeff[1]-x._coeff[1];
+               system[2]=_coeff[2]-x._coeff[2];
+               system[3]=_coeff[3]-x._coeff[3];
+
+               t-=r;
+               t*=drs;
+
+               // Newton's method
+               // Inner loop: 7 products, 5 sums, 1 difference
+               for(;i;i--)
+                       t-= (system[0]+(system[1]+(system[2]+(system[3])*t)*t)*t)/
+                               (system[1]+(system[2]*2+(system[3]*3)*t)*t);
+
+               t*=(s-r);
+               t+=r;
+
+               return t;
+       }
+
+       value_type &
+       operator[](int i)
+       { return (&a)[i]; }
+
+       const value_type &
+       operator[](int i) const
+       { return (&a)[i]; }
+};
+
+//#ifdef __FIXED__
+
+// Fast double implementation of a cubic bezier curve
+/*
+template <>
+template <class T,unsigned int FIXED_BITS>
+class bezier_base<fixed_base<T,FIXED_BITS> > : std::unary_function<fixed_base<T,FIXED_BITS>,fixed_base<T,FIXED_BITS> >
+{
+public:
+       typedef fixed_base<T,FIXED_BITS> value_type;
+       typedef fixed_base<T,FIXED_BITS> time_type;
+
+private:
+       affine_combo<value_type,time_type> affine_func;
+       value_type a,b,c,d;
+       time_type r,s;
+
+       value_type _coeff[4];
+       time_type drs; // reciprocal of (s-r)
+public:
+       bezier_base():r(0.0),s(1.0),drs(1.0) { }
+       bezier_base(
+               const value_type &a, const value_type &b, const value_type &c, const value_type &d,
+               const time_type &r=0, const time_type &s=1):
+               a(a),b(b),c(c),d(d),r(r),s(s),drs(1.0/(s-r)) { sync(); }
+
+       void sync()
+       {
+               drs=time_type(1)/(s-r);
+               _coeff[0]=                 a;
+               _coeff[1]=           b*3 - a*3;
+               _coeff[2]=     c*3 - b*6 + a*3;
+               _coeff[3]= d - c*3 + b*3 - a;
+       }
+
+       // 4 products, 3 sums, and 1 difference.
+       inline value_type
+       operator()(time_type t)const
+       { t-=r; t*=drs; return _coeff[0]+(_coeff[1]+(_coeff[2]+(_coeff[3])*t)*t)*t; }
+
+       void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=time_type(1)/(s-r); }
+       void set_r(time_type new_r) { r=new_r; drs=time_type(1)/(s-r); }
+       void set_s(time_type new_s) { s=new_s; drs=time_type(1)/(s-r); }
+       const time_type &get_r()const { return r; }
+       const time_type &get_s()const { return s; }
+       time_type get_dt()const { return s-r; }
+
+       //! Bezier curve intersection function
+       //! Calculates the time of intersection
+       //      for the calling curve.
+       //
+       time_type intersect(const bezier_base<value_type,time_type> &x, time_type t=0,int i=15)const
+       {
+               value_type system[4];
+               system[0]=_coeff[0]-x._coeff[0];
+               system[1]=_coeff[1]-x._coeff[1];
+               system[2]=_coeff[2]-x._coeff[2];
+               system[3]=_coeff[3]-x._coeff[3];
+
+               t-=r;
+               t*=drs;
+
+               // Newton's method
+               // Inner loop: 7 products, 5 sums, 1 difference
+               for(;i;i--)
+                       t-=(time_type) ( (system[0]+(system[1]+(system[2]+(system[3])*t)*t)*t)/
+                               (system[1]+(system[2]*2+(system[3]*3)*t)*t) );
+
+               t*=(s-r);
+               t+=r;
+
+               return t;
+       }
+
+       value_type &
+       operator[](int i)
+       { return (&a)[i]; }
+
+       const value_type &
+       operator[](int i) const
+       { return (&a)[i]; }
+};
+*/
+//#endif
+
+#endif
+
+
+
+template <typename V, typename T>
+class bezier_iterator
+{
+public:
+
+       struct iterator_category {};
+       typedef V value_type;
+       typedef T difference_type;
+       typedef V reference;
+
+private:
+       difference_type t;
+       difference_type dt;
+       bezier_base<V,T>        curve;
+
+public:
+
+/*
+       reference
+       operator*(void)const { return curve(t); }
+       const surface_iterator&
+
+       operator++(void)
+       { t+=dt; return &this; }
+
+       const surface_iterator&
+       operator++(int)
+       { hermite_iterator _tmp=*this; t+=dt; return _tmp; }
+
+       const surface_iterator&
+       operator--(void)
+       { t-=dt; return &this; }
+
+       const surface_iterator&
+       operator--(int)
+       { hermite_iterator _tmp=*this; t-=dt; return _tmp; }
+
+
+       surface_iterator
+       operator+(difference_type __n) const
+       { return surface_iterator(data+__n[0]+__n[1]*pitch,pitch); }
+
+       surface_iterator
+       operator-(difference_type __n) const
+       { return surface_iterator(data-__n[0]-__n[1]*pitch,pitch); }
+*/
+
+};
+
+template <typename V,typename T=float>
+class bezier : public bezier_base<V,T>
+{
+public:
+       typedef V value_type;
+       typedef T time_type;
+       typedef float distance_type;
+       typedef bezier_iterator<V,T> iterator;
+       typedef bezier_iterator<V,T> const_iterator;
+
+       distance_func<value_type> dist;
+
+       using bezier_base<V,T>::get_r;
+       using bezier_base<V,T>::get_s;
+       using bezier_base<V,T>::get_dt;
+
+public:
+       bezier() { }
+       bezier(const value_type &a, const value_type &b, const value_type &c, const value_type &d):
+               bezier_base<V,T>(a,b,c,d) { }
+
+
+       const_iterator begin()const;
+       const_iterator end()const;
+
+       time_type find_closest(bool fast, const value_type& x, int i=7)const
+       {
+           if (!fast)
+           {
+                       value_type array[4] = {
+                               bezier<V,T>::operator[](0),
+                               bezier<V,T>::operator[](1),
+                               bezier<V,T>::operator[](2),
+                               bezier<V,T>::operator[](3)};
+                       float t = NearestPointOnCurve(x, array);
+                       return t > 0.999999 ? 0.999999 : t < 0.000001 ? 0.000001 : t;
+           }
+           else
+           {
+                       time_type r(0), s(1);
+                       float t((r+s)*0.5); /* half way between r and s */
+
+                       for(;i;i--)
+                       {
+                               // compare 33% of the way between r and s with 67% of the way between r and s
+                               if(dist(operator()((s-r)*(1.0/3.0)+r), x) <
+                                  dist(operator()((s-r)*(2.0/3.0)+r), x))
+                                       s=t;
+                               else
+                                       r=t;
+                               t=((r+s)*0.5);
+                       }
+                       return t;
+               }
+       }
+
+       distance_type find_distance(time_type r, time_type s, int steps=7)const
+       {
+               const time_type inc((s-r)/steps);
+               distance_type ret(0);
+               value_type last(operator()(r));
+
+               for(r+=inc;r<s;r+=inc)
+               {
+                       const value_type n(operator()(r));
+                       ret+=dist.uncook(dist(last,n));
+                       last=n;
+               }
+               ret+=dist.uncook(dist(last,operator()(r)))*(s-(r-inc))/inc;
+
+               return ret;
+       }
+
+       distance_type length()const { return find_distance(get_r(),get_s()); }
+
+       /* subdivide at some time t into 2 separate curves left and right
+
+               b0 l1
+               *               0+1 l2
+               b1              *               1+2*1+2 l3
+               *               1+2             *                       0+3*1+3*2+3 l4,r1
+               b2              *               1+2*2+2 r2      *
+               *               2+3     r3      *
+               b3 r4   *
+               *
+
+               0.1 2.3 ->      0.1 2 3 4 5.6
+       */
+       void subdivide(bezier *left, bezier *right, const time_type &time = (time_type)0.5) const
+       {
+               time_type t=(time-get_r())/get_dt();
+               bezier lt,rt;
+
+               value_type temp;
+               const value_type& a((*this)[0]);
+               const value_type& b((*this)[1]);
+               const value_type& c((*this)[2]);
+               const value_type& d((*this)[3]);
+
+               //1st stage points to keep
+               lt[0] = a;
+               rt[3] = d;
+
+               //2nd stage calc
+               lt[1] = affine_func(a,b,t);
+               temp = affine_func(b,c,t);
+               rt[2] = affine_func(c,d,t);
+
+               //3rd stage calc
+               lt[2] = affine_func(lt[1],temp,t);
+               rt[1] = affine_func(temp,rt[2],t);
+
+               //last stage calc
+               lt[3] = rt[0] = affine_func(lt[2],rt[1],t);
+
+               //set the time range for l,r (the inside values should be 1, 0 respectively)
+               lt.set_r(get_r());
+               rt.set_s(get_s());
+
+               lt.sync();
+               rt.sync();
+
+               //give back the curves
+               if(left) *left = lt;
+               if(right) *right = rt;
+       }
+
+
+       void evaluate(time_type t, value_type &f, value_type &df) const
+       {
+               t=(t-get_r())/get_dt();
+
+               const value_type& a((*this)[0]);
+               const value_type& b((*this)[1]);
+               const value_type& c((*this)[2]);
+               const value_type& d((*this)[3]);
+
+               const value_type p1 = affine_func(
+                                                       affine_func(a,b,t),
+                                                       affine_func(b,c,t)
+                                                       ,t);
+               const value_type p2 = affine_func(
+                                                       affine_func(b,c,t),
+                                                       affine_func(c,d,t)
+                                               ,t);
+
+               f = affine_func(p1,p2,t);
+               df = (p2-p1)*3;
+       }
+
+private:
+       /*
+        *  Bezier :
+        *      Evaluate a Bezier curve at a particular parameter value
+        *      Fill in control points for resulting sub-curves if "Left" and
+        *      "Right" are non-null.
+        *
+        *    int                       degree;         Degree of bezier curve
+        *    value_type        *VT;            Control pts
+        *    time_type         t;                      Parameter value
+        *    value_type        *Left;          RETURN left half ctl pts
+        *    value_type        *Right;         RETURN right half ctl pts
+        */
+       static value_type Bezier(value_type *VT, int degree, time_type t, value_type *Left, value_type *Right)
+       {
+               int             i, j;           /* Index variables      */
+               value_type      Vtemp[W_DEGREE+1][W_DEGREE+1];
+
+               /* Copy control points  */
+               for (j = 0; j <= degree; j++)
+                       Vtemp[0][j] = VT[j];
+
+               /* Triangle computation */
+               for (i = 1; i <= degree; i++)
+                       for (j =0 ; j <= degree - i; j++)
+                       {
+                               Vtemp[i][j][0] = (1.0 - t) * Vtemp[i-1][j][0] + t * Vtemp[i-1][j+1][0];
+                               Vtemp[i][j][1] = (1.0 - t) * Vtemp[i-1][j][1] + t * Vtemp[i-1][j+1][1];
+                       }
+
+               if (Left != NULL)
+                       for (j = 0; j <= degree; j++)
+                               Left[j]  = Vtemp[j][0];
+
+               if (Right != NULL)
+                       for (j = 0; j <= degree; j++)
+                               Right[j] = Vtemp[degree-j][j];
+
+               return (Vtemp[degree][0]);
+       }
+
+       /*
+        * CrossingCount :
+        *      Count the number of times a Bezier control polygon
+        *      crosses the 0-axis. This number is >= the number of roots.
+        *
+        *    value_type        *VT;                    Control pts of Bezier curve
+        */
+       static int CrossingCount(value_type *VT)
+       {
+               int     i;
+               int     n_crossings = 0;        /*  Number of zero-crossings    */
+               int             sign, old_sign;         /*  Sign of coefficients                */
+
+               sign = old_sign = SGN(VT[0][1]);
+               for (i = 1; i <= W_DEGREE; i++)
+               {
+                       sign = SGN(VT[i][1]);
+                       if (sign != old_sign) n_crossings++;
+                       old_sign = sign;
+               }
+
+               return n_crossings;
+       }
+
+       /*
+        *  ControlPolygonFlatEnough :
+        *      Check if the control polygon of a Bezier curve is flat enough
+        *      for recursive subdivision to bottom out.
+        *
+        *    value_type        *VT;            Control points
+        */
+       static int ControlPolygonFlatEnough(value_type *VT)
+       {
+               int                     i;                                      /* Index variable                                       */
+               distance_type   distance[W_DEGREE];     /* Distances from pts to line           */
+               distance_type   max_distance_above;     /* maximum of these                                     */
+               distance_type   max_distance_below;
+               time_type               intercept_1, intercept_2, left_intercept, right_intercept;
+               distance_type   a, b, c;                        /* Coefficients of implicit                     */
+               /* eqn for line from VT[0]-VT[deg]                      */
+               /* Find the  perpendicular distance                     */
+               /* from each interior control point to          */
+               /* line connecting VT[0] and VT[W_DEGREE]       */
+               {
+                       distance_type   abSquared;
+
+                       /* Derive the implicit equation for line connecting first *
+                        *  and last control points */
+                       a = VT[0][1] - VT[W_DEGREE][1];
+                       b = VT[W_DEGREE][0] - VT[0][0];
+                       c = VT[0][0] * VT[W_DEGREE][1] - VT[W_DEGREE][0] * VT[0][1];
+
+                       abSquared = (a * a) + (b * b);
+
+                       for (i = 1; i < W_DEGREE; i++)
+                       {
+                               /* Compute distance from each of the points to that line        */
+                               distance[i] = a * VT[i][0] + b * VT[i][1] + c;
+                               if (distance[i] > 0.0) distance[i] =  (distance[i] * distance[i]) / abSquared;
+                               if (distance[i] < 0.0) distance[i] = -(distance[i] * distance[i]) / abSquared;
+                       }
+               }
+
+               /* Find the largest distance */
+               max_distance_above = max_distance_below = 0.0;
+
+               for (i = 1; i < W_DEGREE; i++)
+               {
+                       if (distance[i] < 0.0) max_distance_below = MIN(max_distance_below, distance[i]);
+                       if (distance[i] > 0.0) max_distance_above = MAX(max_distance_above, distance[i]);
+               }
+
+               /* Implicit equation for "above" line */
+               intercept_1 = -(c + max_distance_above)/a;
+
+               /*  Implicit equation for "below" line */
+               intercept_2 = -(c + max_distance_below)/a;
+
+               /* Compute intercepts of bounding box   */
+               left_intercept = MIN(intercept_1, intercept_2);
+               right_intercept = MAX(intercept_1, intercept_2);
+
+               return 0.5 * (right_intercept-left_intercept) < BEZIER_EPSILON ? 1 : 0;
+       }
+
+       /*
+        *  ComputeXIntercept :
+        *      Compute intersection of chord from first control point to last
+        *  with 0-axis.
+        *
+        *    value_type        *VT;                    Control points
+        */
+       static time_type ComputeXIntercept(value_type *VT)
+       {
+               distance_type YNM = VT[W_DEGREE][1] - VT[0][1];
+               return (YNM*VT[0][0] - (VT[W_DEGREE][0] - VT[0][0])*VT[0][1]) / YNM;
+       }
+
+       /*
+        *  FindRoots :
+        *      Given a 5th-degree equation in Bernstein-Bezier form, find
+        *      all of the roots in the interval [0, 1].  Return the number
+        *      of roots found.
+        *
+        *    value_type        *w;                             The control points
+        *    time_type         *t;                             RETURN candidate t-values
+        *    int                       depth;                  The depth of the recursion
+        */
+       static int FindRoots(value_type *w, time_type *t, int depth)
+       {
+               int             i;
+               value_type      Left[W_DEGREE+1];       /* New left and right   */
+               value_type      Right[W_DEGREE+1];      /* control polygons             */
+               int             left_count;                     /* Solution count from  */
+               int                     right_count;            /* children                             */
+               time_type       left_t[W_DEGREE+1];     /* Solutions from kids  */
+               time_type       right_t[W_DEGREE+1];
+
+               switch (CrossingCount(w))
+               {
+                       case 0 :
+                       {       /* No solutions here    */
+                               return 0;
+                       }
+                       case 1 :
+                       {       /* Unique solution      */
+                               /* Stop recursion when the tree is deep enough          */
+                               /* if deep enough, return 1 solution at midpoint        */
+                               if (depth >= MAXDEPTH)
+                               {
+                                       t[0] = (w[0][0] + w[W_DEGREE][0]) / 2.0;
+                                       return 1;
+                               }
+                               if (ControlPolygonFlatEnough(w))
+                               {
+                                       t[0] = ComputeXIntercept(w);
+                                       return 1;
+                               }
+                               break;
+                       }
+               }
+
+               /* Otherwise, solve recursively after   */
+               /* subdividing control polygon                  */
+               Bezier(w, W_DEGREE, 0.5, Left, Right);
+               left_count  = FindRoots(Left,  left_t,  depth+1);
+               right_count = FindRoots(Right, right_t, depth+1);
+
+               /* Gather solutions together    */
+               for (i = 0; i < left_count;  i++) t[i] = left_t[i];
+               for (i = 0; i < right_count; i++) t[i+left_count] = right_t[i];
+
+               /* Send back total number of solutions  */
+               return (left_count+right_count);
+       }
+
+       /*
+        *  ConvertToBezierForm :
+        *              Given a point and a Bezier curve, generate a 5th-degree
+        *              Bezier-format equation whose solution finds the point on the
+        *      curve nearest the user-defined point.
+        *
+        *    value_type&       P;                              The point to find t for
+        *    value_type        *VT;                    The control points
+        */
+       static void ConvertToBezierForm(const value_type& P, value_type *VT, value_type w[W_DEGREE+1])
+       {
+               int     i, j, k, m, n, ub, lb;
+               int     row, column;                            /* Table indices                                */
+               value_type      c[DEGREE+1];                    /* VT(i)'s - P                                  */
+               value_type      d[DEGREE];                              /* VT(i+1) - VT(i)                              */
+               distance_type   cdTable[3][4];          /* Dot product of c, d                  */
+               static distance_type z[3][4] = {        /* Precomputed "z" for cubics   */
+                       {1.0, 0.6, 0.3, 0.1},
+                       {0.4, 0.6, 0.6, 0.4},
+                       {0.1, 0.3, 0.6, 1.0}};
+
+               /* Determine the c's -- these are vectors created by subtracting */
+               /* point P from each of the control points                                               */
+               for (i = 0; i <= DEGREE; i++)
+                       c[i] = VT[i] - P;
+
+               /* Determine the d's -- these are vectors created by subtracting */
+               /* each control point from the next                                                              */
+               for (i = 0; i <= DEGREE - 1; i++)
+                       d[i] = (VT[i+1] - VT[i]) * 3.0;
+
+               /* Create the c,d table -- this is a table of dot products of the */
+               /* c's and d's                                                                                                    */
+               for (row = 0; row <= DEGREE - 1; row++)
+                       for (column = 0; column <= DEGREE; column++)
+                               cdTable[row][column] = d[row] * c[column];
+
+               /* Now, apply the z's to the dot products, on the skew diagonal */
+               /* Also, set up the x-values, making these "points"                             */
+               for (i = 0; i <= W_DEGREE; i++)
+               {
+                       w[i][0] = (distance_type)(i) / W_DEGREE;
+                       w[i][1] = 0.0;
+               }
+
+               n = DEGREE;
+               m = DEGREE-1;
+               for (k = 0; k <= n + m; k++)
+               {
+                       lb = MAX(0, k - m);
+                       ub = MIN(k, n);
+                       for (i = lb; i <= ub; i++)
+                       {
+                               j = k - i;
+                               w[i+j][1] += cdTable[j][i] * z[j][i];
+                       }
+               }
+       }
+
+       /*
+        *  NearestPointOnCurve :
+        *      Compute the parameter value of the point on a Bezier
+        *              curve segment closest to some arbitrary, user-input point.
+        *              Return the point on the curve at that parameter value.
+        *
+        *    value_type&       P;                      The user-supplied point
+        *    value_type        *VT;            Control points of cubic Bezier
+        */
+       static time_type NearestPointOnCurve(const value_type& P, value_type VT[4])
+       {
+               value_type      w[W_DEGREE+1];                  /* Ctl pts of 5th-degree curve  */
+               time_type       t_candidate[W_DEGREE];  /* Possible roots                                */
+               int             n_solutions;                    /* Number of roots found                 */
+               time_type       t;                                              /* Parameter value of closest pt */
+
+               /*  Convert problem to 5th-degree Bezier form */
+               ConvertToBezierForm(P, VT, w);
+
+               /* Find all possible roots of 5th-degree equation */
+               n_solutions = FindRoots(w, t_candidate, 0);
+
+               /* Compare distances of P to all candidates, and to t=0, and t=1 */
+               {
+                       distance_type   dist, new_dist;
+                       value_type              p, v;
+                       int                             i;
+
+                       /* Check distance to beginning of curve, where t = 0    */
+                       dist = (P - VT[0]).mag_squared();
+                       t = 0.0;
+
+                       /* Find distances for candidate points  */
+                       for (i = 0; i < n_solutions; i++)
+                       {
+                               p = Bezier(VT, DEGREE, t_candidate[i], (value_type *)NULL, (value_type *)NULL);
+                               new_dist = (P - p).mag_squared();
+                               if (new_dist < dist)
+                               {
+                                       dist = new_dist;
+                                       t = t_candidate[i];
+                               }
+                       }
+
+                       /* Finally, look at distance to end point, where t = 1.0 */
+                       new_dist = (P - VT[DEGREE]).mag_squared();
+                       if (new_dist < dist)
+                       {
+                               dist = new_dist;
+                               t = 1.0;
+                       }
+               }
+
+               /*  Return the point on the curve at parameter value t */
+               return t;
+       }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_bezier_angle.h b/ETL/tags/0.4.11/ETL/_bezier_angle.h
new file mode 100644 (file)
index 0000000..10156f2
--- /dev/null
@@ -0,0 +1,107 @@
+/*! ========================================================================
+** Extended Template Library
+** Bezier Template Class Implementation (Angle Specialization)
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_BEZIER_ANGLE_H
+#define __ETL_BEZIER_ANGLE_H
+
+/* === H E A D E R S ======================================================= */
+
+#include "_curve_func.h"
+#include "angle"
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+/*
+template <>
+class bezier_base<angle> : std::unary_function<float,angle>
+{
+public:
+       typedef angle value_type;
+       typedef float time_type;
+private:
+       affine_combo<value_type,time_type> affine_func;
+       value_type a,b,c,d;
+       time_type r,s;
+
+public:
+       bezier_base():r(0.0),s(1.0) { }
+       bezier_base(
+               const value_type &a, const value_type &b, const value_type &c, const value_type &d,
+               const time_type &r=0.0, const time_type &s=1.0):
+               a(a),b(b),c(c),d(d),r(r),s(s) { sync(); }
+
+       void sync(void)
+       {
+       }
+
+       value_type
+       operator()(time_type t)const
+       {
+               t=(t-r)/(s-r);
+               return
+               affine_func(
+                       affine_func(
+                               affine_func(a,b,t),
+                               affine_func(b,c,t)
+                       ,t),
+                       affine_func(
+                               affine_func(b,c,t),
+                               affine_func(c,d,t)
+                       ,t)
+               ,t);
+       }
+
+       void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; }
+       void set_r(time_type new_r) { r=new_r; }
+       void set_s(time_type new_s) { s=new_s; }
+       const time_type &get_r(void)const { return r; }
+       const time_type &get_s(void)const { return s; }
+       time_type get_dt(void)const { return s-r; }
+
+       value_type &
+       operator[](int i)
+       { return (&a)[i]; }
+
+       const value_type &
+       operator[](int i) const
+       { return (&a)[i]; }
+};
+*/
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
+
diff --git a/ETL/tags/0.4.11/ETL/_bit_rotate.h b/ETL/tags/0.4.11/ETL/_bit_rotate.h
new file mode 100644 (file)
index 0000000..c21c0e7
--- /dev/null
@@ -0,0 +1,62 @@
+/*! ========================================================================
+** Extended Template Library
+** Bit Rotation Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** These template functions have not yet been throughly tested,
+** and may be inaccurate or just plain wrong. You have been warned.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_BIT_ROTATE_H
+#define __ETL_BIT_ROTATE_H
+
+/* === H E A D E R S ======================================================= */
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template <typename T> T
+rot_left(const T &val, const int &bits=1)
+{
+       return (T)( ((unsigned)val<<bits)+((unsigned)val>>(sizeof(T)*8-bits)) );
+}
+
+template <typename T> T
+rot_right(const T &val, const int &bits=1)
+{
+       return (T)( ((unsigned)val>>bits)+((unsigned)val<<(sizeof(T)*8-bits)) );
+}
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
+
diff --git a/ETL/tags/0.4.11/ETL/_boxblur.h b/ETL/tags/0.4.11/ETL/_boxblur.h
new file mode 100644 (file)
index 0000000..39413e8
--- /dev/null
@@ -0,0 +1,246 @@
+/*! ========================================================================
+** Extended Template Library
+** Box Blur Template Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_BOXBLUR_H
+#define __ETL_BOXBLUR_H
+
+/* === H E A D E R S ======================================================= */
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template<typename T1,typename T2> void
+hbox_blur(T1 pen,int w, int h, int length, T2 outpen)
+{
+       int x,y;
+       typename T1::iterator_x iter, end;
+
+       length=std::min(w,length);
+       const float divisor(1.0f/(length*2+1));
+
+       for(y=0;y<h;y++,pen.inc_y(),outpen.inc_y())
+       {
+               iter=pen.x();
+               end=pen.end_x();
+
+               typename T1::accumulator_type tot(*iter*(length+1));
+
+               for (x=0;x<length && iter!=end;x++,++iter) tot+=*iter;
+               iter=pen.x();
+
+               for (x=0;x<w && iter!=end;x++,++iter,outpen.inc_x())
+               {
+                       tot -= (x>length) ? iter[-length-1] : *pen.x();
+                       tot += ((x+length)<w) ? iter[length] : end[-1];
+
+                       outpen.put_value(tot*divisor);
+               }
+               outpen.dec_x(x);
+       }
+}
+
+#if 1
+template<typename T1,typename T2> void
+vbox_blur(T1 pen,const int w, const int h, int length, T2 outpen)
+{
+       int x,y;
+       typename T1::iterator_y iter, end;
+
+       length=std::min(h,length);
+       const float divisor(1.0f/(length*2+1));
+
+       for(x=0;x<w;x++,pen.inc_x(),outpen.inc_x())
+       {
+               iter=pen.y();
+               end=pen.end_y();
+
+               typename T1::accumulator_type tot(*iter*(length+1));
+
+               for (y=0;y<length && iter!=end;y++,++iter) tot+=*iter;
+               iter=pen.y();
+
+               for (y=0;y<h && iter!=end;y++,++iter,outpen.inc_y())
+               {
+                       tot -= (y>length) ? iter[-length-1] : *pen.y();
+                       tot += ((y+length)<h) ? iter[length] : end[-1];
+
+                       outpen.put_value(tot*divisor);
+               }
+               outpen.dec_y(y);
+       }
+}
+
+#else
+
+template<typename T1,typename T2> void
+vbox_blur(T1 pen,int w, int h, int length,T2 outpen)
+{
+       int x,y;
+       typename T1::iterator_y iter, end, biter,eiter;
+
+       //print out the info I need to figure out if this is somehow a buffer overrun...
+       /*char *beginptr=0,*endptr=0;
+       {
+               T1 ypen = pen;
+               T1 endpen = pen;
+               endpen.move(w,h);
+               ypen.inc_y();
+
+               T2      open = outpen,
+                       oepen = outpen;
+               oepen.move(w,h);
+               printf("V Blur (%d,%d,s-%d) in(%p,%p,st %d) out(%p,%p)\n",
+                               w,h,length,(char*)pen.x(),(char*)endpen.x(),(char*)ypen.x()-(char*)pen.x(),
+                               (char*)open.x(),(char*)oepen.x());
+       }*/
+       length=min(h-1,length);
+
+       const float divisor(1.0f/(length*2+1));
+       //const int div = (length*2+1);
+
+       //since the filter range is 2*length+1 we need h-1
+       for(x=0;x<w;x++,pen.inc_x(),outpen.inc_x())
+       {
+               iter=pen.y();
+               end=pen.end_y();
+
+               const typename T1::value_type bval = *iter;
+               const typename T1::value_type eval = end[-1];
+
+               typename T1::accumulator_type tot(bval*(length+1));
+               //beginptr = (char*)&*iter; endptr = (char*)&*end;
+
+               //printf("\nx line %d (%p,%p)\n",x,beginptr,endptr);
+
+               //printf("Init %.3f - ",tot);
+               for (y=0;y<length && iter!=end;y++)
+               {
+                       tot+=iter[y];
+                       //printf("(%d,%p,+%.3f->%.3f),",y,&iter[y],iter[y],tot);
+               }
+               iter=pen.y();
+
+               //printf(" tot=%.3f\n",tot);
+
+               biter = iter+(-length-1); //get the first one...
+               eiter = iter+length;
+
+               //y will always be > length
+               //T2 open = outpen;
+               for (y=0;y<h && iter!=end;y++,++iter,++biter,++eiter,outpen.inc_y())
+               {
+                       //printf("y line %d - (%f) ",y,tot);
+
+                       if (y>length)
+                       {
+                               typename T1::value_type &v = *biter;
+                               /*if( (char*)&v < beginptr ||
+                                       (char*)&v >= endptr)
+                                       printf("crap! %d (%p off %p)\n",y,(char*)&v,(char*)&*iter);*/
+                               tot -= v;
+                               //printf("[%.3f,",v);
+                       }
+                       else
+                       {
+                               tot -= bval;
+                               //printf("[%.3f,",bval);
+                       }
+
+                       if (y+length<h)
+                       {
+                               typename T1::value_type &v = *eiter;
+                               /*if( (char*)&v < beginptr ||
+                                       (char*)&v >= endptr)
+                                       printf("crap! %d (%p off %p)\n",y,(char*)&v,(char*)&*iter);*/
+                               tot += v;
+                               //printf("%.3f]",v);
+                       }
+                       else
+                       {
+                               tot += eval;
+                               //printf("%.3f]",eval);
+                       }
+
+                       //test handled in the previous case...
+                       //tot -= (y>length) ? *biter : bval;
+                       //tot += (y+length<h) ? *eiter : eval;
+
+                       //printf(" - %.3f\n",tot);
+                       outpen.put_value(tot*divisor);
+               }
+               outpen.dec_y(y);
+       }
+}
+#endif
+
+template<typename T1,typename T2> void
+box_blur(T1 pen,int w, int h, int blur_w, int blur_h, T2 outpen)
+       { hbox_blur(pen,w,h,blur_w,outpen); vbox_blur(pen,w,h,blur_h,outpen); }
+
+template<typename T1,typename T2> void
+box_blur(T1 pen,int w, int h, int size, T2 outpen)
+       { hbox_blur(pen,w,h,size,outpen); vbox_blur(pen,w,h,size,outpen); }
+
+template<typename T1,typename T2> void
+hbox_blur(T1 begin,T1 end, int len,T2 outpen)
+{
+       typename T1::difference_type size(end-begin);
+       hbox_blur(begin,size.x,size.y,len,outpen);
+}
+
+template<typename T1,typename T2> void
+vbox_blur(T1 begin,T1 end, int len,T2 outpen)
+{
+       typename T1::difference_type size(end-begin);
+       vbox_blur(begin,size.x,size.y,len,outpen);
+}
+
+template<typename T1,typename T2> void
+box_blur(T1 begin,T1 end, int blur_w, int blur_h,T2 outpen)
+{
+       typename T1::difference_type size(end-begin);
+       hbox_blur(begin,size.x,size.y,blur_w,outpen); vbox_blur(begin,size.x,size.y,blur_h,outpen);
+}
+
+template<typename T1,typename T2> void
+box_blur(T1 begin,T1 end, int blursize,T2 outpen)
+{
+       typename T1::difference_type size(end-begin);
+       hbox_blur(begin,size.x,size.y,blursize,outpen); vbox_blur(begin,size.x,size.y,blursize,outpen);
+}
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_bspline.h b/ETL/tags/0.4.11/ETL/_bspline.h
new file mode 100644 (file)
index 0000000..edc00a7
--- /dev/null
@@ -0,0 +1,237 @@
+/*! ========================================================================
+** Extended Template and Library
+** B-Spline Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__BSPLINE_H
+#define __ETL__BSPLINE_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <vector>
+#include <functional>
+#include "_curve_func.h"
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template <class T, class K=float, class C=affine_combo<T,K>, class D=distance_func<T> >
+class bspline : public std::unary_function<K,T>
+{
+public:
+       typedef T value_type;
+       typedef K knot_type;
+       typedef std::vector<knot_type>  knot_container;
+       typedef std::vector<value_type> cpoint_container;
+       typedef typename knot_container::iterator knot_iterator;
+       typedef typename cpoint_container::iterator cpoint_iterator;
+
+       typedef C affine_func_type;
+       typedef D distance_func_type;
+
+protected:
+       affine_func_type affine_func;
+       distance_func_type distance_func;
+
+private:
+       int m;
+       knot_container _knots;
+       cpoint_container _cpoints;
+       bool _loop;
+
+public:
+       bspline():m(2),_loop(false) {  }
+
+       int get_m()const { return m-1; };
+       int set_m(int new_m) { m=new_m+1; return m-1; };
+
+       bool set_loop(bool x) { _loop=x; reset_knots(); return _loop; }
+
+       knot_container & knots() { return _knots; };
+       cpoint_container & cpoints() { return _cpoints; };
+
+       const knot_container & knots()const { return _knots; };
+       const cpoint_container & cpoints()const { return _cpoints; };
+
+       void reset_knots()
+       {
+               int i;
+
+               if(!_loop)
+               {
+                       _knots.clear();
+                       if(!_cpoints.size())
+                               return;
+                       while(m>(signed)_cpoints.size())
+                               m--;
+                       for(i=0;i<m;i++)
+                               *_knots.insert(_knots.end())=0;
+                       for(i=1;i<(signed)_cpoints.size()-m+1;i++)
+                               *_knots.insert(_knots.end())=i;
+                       for(i=0;i<m;i++)
+                               *_knots.insert(_knots.end())=_cpoints.size()-m+1;
+               }
+               else
+               {
+                       _knots.clear();
+                       if(!_cpoints.size())
+                               return;
+                       while(m>(signed)_cpoints.size())
+                               m--;
+                       for(i=0;i<=(signed)_cpoints.size()-m+1;i++)
+                               *_knots.insert(_knots.end())=i;
+               }
+       }
+
+       int calc_curve_segment(knot_type t)const
+       {
+               int k;
+               if(t<0)
+                       t=0;
+               if(t>=_knots.back())
+                       t=_knots.back()-0.0001;
+               for(k=0;_knots[k]>t || _knots[k+1]<=t;k++)
+                 ;
+
+               return k;
+       }
+
+       knot_container get_segment_knots(int i)const
+       {
+               if(i+1<m)
+               {
+                       knot_container ret(_knots.begin(),_knots.begin()+i+m+1);
+
+                       return ret;
+               }
+               if(i+1>=(signed)_knots.size())
+               {
+                       knot_container ret(_knots.begin()+i-m+1,_knots.end());
+                       return ret;
+               }
+               return knot_container(_knots.begin()+i-m+1,     _knots.begin()+i+m);
+       }
+
+       cpoint_container get_segment_cpoints(int i)const
+       {
+               if(i+1<m)
+               {
+                       return cpoint_container();
+               }
+               if(i+1>=(signed)_knots.size())
+               {
+                       return cpoint_container();
+               }
+               return cpoint_container(_cpoints.begin()+i-m+1, _cpoints.begin()+i+1);
+       }
+
+       cpoint_container calc_shell(knot_type t, int level)const
+       {
+               int
+                       i=calc_curve_segment(t),
+                       j,k;
+
+               knot_container u=get_segment_knots(i);
+
+               cpoint_container d=get_segment_cpoints(i);
+
+               if(!d.size())
+                       return cpoint_container();
+
+               for(j=0;d.size()>1 && j<level;d.pop_back(),j++)
+               {
+                       for(k=0;k<d.size()-1;k++)
+                       {
+                               d[k]=affine_func(d[k],d[k+1],((t-u[j+k+1])/(u[m+k]-u[j+k+1])));
+                       }
+               }
+               return d;
+       }
+
+       value_type operator()(knot_type t)const
+       {
+               return get_curve_val(calc_curve_segment(t),t);
+       }
+
+       value_type get_curve_val(int i,knot_type t)const
+       {
+               int
+                       j,k;
+
+               knot_container u=get_segment_knots(i);
+
+               cpoint_container d=get_segment_cpoints(i);
+
+               if(!d.size())
+                       return value_type();
+
+               for(j=0;d.size()>1;d.pop_back(),j++)
+               {
+                       for(k=0;k<(signed)d.size()-1;k++)
+                       {
+                               d[k]=affine_func(d[k],d[k+1],((t-u[j+k+1])/(u[m+k]-u[j+k+1])));
+                       }
+               }
+               return d.front();
+       }
+
+       cpoint_iterator find_closest_cpoint(const value_type &point, typename distance_func_type::result_type max)
+       {
+               cpoint_iterator i=_cpoints.begin();
+               cpoint_iterator ret=i;
+               typename distance_func_type::result_type dist=distance_func(point,_cpoints[0]);
+
+               // The distance function returns "cooked" (ie: squared)
+               // distances, so we need to cook our max distance for
+               // the comparison to work correctly.
+               max=distance_func.cook(max);
+
+               for(++i;i<_cpoints.end();i++)
+               {
+                       typename distance_func_type::result_type thisdist=distance_func(point,*i);
+
+                       if(thisdist<dist)
+                       {
+                               dist=thisdist;
+                               ret=i;
+                       }
+               }
+               if(dist<max)
+                       return ret;
+               return _cpoints.end();
+       }
+};
+
+_ETL_END_NAMESPACE
+
+/* -- F U N C T I O N S ----------------------------------------------------- */
+
+/* -- E N D ----------------------------------------------------------------- */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_calculus.h b/ETL/tags/0.4.11/ETL/_calculus.h
new file mode 100644 (file)
index 0000000..a9c95ed
--- /dev/null
@@ -0,0 +1,89 @@
+/*! ========================================================================
+** Extended Template and Library
+** Calculus Functional Classes Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__CALCULUS_H
+#define __ETL__CALCULUS_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <functional>
+
+/* === M A C R O S ========================================================= */
+
+//#ifndef _EPSILON
+//#define _EPSILON             0.0000001
+//#endif
+
+#define ETL_FIXED_DERIVATIVE 1
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template <typename T>
+class derivative : public std::unary_function<typename T::argument_type,typename T::result_type>
+{
+       T func;
+       typename T::argument_type epsilon;
+public:
+       explicit derivative(const T &x, const typename T::argument_type &epsilon=0.000001):func(x),epsilon(epsilon) { }
+
+       typename T::result_type
+       operator()(const typename T::argument_type &x)const
+       {
+#ifdef ETL_FIXED_DERIVATIVE
+               return (func(x+epsilon)-func(x))/epsilon;
+#else
+               return (func(x)-func(x+epsilon))/epsilon;
+#endif
+       }
+};
+
+template <typename T>
+class integral : public std::binary_function<typename T::argument_type,typename T::argument_type,typename T::result_type>
+{
+       T func;
+       int samples;
+public:
+       explicit integral(const T &x, const int &samples=500):func(x),samples(samples) { }
+
+       typename T::result_type
+       operator()(typename T::argument_type x,typename T::argument_type y)const
+       {
+               typename T::result_type ret=0;
+               int i=samples;
+               const typename T::argument_type increment=(y-x)/i;
+
+               for(;i;i--,x+=increment)
+                       ret+=(func(x)+func(x+increment))*increment/2;
+               return ret;
+       }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_clock_base.h b/ETL/tags/0.4.11/ETL/_clock_base.h
new file mode 100644 (file)
index 0000000..32d8742
--- /dev/null
@@ -0,0 +1,133 @@
+/*! ========================================================================
+** Extended Template and Library
+** Clock Abstraction Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__CLOCK_H
+#define __ETL__CLOCK_H
+
+/* === H E A D E R S ======================================================= */
+
+#ifndef WIN32
+#include <unistd.h>
+#else
+inline void sleep(int i) { Sleep(i*1000); }
+#endif
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+inline void yield() { sleep(0); }
+
+/*! ========================================================================
+** \class      clock_base
+** \brief      clock abstraction
+**
+** A more detailed description needs to be written.
+*/
+template <class DESC>
+class clock_base : public DESC
+{
+public:
+       typedef typename DESC::value_type value_type;
+
+private:
+       typedef clock_base<DESC> _clock;
+       typedef typename DESC::timestamp timestamp;
+
+       timestamp base_time;
+
+       using DESC::get_current_time;
+       using DESC::realtime;
+       using DESC::one_second;
+public:
+
+       clock_base() { reset(); }
+
+       void reset()
+       { get_current_time(base_time); }
+
+       value_type operator()()const
+       { return timestamp_to_seconds(get_current_time()-base_time); }
+
+       value_type pop_time()
+       {
+               // Grab the old base time
+               timestamp old_time=base_time;
+
+               // Put the current time into base_time
+               get_current_time(base_time);
+
+               return timestamp_to_seconds(base_time-old_time);
+       }
+
+       static void
+       sleep(const value_type &length)
+       {
+               if(!realtime())
+                       ::sleep((int)(length+0.5));
+               else
+               {
+                       _clock timer;
+                       timer.reset();
+                       value_type val;
+                       for(val=timer();one_second()<length-val;val=timer())
+                               ::sleep((int)((length-val)/2.0+0.4));
+                       while(timer()<length)
+                         ;
+               }
+
+
+               /* This is a different waiting mechanism that uses
+               ** the native timestamp type of the clock rather
+               ** than converting it to a double (or whatever).
+               ** You would think that this would be at least a
+               ** few microseconds faster, but a few tests on my
+               ** PowerBook G4 have proved otherwise. Indeed I loose
+               ** several microseconds using this "optimized" method.
+               ** Bizarre.
+               **      - darco (8-17-2002)
+               {
+                       timestamp endtime=get_current_time()+seconds_to_timestamp(length);
+                       timestamp loopendtime=get_current_time()+seconds_to_timestamp(length-1.0);
+                       while(get_current_time()<loopendtime)
+                               ::sleep((int)timestamp_to_seconds(loopendtime-get_current_time())/2.0);
+                       while(get_current_time()<endtime);
+               }
+               */
+
+               return;
+       }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_clock_gettimeofday.h b/ETL/tags/0.4.11/ETL/_clock_gettimeofday.h
new file mode 100644 (file)
index 0000000..97d08ea
--- /dev/null
@@ -0,0 +1,136 @@
+/*! ========================================================================
+** Extended Template and Library
+** gettimeofday() Clock Description Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__CLOCK_GETTIMEOFDAY_H
+#define __ETL__CLOCK_GETTIMEOFDAY_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <sys/time.h>
+#include <cmath>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class clock_desc_gettimeofday
+{
+public:
+       typedef double value_type;
+
+       inline static bool realtime()
+       { return true; }
+
+       inline static bool proctime()
+       { return false; }
+
+       inline static value_type
+       one_second()
+       { return 1.0f; }
+
+       inline static value_type precision()
+       { return one_second()/(value_type)1000000.0f; }
+
+       inline static const char *description()
+       { return "UNIX gettimeofday()"; };
+
+protected:
+       class timestamp : public timeval
+       {
+               timestamp(int sec, int usec)
+               { tv_sec=sec; tv_usec=usec; }
+
+               friend class clock_desc_gettimeofday;
+       public:
+               timestamp() { }
+
+
+               inline timestamp operator-(const timestamp &rhs)const
+               {
+                       timestamp ret;
+                       ret.tv_usec=tv_usec-rhs.tv_usec;
+
+                       if(ret.tv_usec<0)
+                       {
+                               ret.tv_sec=tv_sec-rhs.tv_sec-1;
+                               ret.tv_usec+=1000000;
+                       }
+                       else
+                               ret.tv_sec=tv_sec-rhs.tv_sec;
+                       return ret;
+               }
+
+               inline timestamp operator+(timestamp rhs)const
+               {
+                       rhs.tv_usec+=tv_usec;
+
+                       if(rhs.tv_usec>1000000)
+                       {
+                               rhs.tv_sec+=tv_sec+1;
+                               rhs.tv_usec-=1000000;
+                       }
+                       else
+                               rhs.tv_sec+=tv_sec;
+                       return rhs;
+               }
+
+               inline bool operator<(const timestamp &rhs)const
+               { return tv_sec<rhs.tv_sec || tv_usec<rhs.tv_usec; }
+
+               inline bool operator==(const timestamp &rhs)const
+               { return tv_usec==rhs.tv_usec && tv_sec==rhs.tv_sec; }
+
+               inline bool operator!=(const timestamp &rhs)const
+               { return tv_usec!=rhs.tv_usec || tv_sec!=rhs.tv_sec; }
+       };
+
+       static void
+       get_current_time(timestamp &x)
+       { gettimeofday(&x,NULL);}
+
+       static timestamp
+       get_current_time()
+       { timestamp ret; get_current_time(ret); return ret; }
+
+       static value_type
+       timestamp_to_seconds(const timestamp &x)
+       { return (value_type)x.tv_sec + precision()*x.tv_usec; }
+
+       static timestamp
+       seconds_to_timestamp(const value_type &x)
+       { return timestamp((int)floor(x), (int)((x-floor(x))/precision()+0.5)); }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
+
diff --git a/ETL/tags/0.4.11/ETL/_clock_system.h b/ETL/tags/0.4.11/ETL/_clock_system.h
new file mode 100644 (file)
index 0000000..0e43d4d
--- /dev/null
@@ -0,0 +1,147 @@
+/*! ========================================================================
+** Extended Template and Library
+** Proc Clock Description Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__CLOCK_SYSTEM_H
+#define __ETL__CLOCK_SYSTEM_H
+
+/* === H E A D E R S ======================================================= */
+
+#ifndef _WIN32
+# include <time.h>
+# define __sys_clock   ::clock
+# define __sys_time    ::time
+#else
+# ifdef __GNUG__
+#  include <time.h>
+#  define __sys_clock  ::clock
+#  define __sys_time   ::time
+# else
+typedef int clock_t;
+typedef int time_t;
+extern clock_t _clock();
+extern time_t _time(time_t *);
+#  define CLOCKS_PER_SEC 1000
+#  define __sys_clock  _clock
+#  define __sys_time   _time
+# endif
+#endif
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class clock_desc_sys_clock
+{
+public:
+       typedef float value_type;
+
+       inline static bool realtime()
+       { return false; }
+
+       inline static bool proctime()
+       { return true; }
+
+       inline static value_type
+       one_second()
+       { return 1.0f; }
+
+       inline static value_type precision()
+       { return one_second()/(value_type)CLOCKS_PER_SEC; }
+
+       inline static const char *description()
+       { return "ANSI C clock()"; };
+
+protected:
+       typedef clock_t timestamp;
+
+       static void
+       get_current_time(timestamp &time)
+       { time=__sys_clock(); }
+
+       static timestamp
+       get_current_time()
+       { return __sys_clock(); }
+
+       static value_type
+       timestamp_to_seconds(const timestamp &x)
+       { return precision()*x; }
+
+       static timestamp
+       seconds_to_timestamp(const value_type &x)
+       { return (timestamp)(x*(value_type)CLOCKS_PER_SEC+0.5); }
+
+};
+
+class clock_desc_sys_time
+{
+public:
+       typedef float value_type;
+
+       inline static bool realtime()
+       { return true; }
+
+       inline static bool proctime()
+       { return false; }
+
+       inline static value_type
+       one_second()
+       { return 1.0f; }
+
+       inline static value_type precision()
+       { return one_second(); }
+
+       inline static const char *description()
+       { return "ANSI C time()"; };
+
+protected:
+       typedef time_t timestamp;
+
+       static void
+       get_current_time(timestamp &time)
+       { __sys_time(&time); }
+
+       static timestamp
+       get_current_time()
+       { return __sys_time(NULL); }
+
+       static value_type
+       timestamp_to_seconds(const timestamp &x)
+       { return (value_type)x; }
+
+       static timestamp
+       seconds_to_timestamp(const value_type &x)
+       { return (timestamp)(x+(value_type)0.5f); }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_clock_win32hpcount.h b/ETL/tags/0.4.11/ETL/_clock_win32hpcount.h
new file mode 100644 (file)
index 0000000..561a9d4
--- /dev/null
@@ -0,0 +1,98 @@
+/*! ========================================================================
+** Extended Template and Library
+** Win32 Clock Description Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__CLOCK_WIN32HPCOUNT_H
+#define __ETL__CLOCK_WIN32HPCOUNT_H
+
+/* === H E A D E R S ======================================================= */
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+/* === M A C R O S ========================================================= */
+
+#if defined(__GNUG__) && defined(__int64)
+#undef __int64
+#define __int64 long long int
+#endif
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class clock_desc_win32hpcount
+{
+public:
+       typedef double value_type;
+
+       static bool realtime()
+       { return true; }
+
+       static bool proctime()
+       { return false; }
+
+       static value_type
+       one_second()
+       { return 1.0f; }
+
+       static value_type precision()
+       {
+               __int64 freq;
+               QueryPerformanceFrequency((LARGE_INTEGER*)&freq);
+               return one_second()/(value_type)freq;
+       }
+
+       static const char *description()
+       { return "Win32 QueryPerformanceCounter()"; };
+
+protected:
+       typedef __int64 timestamp;
+
+       static void
+       get_current_time(timestamp &x)
+       { QueryPerformanceCounter((LARGE_INTEGER*)&x);}
+
+       static timestamp
+       get_current_time()
+       { timestamp ret; QueryPerformanceCounter((LARGE_INTEGER*)&ret); return ret; }
+
+       static value_type
+       timestamp_to_seconds(const timestamp &x)
+       { return precision()*x; }
+
+       static timestamp
+       seconds_to_timestamp(const value_type &x)
+       { return (timestamp)(x/precision()); }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
+
diff --git a/ETL/tags/0.4.11/ETL/_condition.h b/ETL/tags/0.4.11/ETL/_condition.h
new file mode 100644 (file)
index 0000000..26a4d2d
--- /dev/null
@@ -0,0 +1,70 @@
+/*! ========================================================================
+** Extended Template and Library
+** Mutex Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__CONDITION_H_
+#define __ETL__CONDITION_H_
+
+/* === H E A D E R S ======================================================= */
+
+/* === M A C R O S ========================================================= */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class condition : private mutex
+{
+       bool flag;
+public:
+       condition()
+       { flag=false; }
+       ~condition()
+       { }
+       void operator()()
+       { flag=true; }
+       void wait()
+       {
+               mutex::lock lock(*this);
+
+               while(!flag)Yield();
+               flag=false;
+       }
+       void wait_next()
+       {
+               mutex::lock lock(*this);
+
+               flag=false;
+               while(!flag)Yield();
+       }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_curve.h b/ETL/tags/0.4.11/ETL/_curve.h
new file mode 100644 (file)
index 0000000..e5fd2f3
--- /dev/null
@@ -0,0 +1,80 @@
+/*! ========================================================================
+** Extended Template Library
+** Curve Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_CURVE_H
+#define __ETL_CURVE_H
+
+/* === H E A D E R S ======================================================= */
+
+#include "_hermite.h"
+#include <vector>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+/*
+#ifdef AUTO
+#undef AUTO
+#endif
+#ifdef LINEAR
+#undef LINEAR
+#endif
+#ifdef ABSOLUTE
+#undef ABSOLUTE
+#endif
+#ifdef FAST_TO_SLOW
+#undef FAST_TO_SLOW
+#endif
+
+template<typename T>
+class curve
+{
+public:
+       typedef T value_type;
+private:
+       enum interpolate_type
+       {
+               AUTO,
+               LINEAR,
+               ABSOLUTE,
+               FAST_TO_SLOW,
+
+       };
+public:
+};
+*/
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
+
diff --git a/ETL/tags/0.4.11/ETL/_curve_func.h b/ETL/tags/0.4.11/ETL/_curve_func.h
new file mode 100644 (file)
index 0000000..fc33402
--- /dev/null
@@ -0,0 +1,66 @@
+/*! ========================================================================
+** Extended Template and Library
+** Utility Curve Template Class Implementations
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__CURVE_FUNC_H
+#define __ETL__CURVE_FUNC_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <functional>
+
+/* -- C L A S S E S --------------------------------------------------------- */
+
+template <class T, class K=float>
+struct affine_combo
+{
+       T operator()(const T &a,const T &b,const K &t)const
+       {
+               return T( (b-a)*t+a );
+       }
+
+       T reverse(const T &x, const T &b, const K &t)const
+       {
+               return T( (x-t*b)*(static_cast<K>(1)/(static_cast<K>(1)-t)) );
+       }
+};
+
+template <class T, class K=float>
+struct distance_func : public std::binary_function<T, T, K>
+{
+       K operator()(const T &a,const T &b)const
+       {
+               T delta=b-a;
+               return static_cast<K>(delta*delta);
+       }
+
+       K cook(const K &x)const { return x*x; }
+       K uncook(const K &x)const { return sqrt(x); }
+
+};
+
+/* -- E N D ----------------------------------------------------------------- */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_fastangle.h b/ETL/tags/0.4.11/ETL/_fastangle.h
new file mode 100644 (file)
index 0000000..78ac67a
--- /dev/null
@@ -0,0 +1,461 @@
+/*! ========================================================================
+** Extended Template and Library
+** Fast fastangle Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_FASTANGLE_H
+#define __ETL_FASTANGLE_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <cmath>
+#include <ETL/fixed>
+
+#include "_fastangle_tables.h"
+
+/* === M A C R O S ========================================================= */
+
+#ifndef PI
+# define PI (3.1415926535897932384626433832795029L)
+#endif
+
+#define ETL_FASTANGLE_INIT()
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+/*! ========================================================================
+** \class      fastangle
+** \brief      Optimized abstraction of the concept of an angle
+**
+** A more detailed description needs to be written.
+*/
+class fastangle
+{
+public:
+       typedef double value_type;
+
+protected:
+       typedef fixed_base<ETL_FIXED_TYPE,ETL_FASTANGLE_LOOKUP_RES> unit;
+
+       unit v; //! Stored in rotations
+
+public:
+
+       /*
+       ** Arithmetic Operators
+       */
+
+       //! fastangle Addition Operator
+       fastangle
+       operator+(const fastangle &rhs)const
+       {
+               fastangle ret;
+               ret.v=v+rhs.v;
+               return ret;
+       }
+
+       //! fastangle Subtraction Operator
+       /*! \sa fastangle dist(const fastangle &) */
+       fastangle
+       operator-(const fastangle &rhs)const
+       {
+               fastangle ret;
+               ret.v=v-rhs.v;
+               return ret;
+       }
+
+       //! fastangle Scalar Multiplication Operator
+       /*! This operator will multiply the given
+               fastangle by the given scalar value. */
+       fastangle
+       operator*(const unit &rhs)const
+       {
+               fastangle ret;
+               ret.v=v*rhs;
+               return ret;
+       }
+
+       fastangle
+       operator/(const unit &rhs)const
+       {
+               fastangle ret;
+               ret.v=v/rhs;
+               return ret;
+       }
+
+       const fastangle &
+       operator+=(const fastangle &rhs)
+       {
+               v+=rhs.v;
+               return *this;
+       }
+
+       const fastangle &
+       operator-=(const fastangle &rhs)
+       {
+               v-=rhs.v;
+               return *this;
+       }
+
+       const fastangle &
+       operator*=(const unit &rhs)
+       {
+               v*=rhs;
+               return *this;
+       }
+
+       const fastangle &
+       operator/=(const unit &rhs)
+       {
+               v/=rhs;
+               return *this;
+       }
+
+       //! fastangle Negation
+       fastangle
+       operator-()const
+       {
+               fastangle ret;
+               ret.v=-v;
+               return ret;
+       }
+
+       //! 180 degree rotation operator
+       /*! Returns the fastangle directly opposite of
+               the given fastangle, and will yield a result
+               between 0 and 2PI */
+       fastangle
+       operator~()const
+       {
+               fastangle ret;
+               ret.v=(unit)std::floor(v+0.5f);
+               return ret;
+       }
+
+       /*! Returns true if the shortest
+               fastangle between the left-hand and
+               right-hand side is clockwise */
+       bool
+       operator<(const fastangle &rhs)const
+       { return v<rhs.v; }
+//     { return dist(rhs).v<(value_type)0.0; }
+
+       /*! Returns true if the shortest
+               fastangle between the left-hand and
+               right-hand side is counter-clockwise */
+       bool
+       operator>(const fastangle &rhs)const
+       { return v>rhs.v; }
+//     { return dist(rhs).v>(value_type)0.0; }
+
+       /*! Returns true if the shortest
+               fastangle between the left-hand and
+               right-hand side is clockwise,
+               or if the angles are refer to the same
+               point on the unit circle. */
+       bool
+       operator<=(const fastangle &rhs)const
+       { return v<=rhs.v; }
+//     { return dist(rhs).v<=(value_type)0.0; }
+
+       /*! Returns true if the shortest
+               fastangle between the left-hand and
+               right-hand side is counter-clockwise,
+               or if the angles are refer to the same
+               point on the unit circle. */
+       bool
+       operator>=(const fastangle &rhs)const
+       { return v>=rhs.v; }
+//     { return dist(rhs).v>=(value_type)0.0; }
+
+       /*! Returns true if the angles
+               are refer to the same point
+               on the unit circle. */
+       bool
+       operator==(const fastangle &rhs)const
+       { return v==rhs.v; }
+//     { return dist(rhs).v==(value_type)0.0; }
+
+       /*! Returns false if the angles
+               are refer to the same point
+               on the unit circle. */
+       bool
+       operator!=(const fastangle &rhs)const
+       { return v!=rhs.v; }
+//     { return dist(rhs).v!=(value_type)0.0; }
+
+       //! fastangle Difference Function
+       /*! This function will return the
+               shortest physical distance between
+               two angles, from -PI/2 to PI/2
+               \warning Not yet tested
+               \sa fastangle operator-(const fastangle &) */
+       fastangle
+       dist(const fastangle &rhs)const
+       {
+               fastangle ret;
+               ret.v=v-rhs.v;
+               ret.v-=(unit)std::floor(ret.v+0.5f);
+               return ret;
+       }
+
+       //! Rotation Modulus
+       /*! This function will return the
+               value of the fastangle between 0 and 2PI */
+       fastangle
+       mod()const
+       {
+               fastangle ret(*this);
+               ret.v-=(unit)std::floor(ret.v);
+               return ret;
+       }
+
+       static fastangle
+       zero()
+       {
+               fastangle ret;
+               ret.v=0;
+               return ret;
+       }
+
+       bool operator!()const { return v==unit(0); }
+
+       /*
+       ** Conversion Classes
+       */
+
+       class radians;
+       class degrees;
+       class rotations;
+
+       /*
+       ** Trigonometric Classes
+       */
+
+       class sin;
+       class cos;
+       class tan;
+
+       /*
+       ** Friend classes
+       */
+
+       friend class radians;
+       friend class degrees;
+       friend class rotations;
+       friend class sin;
+       friend class cos;
+       friend class tan;
+
+       /*
+       ** Bleh...
+       */
+
+       typedef radians         rad;
+       typedef degrees         deg;
+       typedef rotations       rot;
+
+}; // END of class fastangle
+
+/*! ========================================================================
+** \class      fastangle::radians
+** \brief      fastangle representation in radians
+**
+** A more detailed description needs to be written.
+*/
+class fastangle::radians : public fastangle
+{
+public:
+       radians(const value_type &x) { v=x/((value_type)PI*2.0f); }
+       radians(const fastangle &a):fastangle(a) { }
+       radians mod()const { return fastangle::mod(); }
+       radians dist(const fastangle &rhs)const { return fastangle::dist(rhs); }
+       operator value_type()const { return get(); }
+       value_type get()const { return (value_type)v*(value_type)PI*2.0f; }
+}; // END of class fastangle::radians
+
+/*! ========================================================================
+** \class      fastangle::degrees
+** \brief      fastangle representation in degrees
+**
+** A more detailed description needs to be written.
+*/
+class fastangle::degrees : public fastangle
+{
+public:
+       degrees(const value_type &x) { v=x/360; }
+       degrees(const fastangle &a):fastangle(a) { }
+       degrees mod()const { return fastangle::mod(); }
+       degrees dist(const fastangle &rhs)const { return fastangle::dist(rhs); }
+       operator value_type()const { return get(); }
+       value_type get()const { return v*360/*(value_type)(v-::floor(v))*360*/; }
+}; // END of class fastangle::degrees
+
+/*! ========================================================================
+** \class      fastangle::rotations
+** \brief      fastangle representation in rotations
+**
+** A more detailed description needs to be written.
+*/
+class fastangle::rotations : public fastangle
+{
+public:
+       rotations(const value_type &x) { v=x; }
+       rotations(const fastangle &a):fastangle(a) { }
+       rotations mod()const { return fastangle::mod(); }
+       rotations dist(const fastangle &rhs)const { return fastangle::dist(rhs); }
+       operator value_type()const { return get(); }
+       value_type get()const { return v; }
+}; // END of class fastangle::rotations
+
+/*! ========================================================================
+** \class      fastangle::sin
+** \brief      fastangle representation as a sine function
+**
+** A more detailed description needs to be written.
+*/
+class fastangle::sin : public fastangle
+{
+public:
+       sin(const value_type &x)        { v.data()=_fastangle_asin_table[(int)((x+1)*(value_type)(1<<(ETL_FASTANGLE_LOOKUP_RES-1)))]; }
+       sin(const fastangle &a):fastangle(a) { }
+       sin     mod()const { return fastangle::mod(); }
+       sin dist(const fastangle &rhs)const { return fastangle::dist(rhs); }
+       operator value_type()const { return get(); }
+       value_type get()const { return (value_type)_fastangle_sin_table[v.data()&( (1<<ETL_FASTANGLE_LOOKUP_RES)-1)]; }
+}; // END of class fastangle::sin
+
+/*! ========================================================================
+** \class      fastangle::cos
+** \brief      fastangle representation as a cosine function
+**
+** A more detailed description needs to be written.
+*/
+class fastangle::cos : public fastangle
+{
+public:
+       cos(const value_type &x)        { v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_asin_table[(int)((x+1)*(value_type)(1<<(ETL_FASTANGLE_LOOKUP_RES-1)))]; }
+       cos(const fastangle &a):fastangle(a) { }
+       cos     mod()const { return fastangle::mod(); }
+       cos dist(const fastangle &rhs)const { return fastangle::dist(rhs); }
+       operator value_type()const { return get(); }
+       value_type get()const { return (value_type)_fastangle_sin_table[(v.data()+(1<<(ETL_FASTANGLE_LOOKUP_RES-2)))&( (1<<ETL_FASTANGLE_LOOKUP_RES)-1)]; }
+}; // END of class fastangle::cos
+
+/*! ========================================================================
+** \class      fastangle::tan
+** \brief      fastangle representation as a tangent function
+**
+** A more detailed description needs to be written.
+*/
+class fastangle::tan : public fastangle
+{
+public:
+       tan(const value_type &x)
+       {
+               if(x>1)
+                       v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((1.0/x)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))];
+               else if(x<-1)
+                       v.data()=-(1<<(ETL_FASTANGLE_LOOKUP_RES-1)) + (1<<(ETL_FASTANGLE_LOOKUP_RES-2)) - _fastangle_atan_table[(int)(((1.0/x)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))];
+               else
+                       v.data()=_fastangle_atan_table[(int)((x+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))];
+       }
+
+       tan(const value_type &y,const value_type &x)
+       {
+               if(x>=0 && y>=0) // First quadrant
+               {
+                       if(y>x)
+                               v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))];
+                       else
+                               v.data()=_fastangle_atan_table[(int)(((y/x)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))];
+               }
+               else if(x>=0 && y<0) // Fourth quadrant
+               {
+                       if(-y>x)
+                               v.data()=-(1<<(ETL_FASTANGLE_LOOKUP_RES-1)) + (1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))];
+                       else
+                               v.data()=_fastangle_atan_table[(int)(((y/x)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))];
+               }
+               else if(x<0 && y>=0) // Second quadrant
+               {
+                       if(y>-x)
+                               v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))];
+                       else
+                               v.data()=_fastangle_atan_table[(int)(((y/x)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]+(1<<(ETL_FASTANGLE_LOOKUP_RES-1));
+               }
+               else if(x<0 && y<0) // Third Quadrant
+               {
+                       if(-y>-x)
+                               v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))] - (1<<(ETL_FASTANGLE_LOOKUP_RES-1));
+                       else
+                               v.data()=_fastangle_atan_table[(int)(((y/x)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]-(1<<(ETL_FASTANGLE_LOOKUP_RES-1));
+               }
+               else v.data()=0;
+       }
+       tan(const fastangle &a):fastangle(a) { }
+       tan     mod()const { return fastangle::mod(); }
+       tan dist(const fastangle &rhs)const { return fastangle::dist(rhs); }
+       operator value_type()const { return get(); }
+       value_type get()const { return (value_type)_fastangle_tan_table[v.data()&( (1<<ETL_FASTANGLE_LOOKUP_RES)-1)]; }
+}; // END of class fastangle::tan
+
+_ETL_END_NAMESPACE
+
+template <>
+struct affine_combo<etl::fastangle,float>
+{
+       etl::fastangle operator()(const etl::fastangle &a,const etl::fastangle &b,const float &t)const
+       {
+               return b.dist(a)*t+a;
+       }
+
+       etl::fastangle reverse(const etl::fastangle &x, const etl::fastangle &b, const float &t)const
+       {
+               return x.dist(b*t)*((float)1/((float)1-t));
+       }
+};
+
+template <>
+struct distance_func<etl::fastangle> : public std::binary_function<etl::fastangle, etl::fastangle, etl::fastangle>
+{
+       etl::fastangle operator()(const etl::fastangle &a,const etl::fastangle &b)const
+       {
+               etl::fastangle delta=b.dist(a);
+               if(delta<etl::fastangle::zero())
+                       return -delta;
+               return delta;
+       }
+
+       etl::fastangle cook(const etl::fastangle &x) { return x; }
+       etl::fastangle uncook(const etl::fastangle &x) { return x; }
+};
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_fastangle_tables.h b/ETL/tags/0.4.11/ETL/_fastangle_tables.h
new file mode 100644 (file)
index 0000000..4372b40
--- /dev/null
@@ -0,0 +1,4952 @@
+// Generated by etl_angletablegen on Aug 16 2002 at 17:01:22.
+// The contents of these tables, and their current arrangement,
+// may be considered public domain. You may use them in any way you see fit,
+// no strings attached.
+
+// Table resolution set to 13 bits.
+
+#ifndef __ETL_FASTANGLE_TABLES__
+#define __ETL_FASTANGLE_TABLES__
+
+static const double _fastangle_sin_table_13[8192] =
+{
+       0.000000000, 0.000766990, 0.001533980, 0.002300969, 0.003067957,
+       0.003834943, 0.004601926, 0.005368907, 0.006135885, 0.006902859,
+       0.007669829, 0.008436794, 0.009203755, 0.009970710, 0.010737659,
+       0.011504602, 0.012271538, 0.013038467, 0.013805389, 0.014572302,
+       0.015339206, 0.016106102, 0.016872988, 0.017639864, 0.018406730,
+       0.019173585, 0.019940429, 0.020707261, 0.021474080, 0.022240887,
+       0.023007681, 0.023774462, 0.024541229, 0.025307981, 0.026074718,
+       0.026841440, 0.027608146, 0.028374836, 0.029141509, 0.029908165,
+       0.030674803, 0.031441424, 0.032208025, 0.032974608, 0.033741172,
+       0.034507716, 0.035274239, 0.036040742, 0.036807223, 0.037573683,
+       0.038340120, 0.039106535, 0.039872928, 0.040639296, 0.041405641,
+       0.042171961, 0.042938257, 0.043704527, 0.044470772, 0.045236990,
+       0.046003182, 0.046769347, 0.047535484, 0.048301593, 0.049067674,
+       0.049833726, 0.050599749, 0.051365742, 0.052131705, 0.052897637,
+       0.053663538, 0.054429407, 0.055195244, 0.055961049, 0.056726821,
+       0.057492560, 0.058258265, 0.059023935, 0.059789571, 0.060555171,
+       0.061320736, 0.062086265, 0.062851758, 0.063617213, 0.064382631,
+       0.065148011, 0.065913353, 0.066678656, 0.067443920, 0.068209144,
+       0.068974328, 0.069739471, 0.070504573, 0.071269634, 0.072034653,
+       0.072799630, 0.073564564, 0.074329454, 0.075094301, 0.075859103,
+       0.076623861, 0.077388574, 0.078153242, 0.078917863, 0.079682438,
+       0.080446966, 0.081211447, 0.081975880, 0.082740265, 0.083504601,
+       0.084268888, 0.085033125, 0.085797312, 0.086561449, 0.087325535,
+       0.088089570, 0.088853553, 0.089617483, 0.090381361, 0.091145185,
+       0.091908956, 0.092672673, 0.093436336, 0.094199943, 0.094963495,
+       0.095726991, 0.096490431, 0.097253814, 0.098017140, 0.098780409,
+       0.099543619, 0.100306770, 0.101069863, 0.101832896, 0.102595869,
+       0.103358782, 0.104121634, 0.104884425, 0.105647154, 0.106409821,
+       0.107172425, 0.107934966, 0.108697444, 0.109459858, 0.110222207,
+       0.110984492, 0.111746711, 0.112508865, 0.113270952, 0.114032973,
+       0.114794927, 0.115556813, 0.116318631, 0.117080381, 0.117842062,
+       0.118603673, 0.119365215, 0.120126686, 0.120888087, 0.121649417,
+       0.122410675, 0.123171861, 0.123932975, 0.124694016, 0.125454983,
+       0.126215877, 0.126976696, 0.127737441, 0.128498111, 0.129258705,
+       0.130019223, 0.130779664, 0.131540029, 0.132300316, 0.133060525,
+       0.133820656, 0.134580709, 0.135340682, 0.136100575, 0.136860389,
+       0.137620122, 0.138379774, 0.139139344, 0.139898833, 0.140658239,
+       0.141417563, 0.142176804, 0.142935960, 0.143695033, 0.144454021,
+       0.145212925, 0.145971742, 0.146730474, 0.147489120, 0.148247679,
+       0.149006151, 0.149764535, 0.150522831, 0.151281038, 0.152039156,
+       0.152797185, 0.153555124, 0.154312973, 0.155070731, 0.155828398,
+       0.156585973, 0.157343456, 0.158100846, 0.158858143, 0.159615347,
+       0.160372457, 0.161129473, 0.161886394, 0.162643219, 0.163399949,
+       0.164156583, 0.164913120, 0.165669561, 0.166425904, 0.167182148,
+       0.167938295, 0.168694343, 0.169450291, 0.170206140, 0.170961889,
+       0.171717537, 0.172473084, 0.173228530, 0.173983873, 0.174739115,
+       0.175494253, 0.176249289, 0.177004220, 0.177759048, 0.178513771,
+       0.179268389, 0.180022901, 0.180777308, 0.181531608, 0.182285802,
+       0.183039888, 0.183793867, 0.184547737, 0.185301499, 0.186055152,
+       0.186808695, 0.187562129, 0.188315452, 0.189068664, 0.189821765,
+       0.190574755, 0.191327632, 0.192080397, 0.192833049, 0.193585587,
+       0.194338012, 0.195090322, 0.195842517, 0.196594598, 0.197346562,
+       0.198098411, 0.198850143, 0.199601758, 0.200353255, 0.201104635,
+       0.201855896, 0.202607039, 0.203358062, 0.204108966, 0.204859750,
+       0.205610413, 0.206360955, 0.207111376, 0.207861675, 0.208611852,
+       0.209361906, 0.210111837, 0.210861644, 0.211611327, 0.212360886,
+       0.213110320, 0.213859628, 0.214608811, 0.215357867, 0.216106797,
+       0.216855600, 0.217604275, 0.218352822, 0.219101240, 0.219849530,
+       0.220597690, 0.221345721, 0.222093621, 0.222841391, 0.223589029,
+       0.224336536, 0.225083911, 0.225831154, 0.226578264, 0.227325240,
+       0.228072083, 0.228818792, 0.229565366, 0.230311805, 0.231058108,
+       0.231804276, 0.232550307, 0.233296201, 0.234041959, 0.234787578,
+       0.235533059, 0.236278402, 0.237023606, 0.237768670, 0.238513595,
+       0.239258379, 0.240003022, 0.240747525, 0.241491885, 0.242236104,
+       0.242980180, 0.243724113, 0.244467903, 0.245211549, 0.245955050,
+       0.246698407, 0.247441619, 0.248184685, 0.248927606, 0.249670380,
+       0.250413007, 0.251155486, 0.251897818, 0.252640002, 0.253382037,
+       0.254123923, 0.254865660, 0.255607246, 0.256348682, 0.257089968,
+       0.257831102, 0.258572085, 0.259312915, 0.260053593, 0.260794118,
+       0.261534489, 0.262274707, 0.263014770, 0.263754679, 0.264494432,
+       0.265234030, 0.265973472, 0.266712757, 0.267451886, 0.268190857,
+       0.268929670, 0.269668326, 0.270406822, 0.271145160, 0.271883337,
+       0.272621355, 0.273359213, 0.274096910, 0.274834445, 0.275571819,
+       0.276309031, 0.277046080, 0.277782967, 0.278519689, 0.279256248,
+       0.279992643, 0.280728873, 0.281464938, 0.282200837, 0.282936570,
+       0.283672137, 0.284407537, 0.285142770, 0.285877835, 0.286612731,
+       0.287347460, 0.288082019, 0.288816408, 0.289550628, 0.290284677,
+       0.291018556, 0.291752263, 0.292485799, 0.293219163, 0.293952354,
+       0.294685372, 0.295418217, 0.296150888, 0.296883385, 0.297615707,
+       0.298347855, 0.299079826, 0.299811622, 0.300543241, 0.301274684,
+       0.302005949, 0.302737037, 0.303467947, 0.304198678, 0.304929230,
+       0.305659602, 0.306389795, 0.307119808, 0.307849640, 0.308579291,
+       0.309308760, 0.310038048, 0.310767153, 0.311496075, 0.312224814,
+       0.312953369, 0.313681740, 0.314409927, 0.315137929, 0.315865745,
+       0.316593376, 0.317320820, 0.318048077, 0.318775148, 0.319502031,
+       0.320228726, 0.320955232, 0.321681550, 0.322407679, 0.323133618,
+       0.323859367, 0.324584925, 0.325310292, 0.326035468, 0.326760452,
+       0.327485244, 0.328209844, 0.328934250, 0.329658463, 0.330382481,
+       0.331106306, 0.331829935, 0.332553370, 0.333276609, 0.333999651,
+       0.334722498, 0.335445147, 0.336167599, 0.336889853, 0.337611909,
+       0.338333767, 0.339055425, 0.339776884, 0.340498144, 0.341219202,
+       0.341940060, 0.342660717, 0.343381173, 0.344101426, 0.344821477,
+       0.345541325, 0.346260970, 0.346980411, 0.347699648, 0.348418680,
+       0.349137508, 0.349856130, 0.350574546, 0.351292756, 0.352010759,
+       0.352728556, 0.353446145, 0.354163525, 0.354880698, 0.355597662,
+       0.356314416, 0.357030961, 0.357747296, 0.358463421, 0.359179334,
+       0.359895037, 0.360610527, 0.361325806, 0.362040871, 0.362755724,
+       0.363470364, 0.364184790, 0.364899001, 0.365612998, 0.366326780,
+       0.367040346, 0.367753696, 0.368466830, 0.369179747, 0.369892447,
+       0.370604930, 0.371317194, 0.372029240, 0.372741067, 0.373452675,
+       0.374164063, 0.374875231, 0.375586178, 0.376296905, 0.377007410,
+       0.377717694, 0.378427755, 0.379137593, 0.379847209, 0.380556601,
+       0.381265769, 0.381974713, 0.382683432, 0.383391926, 0.384100195,
+       0.384808238, 0.385516054, 0.386223643, 0.386931006, 0.387638140,
+       0.388345047, 0.389051725, 0.389758174, 0.390464394, 0.391170384,
+       0.391876144, 0.392581674, 0.393286973, 0.393992040, 0.394696876,
+       0.395401479, 0.396105850, 0.396809987, 0.397513892, 0.398217562,
+       0.398920998, 0.399624200, 0.400327166, 0.401029897, 0.401732392,
+       0.402434651, 0.403136673, 0.403838458, 0.404540005, 0.405241314,
+       0.405942385, 0.406643217, 0.407343810, 0.408044163, 0.408744276,
+       0.409444149, 0.410143781, 0.410843171, 0.411542320, 0.412241227,
+       0.412939891, 0.413638312, 0.414336490, 0.415034424, 0.415732115,
+       0.416429560, 0.417126761, 0.417823716, 0.418520425, 0.419216888,
+       0.419913105, 0.420609074, 0.421304797, 0.422000271, 0.422695497,
+       0.423390474, 0.424085202, 0.424779681, 0.425473910, 0.426167889,
+       0.426861617, 0.427555093, 0.428248319, 0.428941292, 0.429634013,
+       0.430326481, 0.431018696, 0.431710658, 0.432402366, 0.433093819,
+       0.433785017, 0.434475961, 0.435166648, 0.435857080, 0.436547255,
+       0.437237174, 0.437926835, 0.438616239, 0.439305384, 0.439994271,
+       0.440682900, 0.441371269, 0.442059378, 0.442747228, 0.443434816,
+       0.444122145, 0.444809211, 0.445496017, 0.446182560, 0.446868840,
+       0.447554858, 0.448240612, 0.448926103, 0.449611330, 0.450296292,
+       0.450980989, 0.451665421, 0.452349587, 0.453033487, 0.453717121,
+       0.454400488, 0.455083587, 0.455766419, 0.456448982, 0.457131277,
+       0.457813304, 0.458495060, 0.459176548, 0.459857765, 0.460538711,
+       0.461219386, 0.461899791, 0.462579923, 0.463259784, 0.463939371,
+       0.464618686, 0.465297728, 0.465976496, 0.466654990, 0.467333209,
+       0.468011153, 0.468688822, 0.469366215, 0.470043332, 0.470720173,
+       0.471396737, 0.472073023, 0.472749032, 0.473424763, 0.474100215,
+       0.474775388, 0.475450282, 0.476124896, 0.476799230, 0.477473284,
+       0.478147056, 0.478820548, 0.479493758, 0.480166685, 0.480839331,
+       0.481511693, 0.482183772, 0.482855568, 0.483527079, 0.484198306,
+       0.484869248, 0.485539905, 0.486210276, 0.486880361, 0.487550160,
+       0.488219672, 0.488888897, 0.489557834, 0.490226483, 0.490894844,
+       0.491562916, 0.492230699, 0.492898192, 0.493565396, 0.494232309,
+       0.494898931, 0.495565262, 0.496231301, 0.496897049, 0.497562504,
+       0.498227667, 0.498892537, 0.499557113, 0.500221395, 0.500885383,
+       0.501549076, 0.502212474, 0.502875577, 0.503538384, 0.504200894,
+       0.504863109, 0.505525026, 0.506186645, 0.506847967, 0.507508991,
+       0.508169716, 0.508830143, 0.509490269, 0.510150097, 0.510809624,
+       0.511468850, 0.512127776, 0.512786401, 0.513444723, 0.514102744,
+       0.514760463, 0.515417878, 0.516074990, 0.516731799, 0.517388304,
+       0.518044504, 0.518700400, 0.519355990, 0.520011275, 0.520666254,
+       0.521320927, 0.521975293, 0.522629352, 0.523283103, 0.523936547,
+       0.524589683, 0.525242510, 0.525895027, 0.526547236, 0.527199135,
+       0.527850723, 0.528502002, 0.529152969, 0.529803625, 0.530453969,
+       0.531104001, 0.531753721, 0.532403128, 0.533052222, 0.533701002,
+       0.534349468, 0.534997620, 0.535645457, 0.536292979, 0.536940186,
+       0.537587076, 0.538233651, 0.538879909, 0.539525849, 0.540171473,
+       0.540816778, 0.541461766, 0.542106435, 0.542750785, 0.543394816,
+       0.544038527, 0.544681918, 0.545324988, 0.545967738, 0.546610167,
+       0.547252274, 0.547894059, 0.548535522, 0.549176662, 0.549817479,
+       0.550457973, 0.551098143, 0.551737988, 0.552377509, 0.553016706,
+       0.553655576, 0.554294121, 0.554932340, 0.555570233, 0.556207799,
+       0.556845037, 0.557481948, 0.558118531, 0.558754786, 0.559390712,
+       0.560026309, 0.560661576, 0.561296514, 0.561931121, 0.562565398,
+       0.563199344, 0.563832959, 0.564466242, 0.565099192, 0.565731811,
+       0.566364096, 0.566996049, 0.567627668, 0.568258953, 0.568889903,
+       0.569520519, 0.570150800, 0.570780746, 0.571410356, 0.572039629,
+       0.572668566, 0.573297167, 0.573925430, 0.574553355, 0.575180942,
+       0.575808191, 0.576435102, 0.577061673, 0.577687905, 0.578313796,
+       0.578939348, 0.579564559, 0.580189429, 0.580813958, 0.581438145,
+       0.582061990, 0.582685493, 0.583308653, 0.583931470, 0.584553943,
+       0.585176072, 0.585797857, 0.586419298, 0.587040394, 0.587661144,
+       0.588281548, 0.588901607, 0.589521319, 0.590140684, 0.590759702,
+       0.591378372, 0.591996695, 0.592614669, 0.593232295, 0.593849572,
+       0.594466499, 0.595083077, 0.595699304, 0.596315182, 0.596930708,
+       0.597545883, 0.598160707, 0.598775179, 0.599389298, 0.600003065,
+       0.600616479, 0.601229540, 0.601842247, 0.602454600, 0.603066599,
+       0.603678242, 0.604289531, 0.604900464, 0.605511041, 0.606121263,
+       0.606731127, 0.607340635, 0.607949785, 0.608558578, 0.609167012,
+       0.609775089, 0.610382806, 0.610990165, 0.611597164, 0.612203803,
+       0.612810082, 0.613416001, 0.614021559, 0.614626756, 0.615231591,
+       0.615836064, 0.616440175, 0.617043923, 0.617647308, 0.618250330,
+       0.618852988, 0.619455282, 0.620057212, 0.620658777, 0.621259977,
+       0.621860811, 0.622461279, 0.623061382, 0.623661118, 0.624260486,
+       0.624859488, 0.625458122, 0.626056388, 0.626654286, 0.627251815,
+       0.627848976, 0.628445767, 0.629042188, 0.629638239, 0.630233920,
+       0.630829230, 0.631424169, 0.632018736, 0.632612932, 0.633206755,
+       0.633800206, 0.634393284, 0.634985989, 0.635578320, 0.636170278,
+       0.636761861, 0.637353070, 0.637943904, 0.638534362, 0.639124445,
+       0.639714152, 0.640303482, 0.640892436, 0.641481013, 0.642069212,
+       0.642657034, 0.643244478, 0.643831543, 0.644418229, 0.645004537,
+       0.645590465, 0.646176013, 0.646761181, 0.647345969, 0.647930375,
+       0.648514401, 0.649098045, 0.649681307, 0.650264187, 0.650846685,
+       0.651428800, 0.652010531, 0.652591879, 0.653172843, 0.653753423,
+       0.654333618, 0.654913428, 0.655492853, 0.656071892, 0.656650546,
+       0.657228813, 0.657806693, 0.658384187, 0.658961293, 0.659538012,
+       0.660114342, 0.660690284, 0.661265838, 0.661841002, 0.662415778,
+       0.662990163, 0.663564159, 0.664137764, 0.664710978, 0.665283802,
+       0.665856234, 0.666428274, 0.666999922, 0.667571178, 0.668142041,
+       0.668712512, 0.669282588, 0.669852271, 0.670421560, 0.670990455,
+       0.671558955, 0.672127060, 0.672694769, 0.673262083, 0.673829000,
+       0.674395522, 0.674961646, 0.675527374, 0.676092704, 0.676657636,
+       0.677222170, 0.677786306, 0.678350043, 0.678913381, 0.679476320,
+       0.680038859, 0.680600998, 0.681162736, 0.681724074, 0.682285011,
+       0.682845546, 0.683405680, 0.683965412, 0.684524741, 0.685083668,
+       0.685642191, 0.686200312, 0.686758028, 0.687315341, 0.687872249,
+       0.688428753, 0.688984851, 0.689540545, 0.690095832, 0.690650714,
+       0.691205190, 0.691759258, 0.692312920, 0.692866175, 0.693419022,
+       0.693971461, 0.694523492, 0.695075114, 0.695626327, 0.696177131,
+       0.696727526, 0.697277511, 0.697827085, 0.698376249, 0.698925003,
+       0.699473345, 0.700021275, 0.700568794, 0.701115901, 0.701662595,
+       0.702208876, 0.702754744, 0.703300199, 0.703845241, 0.704389868,
+       0.704934080, 0.705477878, 0.706021261, 0.706564229, 0.707106781,
+       0.707648917, 0.708190637, 0.708731940, 0.709272826, 0.709813295,
+       0.710353347, 0.710892980, 0.711432196, 0.711970993, 0.712509371,
+       0.713047329, 0.713584869, 0.714121988, 0.714658688, 0.715194967,
+       0.715730825, 0.716266263, 0.716801279, 0.717335873, 0.717870045,
+       0.718403795, 0.718937122, 0.719470027, 0.720002508, 0.720534566,
+       0.721066199, 0.721597409, 0.722128194, 0.722658554, 0.723188489,
+       0.723717999, 0.724247083, 0.724775741, 0.725303972, 0.725831777,
+       0.726359155, 0.726886106, 0.727412629, 0.727938724, 0.728464390,
+       0.728989629, 0.729514438, 0.730038818, 0.730562769, 0.731086290,
+       0.731609381, 0.732132042, 0.732654272, 0.733176071, 0.733697438,
+       0.734218374, 0.734738878, 0.735258950, 0.735778589, 0.736297796,
+       0.736816569, 0.737334909, 0.737852815, 0.738370287, 0.738887324,
+       0.739403927, 0.739920095, 0.740435828, 0.740951125, 0.741465987,
+       0.741980412, 0.742494400, 0.743007952, 0.743521067, 0.744033744,
+       0.744545984, 0.745057785, 0.745569149, 0.746080074, 0.746590559,
+       0.747100606, 0.747610213, 0.748119380, 0.748628108, 0.749136395,
+       0.749644241, 0.750151646, 0.750658610, 0.751165132, 0.751671212,
+       0.752176850, 0.752682046, 0.753186799, 0.753691109, 0.754194975,
+       0.754698398, 0.755201377, 0.755703911, 0.756206001, 0.756707647,
+       0.757208847, 0.757709601, 0.758209910, 0.758709773, 0.759209189,
+       0.759708159, 0.760206682, 0.760704757, 0.761202385, 0.761699566,
+       0.762196298, 0.762692582, 0.763188417, 0.763683804, 0.764178741,
+       0.764673228, 0.765167266, 0.765660853, 0.766153990, 0.766646677,
+       0.767138912, 0.767630696, 0.768122029, 0.768612909, 0.769103338,
+       0.769593314, 0.770082837, 0.770571907, 0.771060524, 0.771548688,
+       0.772036397, 0.772523652, 0.773010453, 0.773496799, 0.773982691,
+       0.774468126, 0.774953107, 0.775437631, 0.775921699, 0.776405311,
+       0.776888466, 0.777371164, 0.777853404, 0.778335187, 0.778816512,
+       0.779297379, 0.779777788, 0.780257738, 0.780737229, 0.781216260,
+       0.781694832, 0.782172944, 0.782650596, 0.783127788, 0.783604519,
+       0.784080789, 0.784556597, 0.785031944, 0.785506830, 0.785981253,
+       0.786455214, 0.786928712, 0.787401747, 0.787874319, 0.788346428,
+       0.788818072, 0.789289253, 0.789759970, 0.790230221, 0.790700008,
+       0.791169330, 0.791638187, 0.792106577, 0.792574502, 0.793041960,
+       0.793508952, 0.793975478, 0.794441536, 0.794907126, 0.795372249,
+       0.795836905, 0.796301092, 0.796764810, 0.797228060, 0.797690841,
+       0.798153153, 0.798614995, 0.799076367, 0.799537269, 0.799997701,
+       0.800457662, 0.800917153, 0.801376172, 0.801834719, 0.802292796,
+       0.802750400, 0.803207531, 0.803664191, 0.804120377, 0.804576091,
+       0.805031331, 0.805486098, 0.805940391, 0.806394209, 0.806847554,
+       0.807300423, 0.807752818, 0.808204737, 0.808656182, 0.809107150,
+       0.809557642, 0.810007659, 0.810457198, 0.810906261, 0.811354847,
+       0.811802956, 0.812250587, 0.812697740, 0.813144415, 0.813590612,
+       0.814036330, 0.814481569, 0.814926329, 0.815370610, 0.815814411,
+       0.816257732, 0.816700573, 0.817142933, 0.817584813, 0.818026212,
+       0.818467130, 0.818907566, 0.819347520, 0.819786992, 0.820225983,
+       0.820664490, 0.821102515, 0.821540057, 0.821977115, 0.822413690,
+       0.822849781, 0.823285388, 0.823720511, 0.824155149, 0.824589303,
+       0.825022971, 0.825456154, 0.825888851, 0.826321063, 0.826752788,
+       0.827184027, 0.827614780, 0.828045045, 0.828474824, 0.828904115,
+       0.829332918, 0.829761234, 0.830189061, 0.830616400, 0.831043251,
+       0.831469612, 0.831895485, 0.832320868, 0.832745761, 0.833170165,
+       0.833594078, 0.834017501, 0.834440433, 0.834862875, 0.835284825,
+       0.835706284, 0.836127252, 0.836547727, 0.836967711, 0.837387202,
+       0.837806200, 0.838224706, 0.838642718, 0.839060237, 0.839477263,
+       0.839893794, 0.840309832, 0.840725375, 0.841140424, 0.841554977,
+       0.841969036, 0.842382600, 0.842795668, 0.843208240, 0.843620316,
+       0.844031895, 0.844442979, 0.844853565, 0.845263655, 0.845673247,
+       0.846082342, 0.846490939, 0.846899038, 0.847306639, 0.847713741,
+       0.848120345, 0.848526450, 0.848932055, 0.849337161, 0.849741768,
+       0.850145875, 0.850549481, 0.850952587, 0.851355193, 0.851757298,
+       0.852158902, 0.852560004, 0.852960605, 0.853360704, 0.853760301,
+       0.854159396, 0.854557988, 0.854956078, 0.855353665, 0.855750748,
+       0.856147328, 0.856543405, 0.856938977, 0.857334046, 0.857728610,
+       0.858122670, 0.858516224, 0.858909274, 0.859301818, 0.859693857,
+       0.860085390, 0.860476418, 0.860866939, 0.861256953, 0.861646461,
+       0.862035462, 0.862423956, 0.862811943, 0.863199422, 0.863586393,
+       0.863972856, 0.864358811, 0.864744258, 0.865129195, 0.865513624,
+       0.865897544, 0.866280954, 0.866663855, 0.867046246, 0.867428126,
+       0.867809497, 0.868190357, 0.868570706, 0.868950544, 0.869329871,
+       0.869708687, 0.870086991, 0.870464783, 0.870842063, 0.871218831,
+       0.871595087, 0.871970829, 0.872346059, 0.872720775, 0.873094978,
+       0.873468668, 0.873841843, 0.874214505, 0.874586652, 0.874958285,
+       0.875329403, 0.875700006, 0.876070094, 0.876439667, 0.876808724,
+       0.877177265, 0.877545290, 0.877912799, 0.878279792, 0.878646267,
+       0.879012226, 0.879377668, 0.879742593, 0.880107000, 0.880470889,
+       0.880834260, 0.881197113, 0.881559448, 0.881921264, 0.882282562,
+       0.882643340, 0.883003599, 0.883363339, 0.883722559, 0.884081259,
+       0.884439439, 0.884797098, 0.885154238, 0.885510856, 0.885866954,
+       0.886222530, 0.886577585, 0.886932119, 0.887286131, 0.887639620,
+       0.887992588, 0.888345033, 0.888696956, 0.889048356, 0.889399233,
+       0.889749586, 0.890099417, 0.890448723, 0.890797506, 0.891145765,
+       0.891493499, 0.891840709, 0.892187395, 0.892533555, 0.892879191,
+       0.893224301, 0.893568886, 0.893912945, 0.894256478, 0.894599486,
+       0.894941967, 0.895283921, 0.895625349, 0.895966250, 0.896306624,
+       0.896646470, 0.896985789, 0.897324581, 0.897662844, 0.898000580,
+       0.898337787, 0.898674466, 0.899010616, 0.899346237, 0.899681329,
+       0.900015892, 0.900349925, 0.900683429, 0.901016403, 0.901348847,
+       0.901680761, 0.902012144, 0.902342996, 0.902673318, 0.903003109,
+       0.903332368, 0.903661097, 0.903989293, 0.904316958, 0.904644091,
+       0.904970691, 0.905296759, 0.905622295, 0.905947298, 0.906271768,
+       0.906595705, 0.906919108, 0.907241978, 0.907564314, 0.907886116,
+       0.908207385, 0.908528119, 0.908848318, 0.909167983, 0.909487113,
+       0.909805708, 0.910123768, 0.910441292, 0.910758281, 0.911074734,
+       0.911390651, 0.911706032, 0.912020877, 0.912335185, 0.912648956,
+       0.912962190, 0.913274888, 0.913587048, 0.913898671, 0.914209756,
+       0.914520303, 0.914830312, 0.915139783, 0.915448716, 0.915757110,
+       0.916064966, 0.916372282, 0.916679060, 0.916985298, 0.917290997,
+       0.917596156, 0.917900776, 0.918204855, 0.918508394, 0.918811393,
+       0.919113852, 0.919415769, 0.919717146, 0.920017982, 0.920318277,
+       0.920618030, 0.920917242, 0.921215911, 0.921514039, 0.921811625,
+       0.922108669, 0.922405170, 0.922701128, 0.922996544, 0.923291417,
+       0.923585746, 0.923879533, 0.924172775, 0.924465474, 0.924757630,
+       0.925049241, 0.925340308, 0.925630831, 0.925920809, 0.926210242,
+       0.926499131, 0.926787474, 0.927075273, 0.927362526, 0.927649233,
+       0.927935395, 0.928221011, 0.928506080, 0.928790604, 0.929074581,
+       0.929358012, 0.929640896, 0.929923233, 0.930205023, 0.930486266,
+       0.930766961, 0.931047109, 0.931326709, 0.931605761, 0.931884266,
+       0.932162222, 0.932439629, 0.932716488, 0.932992799, 0.933268560,
+       0.933543773, 0.933818436, 0.934092550, 0.934366115, 0.934639130,
+       0.934911595, 0.935183510, 0.935454875, 0.935725689, 0.935995954,
+       0.936265667, 0.936534830, 0.936803442, 0.937071502, 0.937339012,
+       0.937605970, 0.937872376, 0.938138231, 0.938403534, 0.938668285,
+       0.938932484, 0.939196130, 0.939459224, 0.939721765, 0.939983753,
+       0.940245188, 0.940506071, 0.940766400, 0.941026175, 0.941285397,
+       0.941544065, 0.941802179, 0.942059740, 0.942316746, 0.942573198,
+       0.942829095, 0.943084437, 0.943339225, 0.943593458, 0.943847136,
+       0.944100258, 0.944352826, 0.944604837, 0.944856293, 0.945107193,
+       0.945357537, 0.945607325, 0.945856557, 0.946105232, 0.946353351,
+       0.946600913, 0.946847918, 0.947094366, 0.947340257, 0.947585591,
+       0.947830367, 0.948074586, 0.948318247, 0.948561350, 0.948803895,
+       0.949045882, 0.949287310, 0.949528181, 0.949768492, 0.950008245,
+       0.950247439, 0.950486074, 0.950724150, 0.950961666, 0.951198623,
+       0.951435021, 0.951670859, 0.951906137, 0.952140855, 0.952375013,
+       0.952608610, 0.952841648, 0.953074124, 0.953306040, 0.953537396,
+       0.953768190, 0.953998423, 0.954228095, 0.954457206, 0.954685755,
+       0.954913742, 0.955141168, 0.955368032, 0.955594334, 0.955820074,
+       0.956045251, 0.956269866, 0.956493919, 0.956717409, 0.956940336,
+       0.957162700, 0.957384501, 0.957605739, 0.957826413, 0.958046524,
+       0.958266071, 0.958485055, 0.958703475, 0.958921331, 0.959138622,
+       0.959355350, 0.959571513, 0.959787112, 0.960002146, 0.960216615,
+       0.960430519, 0.960643859, 0.960856633, 0.961068842, 0.961280486,
+       0.961491564, 0.961702077, 0.961912023, 0.962121404, 0.962330219,
+       0.962538468, 0.962746151, 0.962953267, 0.963159817, 0.963365800,
+       0.963571216, 0.963776066, 0.963980348, 0.964184064, 0.964387212,
+       0.964589793, 0.964791807, 0.964993253, 0.965194131, 0.965394442,
+       0.965594184, 0.965793359, 0.965991965, 0.966190003, 0.966387473,
+       0.966584374, 0.966780707, 0.966976471, 0.967171666, 0.967366292,
+       0.967560349, 0.967753837, 0.967946756, 0.968139105, 0.968330884,
+       0.968522094, 0.968712734, 0.968902805, 0.969092305, 0.969281235,
+       0.969469595, 0.969657385, 0.969844604, 0.970031253, 0.970217331,
+       0.970402839, 0.970587775, 0.970772141, 0.970955935, 0.971139158,
+       0.971321810, 0.971503891, 0.971685400, 0.971866337, 0.972046703,
+       0.972226497, 0.972405719, 0.972584369, 0.972762447, 0.972939952,
+       0.973116885, 0.973293246, 0.973469034, 0.973644250, 0.973818892,
+       0.973992962, 0.974166459, 0.974339383, 0.974511733, 0.974683511,
+       0.974854715, 0.975025345, 0.975195402, 0.975364885, 0.975533795,
+       0.975702130, 0.975869892, 0.976037079, 0.976203692, 0.976369731,
+       0.976535196, 0.976700086, 0.976864402, 0.977028143, 0.977191309,
+       0.977353900, 0.977515917, 0.977677358, 0.977838224, 0.977998515,
+       0.978158231, 0.978317371, 0.978475935, 0.978633924, 0.978791338,
+       0.978948175, 0.979104437, 0.979260123, 0.979415232, 0.979569766,
+       0.979723723, 0.979877104, 0.980029908, 0.980182136, 0.980333787,
+       0.980484862, 0.980635360, 0.980785280, 0.980934624, 0.981083391,
+       0.981231581, 0.981379193, 0.981526228, 0.981672686, 0.981818566,
+       0.981963869, 0.982108594, 0.982252741, 0.982396311, 0.982539302,
+       0.982681716, 0.982823551, 0.982964808, 0.983105487, 0.983245588,
+       0.983385110, 0.983524054, 0.983662419, 0.983800206, 0.983937413,
+       0.984074042, 0.984210092, 0.984345563, 0.984480455, 0.984614768,
+       0.984748502, 0.984881656, 0.985014231, 0.985146226, 0.985277642,
+       0.985408479, 0.985538735, 0.985668412, 0.985797509, 0.985926026,
+       0.986053963, 0.986181320, 0.986308097, 0.986434294, 0.986559910,
+       0.986684946, 0.986809402, 0.986933277, 0.987056571, 0.987179285,
+       0.987301418, 0.987422970, 0.987543942, 0.987664332, 0.987784142,
+       0.987903370, 0.988022017, 0.988140083, 0.988257568, 0.988374471,
+       0.988490793, 0.988606533, 0.988721692, 0.988836269, 0.988950265,
+       0.989063678, 0.989176510, 0.989288760, 0.989400428, 0.989511514,
+       0.989622017, 0.989731939, 0.989841278, 0.989950036, 0.990058210,
+       0.990165803, 0.990272812, 0.990379240, 0.990485084, 0.990590346,
+       0.990695025, 0.990799122, 0.990902635, 0.991005566, 0.991107914,
+       0.991209678, 0.991310860, 0.991411458, 0.991511473, 0.991610905,
+       0.991709754, 0.991808019, 0.991905700, 0.992002799, 0.992099313,
+       0.992195244, 0.992290591, 0.992385355, 0.992479535, 0.992573130,
+       0.992666142, 0.992758570, 0.992850414, 0.992941674, 0.993032350,
+       0.993122442, 0.993211949, 0.993300872, 0.993389211, 0.993476966,
+       0.993564136, 0.993650721, 0.993736722, 0.993822138, 0.993906970,
+       0.993991217, 0.994074879, 0.994157957, 0.994240449, 0.994322357,
+       0.994403680, 0.994484418, 0.994564571, 0.994644138, 0.994723121,
+       0.994801519, 0.994879331, 0.994956558, 0.995033199, 0.995109256,
+       0.995184727, 0.995259612, 0.995333912, 0.995407627, 0.995480755,
+       0.995553299, 0.995625256, 0.995696628, 0.995767414, 0.995837615,
+       0.995907229, 0.995976258, 0.996044701, 0.996112558, 0.996179829,
+       0.996246513, 0.996312612, 0.996378125, 0.996443051, 0.996507392,
+       0.996571146, 0.996634314, 0.996696895, 0.996758890, 0.996820299,
+       0.996881122, 0.996941358, 0.997001007, 0.997060070, 0.997118547,
+       0.997176437, 0.997233740, 0.997290457, 0.997346587, 0.997402130,
+       0.997457086, 0.997511456, 0.997565239, 0.997618435, 0.997671044,
+       0.997723067, 0.997774502, 0.997825350, 0.997875612, 0.997925286,
+       0.997974374, 0.998022874, 0.998070787, 0.998118113, 0.998164852,
+       0.998211003, 0.998256568, 0.998301545, 0.998345935, 0.998389737,
+       0.998432953, 0.998475581, 0.998517621, 0.998559074, 0.998599940,
+       0.998640218, 0.998679909, 0.998719012, 0.998757528, 0.998795456,
+       0.998832797, 0.998869550, 0.998905715, 0.998941293, 0.998976283,
+       0.999010686, 0.999044501, 0.999077728, 0.999110367, 0.999142419,
+       0.999173883, 0.999204759, 0.999235047, 0.999264747, 0.999293860,
+       0.999322385, 0.999350321, 0.999377670, 0.999404431, 0.999430605,
+       0.999456190, 0.999481187, 0.999505596, 0.999529418, 0.999552651,
+       0.999575296, 0.999597353, 0.999618822, 0.999639704, 0.999659997,
+       0.999679702, 0.999698819, 0.999717348, 0.999735288, 0.999752641,
+       0.999769405, 0.999785582, 0.999801170, 0.999816170, 0.999830582,
+       0.999844405, 0.999857641, 0.999870288, 0.999882347, 0.999893818,
+       0.999904701, 0.999914996, 0.999924702, 0.999933820, 0.999942350,
+       0.999950291, 0.999957645, 0.999964410, 0.999970586, 0.999976175,
+       0.999981175, 0.999985587, 0.999989411, 0.999992647, 0.999995294,
+       0.999997353, 0.999998823, 0.999999706, 1.000000000, 0.999999706,
+       0.999998823, 0.999997353, 0.999995294, 0.999992647, 0.999989411,
+       0.999985587, 0.999981175, 0.999976175, 0.999970586, 0.999964410,
+       0.999957645, 0.999950291, 0.999942350, 0.999933820, 0.999924702,
+       0.999914996, 0.999904701, 0.999893818, 0.999882347, 0.999870288,
+       0.999857641, 0.999844405, 0.999830582, 0.999816170, 0.999801170,
+       0.999785582, 0.999769405, 0.999752641, 0.999735288, 0.999717348,
+       0.999698819, 0.999679702, 0.999659997, 0.999639704, 0.999618822,
+       0.999597353, 0.999575296, 0.999552651, 0.999529418, 0.999505596,
+       0.999481187, 0.999456190, 0.999430605, 0.999404431, 0.999377670,
+       0.999350321, 0.999322385, 0.999293860, 0.999264747, 0.999235047,
+       0.999204759, 0.999173883, 0.999142419, 0.999110367, 0.999077728,
+       0.999044501, 0.999010686, 0.998976283, 0.998941293, 0.998905715,
+       0.998869550, 0.998832797, 0.998795456, 0.998757528, 0.998719012,
+       0.998679909, 0.998640218, 0.998599940, 0.998559074, 0.998517621,
+       0.998475581, 0.998432953, 0.998389737, 0.998345935, 0.998301545,
+       0.998256568, 0.998211003, 0.998164852, 0.998118113, 0.998070787,
+       0.998022874, 0.997974374, 0.997925286, 0.997875612, 0.997825350,
+       0.997774502, 0.997723067, 0.997671044, 0.997618435, 0.997565239,
+       0.997511456, 0.997457086, 0.997402130, 0.997346587, 0.997290457,
+       0.997233740, 0.997176437, 0.997118547, 0.997060070, 0.997001007,
+       0.996941358, 0.996881122, 0.996820299, 0.996758890, 0.996696895,
+       0.996634314, 0.996571146, 0.996507392, 0.996443051, 0.996378125,
+       0.996312612, 0.996246513, 0.996179829, 0.996112558, 0.996044701,
+       0.995976258, 0.995907229, 0.995837615, 0.995767414, 0.995696628,
+       0.995625256, 0.995553299, 0.995480755, 0.995407627, 0.995333912,
+       0.995259612, 0.995184727, 0.995109256, 0.995033199, 0.994956558,
+       0.994879331, 0.994801519, 0.994723121, 0.994644138, 0.994564571,
+       0.994484418, 0.994403680, 0.994322357, 0.994240449, 0.994157957,
+       0.994074879, 0.993991217, 0.993906970, 0.993822138, 0.993736722,
+       0.993650721, 0.993564136, 0.993476966, 0.993389211, 0.993300872,
+       0.993211949, 0.993122442, 0.993032350, 0.992941674, 0.992850414,
+       0.992758570, 0.992666142, 0.992573130, 0.992479535, 0.992385355,
+       0.992290591, 0.992195244, 0.992099313, 0.992002799, 0.991905700,
+       0.991808019, 0.991709754, 0.991610905, 0.991511473, 0.991411458,
+       0.991310860, 0.991209678, 0.991107914, 0.991005566, 0.990902635,
+       0.990799122, 0.990695025, 0.990590346, 0.990485084, 0.990379240,
+       0.990272812, 0.990165803, 0.990058210, 0.989950036, 0.989841278,
+       0.989731939, 0.989622017, 0.989511514, 0.989400428, 0.989288760,
+       0.989176510, 0.989063678, 0.988950265, 0.988836269, 0.988721692,
+       0.988606533, 0.988490793, 0.988374471, 0.988257568, 0.988140083,
+       0.988022017, 0.987903370, 0.987784142, 0.987664332, 0.987543942,
+       0.987422970, 0.987301418, 0.987179285, 0.987056571, 0.986933277,
+       0.986809402, 0.986684946, 0.986559910, 0.986434294, 0.986308097,
+       0.986181320, 0.986053963, 0.985926026, 0.985797509, 0.985668412,
+       0.985538735, 0.985408479, 0.985277642, 0.985146226, 0.985014231,
+       0.984881656, 0.984748502, 0.984614768, 0.984480455, 0.984345563,
+       0.984210092, 0.984074042, 0.983937413, 0.983800206, 0.983662419,
+       0.983524054, 0.983385110, 0.983245588, 0.983105487, 0.982964808,
+       0.982823551, 0.982681716, 0.982539302, 0.982396311, 0.982252741,
+       0.982108594, 0.981963869, 0.981818566, 0.981672686, 0.981526228,
+       0.981379193, 0.981231581, 0.981083391, 0.980934624, 0.980785280,
+       0.980635360, 0.980484862, 0.980333787, 0.980182136, 0.980029908,
+       0.979877104, 0.979723723, 0.979569766, 0.979415232, 0.979260123,
+       0.979104437, 0.978948175, 0.978791338, 0.978633924, 0.978475935,
+       0.978317371, 0.978158231, 0.977998515, 0.977838224, 0.977677358,
+       0.977515917, 0.977353900, 0.977191309, 0.977028143, 0.976864402,
+       0.976700086, 0.976535196, 0.976369731, 0.976203692, 0.976037079,
+       0.975869892, 0.975702130, 0.975533795, 0.975364885, 0.975195402,
+       0.975025345, 0.974854715, 0.974683511, 0.974511733, 0.974339383,
+       0.974166459, 0.973992962, 0.973818892, 0.973644250, 0.973469034,
+       0.973293246, 0.973116885, 0.972939952, 0.972762447, 0.972584369,
+       0.972405719, 0.972226497, 0.972046703, 0.971866337, 0.971685400,
+       0.971503891, 0.971321810, 0.971139158, 0.970955935, 0.970772141,
+       0.970587775, 0.970402839, 0.970217331, 0.970031253, 0.969844604,
+       0.969657385, 0.969469595, 0.969281235, 0.969092305, 0.968902805,
+       0.968712734, 0.968522094, 0.968330884, 0.968139105, 0.967946756,
+       0.967753837, 0.967560349, 0.967366292, 0.967171666, 0.966976471,
+       0.966780707, 0.966584374, 0.966387473, 0.966190003, 0.965991965,
+       0.965793359, 0.965594184, 0.965394442, 0.965194131, 0.964993253,
+       0.964791807, 0.964589793, 0.964387212, 0.964184064, 0.963980348,
+       0.963776066, 0.963571216, 0.963365800, 0.963159817, 0.962953267,
+       0.962746151, 0.962538468, 0.962330219, 0.962121404, 0.961912023,
+       0.961702077, 0.961491564, 0.961280486, 0.961068842, 0.960856633,
+       0.960643859, 0.960430519, 0.960216615, 0.960002146, 0.959787112,
+       0.959571513, 0.959355350, 0.959138622, 0.958921331, 0.958703475,
+       0.958485055, 0.958266071, 0.958046524, 0.957826413, 0.957605739,
+       0.957384501, 0.957162700, 0.956940336, 0.956717409, 0.956493919,
+       0.956269866, 0.956045251, 0.955820074, 0.955594334, 0.955368032,
+       0.955141168, 0.954913742, 0.954685755, 0.954457206, 0.954228095,
+       0.953998423, 0.953768190, 0.953537396, 0.953306040, 0.953074124,
+       0.952841648, 0.952608610, 0.952375013, 0.952140855, 0.951906137,
+       0.951670859, 0.951435021, 0.951198623, 0.950961666, 0.950724150,
+       0.950486074, 0.950247439, 0.950008245, 0.949768492, 0.949528181,
+       0.949287310, 0.949045882, 0.948803895, 0.948561350, 0.948318247,
+       0.948074586, 0.947830367, 0.947585591, 0.947340257, 0.947094366,
+       0.946847918, 0.946600913, 0.946353351, 0.946105232, 0.945856557,
+       0.945607325, 0.945357537, 0.945107193, 0.944856293, 0.944604837,
+       0.944352826, 0.944100258, 0.943847136, 0.943593458, 0.943339225,
+       0.943084437, 0.942829095, 0.942573198, 0.942316746, 0.942059740,
+       0.941802179, 0.941544065, 0.941285397, 0.941026175, 0.940766400,
+       0.940506071, 0.940245188, 0.939983753, 0.939721765, 0.939459224,
+       0.939196130, 0.938932484, 0.938668285, 0.938403534, 0.938138231,
+       0.937872376, 0.937605970, 0.937339012, 0.937071502, 0.936803442,
+       0.936534830, 0.936265667, 0.935995954, 0.935725689, 0.935454875,
+       0.935183510, 0.934911595, 0.934639130, 0.934366115, 0.934092550,
+       0.933818436, 0.933543773, 0.933268560, 0.932992799, 0.932716488,
+       0.932439629, 0.932162222, 0.931884266, 0.931605761, 0.931326709,
+       0.931047109, 0.930766961, 0.930486266, 0.930205023, 0.929923233,
+       0.929640896, 0.929358012, 0.929074581, 0.928790604, 0.928506080,
+       0.928221011, 0.927935395, 0.927649233, 0.927362526, 0.927075273,
+       0.926787474, 0.926499131, 0.926210242, 0.925920809, 0.925630831,
+       0.925340308, 0.925049241, 0.924757630, 0.924465474, 0.924172775,
+       0.923879533, 0.923585746, 0.923291417, 0.922996544, 0.922701128,
+       0.922405170, 0.922108669, 0.921811625, 0.921514039, 0.921215911,
+       0.920917242, 0.920618030, 0.920318277, 0.920017982, 0.919717146,
+       0.919415769, 0.919113852, 0.918811393, 0.918508394, 0.918204855,
+       0.917900776, 0.917596156, 0.917290997, 0.916985298, 0.916679060,
+       0.916372282, 0.916064966, 0.915757110, 0.915448716, 0.915139783,
+       0.914830312, 0.914520303, 0.914209756, 0.913898671, 0.913587048,
+       0.913274888, 0.912962190, 0.912648956, 0.912335185, 0.912020877,
+       0.911706032, 0.911390651, 0.911074734, 0.910758281, 0.910441292,
+       0.910123768, 0.909805708, 0.909487113, 0.909167983, 0.908848318,
+       0.908528119, 0.908207385, 0.907886116, 0.907564314, 0.907241978,
+       0.906919108, 0.906595705, 0.906271768, 0.905947298, 0.905622295,
+       0.905296759, 0.904970691, 0.904644091, 0.904316958, 0.903989293,
+       0.903661097, 0.903332368, 0.903003109, 0.902673318, 0.902342996,
+       0.902012144, 0.901680761, 0.901348847, 0.901016403, 0.900683429,
+       0.900349925, 0.900015892, 0.899681329, 0.899346237, 0.899010616,
+       0.898674466, 0.898337787, 0.898000580, 0.897662844, 0.897324581,
+       0.896985789, 0.896646470, 0.896306624, 0.895966250, 0.895625349,
+       0.895283921, 0.894941967, 0.894599486, 0.894256478, 0.893912945,
+       0.893568886, 0.893224301, 0.892879191, 0.892533555, 0.892187395,
+       0.891840709, 0.891493499, 0.891145765, 0.890797506, 0.890448723,
+       0.890099417, 0.889749586, 0.889399233, 0.889048356, 0.888696956,
+       0.888345033, 0.887992588, 0.887639620, 0.887286131, 0.886932119,
+       0.886577585, 0.886222530, 0.885866954, 0.885510856, 0.885154238,
+       0.884797098, 0.884439439, 0.884081259, 0.883722559, 0.883363339,
+       0.883003599, 0.882643340, 0.882282562, 0.881921264, 0.881559448,
+       0.881197113, 0.880834260, 0.880470889, 0.880107000, 0.879742593,
+       0.879377668, 0.879012226, 0.878646267, 0.878279792, 0.877912799,
+       0.877545290, 0.877177265, 0.876808724, 0.876439667, 0.876070094,
+       0.875700006, 0.875329403, 0.874958285, 0.874586652, 0.874214505,
+       0.873841843, 0.873468668, 0.873094978, 0.872720775, 0.872346059,
+       0.871970829, 0.871595087, 0.871218831, 0.870842063, 0.870464783,
+       0.870086991, 0.869708687, 0.869329871, 0.868950544, 0.868570706,
+       0.868190357, 0.867809497, 0.867428126, 0.867046246, 0.866663855,
+       0.866280954, 0.865897544, 0.865513624, 0.865129195, 0.864744258,
+       0.864358811, 0.863972856, 0.863586393, 0.863199422, 0.862811943,
+       0.862423956, 0.862035462, 0.861646461, 0.861256953, 0.860866939,
+       0.860476418, 0.860085390, 0.859693857, 0.859301818, 0.858909274,
+       0.858516224, 0.858122670, 0.857728610, 0.857334046, 0.856938977,
+       0.856543405, 0.856147328, 0.855750748, 0.855353665, 0.854956078,
+       0.854557988, 0.854159396, 0.853760301, 0.853360704, 0.852960605,
+       0.852560004, 0.852158902, 0.851757298, 0.851355193, 0.850952587,
+       0.850549481, 0.850145875, 0.849741768, 0.849337161, 0.848932055,
+       0.848526450, 0.848120345, 0.847713741, 0.847306639, 0.846899038,
+       0.846490939, 0.846082342, 0.845673247, 0.845263655, 0.844853565,
+       0.844442979, 0.844031895, 0.843620316, 0.843208240, 0.842795668,
+       0.842382600, 0.841969036, 0.841554977, 0.841140424, 0.840725375,
+       0.840309832, 0.839893794, 0.839477263, 0.839060237, 0.838642718,
+       0.838224706, 0.837806200, 0.837387202, 0.836967711, 0.836547727,
+       0.836127252, 0.835706284, 0.835284825, 0.834862875, 0.834440433,
+       0.834017501, 0.833594078, 0.833170165, 0.832745761, 0.832320868,
+       0.831895485, 0.831469612, 0.831043251, 0.830616400, 0.830189061,
+       0.829761234, 0.829332918, 0.828904115, 0.828474824, 0.828045045,
+       0.827614780, 0.827184027, 0.826752788, 0.826321063, 0.825888851,
+       0.825456154, 0.825022971, 0.824589303, 0.824155149, 0.823720511,
+       0.823285388, 0.822849781, 0.822413690, 0.821977115, 0.821540057,
+       0.821102515, 0.820664490, 0.820225983, 0.819786992, 0.819347520,
+       0.818907566, 0.818467130, 0.818026212, 0.817584813, 0.817142933,
+       0.816700573, 0.816257732, 0.815814411, 0.815370610, 0.814926329,
+       0.814481569, 0.814036330, 0.813590612, 0.813144415, 0.812697740,
+       0.812250587, 0.811802956, 0.811354847, 0.810906261, 0.810457198,
+       0.810007659, 0.809557642, 0.809107150, 0.808656182, 0.808204737,
+       0.807752818, 0.807300423, 0.806847554, 0.806394209, 0.805940391,
+       0.805486098, 0.805031331, 0.804576091, 0.804120377, 0.803664191,
+       0.803207531, 0.802750400, 0.802292796, 0.801834719, 0.801376172,
+       0.800917153, 0.800457662, 0.799997701, 0.799537269, 0.799076367,
+       0.798614995, 0.798153153, 0.797690841, 0.797228060, 0.796764810,
+       0.796301092, 0.795836905, 0.795372249, 0.794907126, 0.794441536,
+       0.793975478, 0.793508952, 0.793041960, 0.792574502, 0.792106577,
+       0.791638187, 0.791169330, 0.790700008, 0.790230221, 0.789759970,
+       0.789289253, 0.788818072, 0.788346428, 0.787874319, 0.787401747,
+       0.786928712, 0.786455214, 0.785981253, 0.785506830, 0.785031944,
+       0.784556597, 0.784080789, 0.783604519, 0.783127788, 0.782650596,
+       0.782172944, 0.781694832, 0.781216260, 0.780737229, 0.780257738,
+       0.779777788, 0.779297379, 0.778816512, 0.778335187, 0.777853404,
+       0.777371164, 0.776888466, 0.776405311, 0.775921699, 0.775437631,
+       0.774953107, 0.774468126, 0.773982691, 0.773496799, 0.773010453,
+       0.772523652, 0.772036397, 0.771548688, 0.771060524, 0.770571907,
+       0.770082837, 0.769593314, 0.769103338, 0.768612909, 0.768122029,
+       0.767630696, 0.767138912, 0.766646677, 0.766153990, 0.765660853,
+       0.765167266, 0.764673228, 0.764178741, 0.763683804, 0.763188417,
+       0.762692582, 0.762196298, 0.761699566, 0.761202385, 0.760704757,
+       0.760206682, 0.759708159, 0.759209189, 0.758709773, 0.758209910,
+       0.757709601, 0.757208847, 0.756707647, 0.756206001, 0.755703911,
+       0.755201377, 0.754698398, 0.754194975, 0.753691109, 0.753186799,
+       0.752682046, 0.752176850, 0.751671212, 0.751165132, 0.750658610,
+       0.750151646, 0.749644241, 0.749136395, 0.748628108, 0.748119380,
+       0.747610213, 0.747100606, 0.746590559, 0.746080074, 0.745569149,
+       0.745057785, 0.744545984, 0.744033744, 0.743521067, 0.743007952,
+       0.742494400, 0.741980412, 0.741465987, 0.740951125, 0.740435828,
+       0.739920095, 0.739403927, 0.738887324, 0.738370287, 0.737852815,
+       0.737334909, 0.736816569, 0.736297796, 0.735778589, 0.735258950,
+       0.734738878, 0.734218374, 0.733697438, 0.733176071, 0.732654272,
+       0.732132042, 0.731609381, 0.731086290, 0.730562769, 0.730038818,
+       0.729514438, 0.728989629, 0.728464390, 0.727938724, 0.727412629,
+       0.726886106, 0.726359155, 0.725831777, 0.725303972, 0.724775741,
+       0.724247083, 0.723717999, 0.723188489, 0.722658554, 0.722128194,
+       0.721597409, 0.721066199, 0.720534566, 0.720002508, 0.719470027,
+       0.718937122, 0.718403795, 0.717870045, 0.717335873, 0.716801279,
+       0.716266263, 0.715730825, 0.715194967, 0.714658688, 0.714121988,
+       0.713584869, 0.713047329, 0.712509371, 0.711970993, 0.711432196,
+       0.710892980, 0.710353347, 0.709813295, 0.709272826, 0.708731940,
+       0.708190637, 0.707648917, 0.707106781, 0.706564229, 0.706021261,
+       0.705477878, 0.704934080, 0.704389868, 0.703845241, 0.703300199,
+       0.702754744, 0.702208876, 0.701662595, 0.701115901, 0.700568794,
+       0.700021275, 0.699473345, 0.698925003, 0.698376249, 0.697827085,
+       0.697277511, 0.696727526, 0.696177131, 0.695626327, 0.695075114,
+       0.694523492, 0.693971461, 0.693419022, 0.692866175, 0.692312920,
+       0.691759258, 0.691205190, 0.690650714, 0.690095832, 0.689540545,
+       0.688984851, 0.688428753, 0.687872249, 0.687315341, 0.686758028,
+       0.686200312, 0.685642191, 0.685083668, 0.684524741, 0.683965412,
+       0.683405680, 0.682845546, 0.682285011, 0.681724074, 0.681162736,
+       0.680600998, 0.680038859, 0.679476320, 0.678913381, 0.678350043,
+       0.677786306, 0.677222170, 0.676657636, 0.676092704, 0.675527374,
+       0.674961646, 0.674395522, 0.673829000, 0.673262083, 0.672694769,
+       0.672127060, 0.671558955, 0.670990455, 0.670421560, 0.669852271,
+       0.669282588, 0.668712512, 0.668142041, 0.667571178, 0.666999922,
+       0.666428274, 0.665856234, 0.665283802, 0.664710978, 0.664137764,
+       0.663564159, 0.662990163, 0.662415778, 0.661841002, 0.661265838,
+       0.660690284, 0.660114342, 0.659538012, 0.658961293, 0.658384187,
+       0.657806693, 0.657228813, 0.656650546, 0.656071892, 0.655492853,
+       0.654913428, 0.654333618, 0.653753423, 0.653172843, 0.652591879,
+       0.652010531, 0.651428800, 0.650846685, 0.650264187, 0.649681307,
+       0.649098045, 0.648514401, 0.647930375, 0.647345969, 0.646761181,
+       0.646176013, 0.645590465, 0.645004537, 0.644418229, 0.643831543,
+       0.643244478, 0.642657034, 0.642069212, 0.641481013, 0.640892436,
+       0.640303482, 0.639714152, 0.639124445, 0.638534362, 0.637943904,
+       0.637353070, 0.636761861, 0.636170278, 0.635578320, 0.634985989,
+       0.634393284, 0.633800206, 0.633206755, 0.632612932, 0.632018736,
+       0.631424169, 0.630829230, 0.630233920, 0.629638239, 0.629042188,
+       0.628445767, 0.627848976, 0.627251815, 0.626654286, 0.626056388,
+       0.625458122, 0.624859488, 0.624260486, 0.623661118, 0.623061382,
+       0.622461279, 0.621860811, 0.621259977, 0.620658777, 0.620057212,
+       0.619455282, 0.618852988, 0.618250330, 0.617647308, 0.617043923,
+       0.616440175, 0.615836064, 0.615231591, 0.614626756, 0.614021559,
+       0.613416001, 0.612810082, 0.612203803, 0.611597164, 0.610990165,
+       0.610382806, 0.609775089, 0.609167012, 0.608558578, 0.607949785,
+       0.607340635, 0.606731127, 0.606121263, 0.605511041, 0.604900464,
+       0.604289531, 0.603678242, 0.603066599, 0.602454600, 0.601842247,
+       0.601229540, 0.600616479, 0.600003065, 0.599389298, 0.598775179,
+       0.598160707, 0.597545883, 0.596930708, 0.596315182, 0.595699304,
+       0.595083077, 0.594466499, 0.593849572, 0.593232295, 0.592614669,
+       0.591996695, 0.591378372, 0.590759702, 0.590140684, 0.589521319,
+       0.588901607, 0.588281548, 0.587661144, 0.587040394, 0.586419298,
+       0.585797857, 0.585176072, 0.584553943, 0.583931470, 0.583308653,
+       0.582685493, 0.582061990, 0.581438145, 0.580813958, 0.580189429,
+       0.579564559, 0.578939348, 0.578313796, 0.577687905, 0.577061673,
+       0.576435102, 0.575808191, 0.575180942, 0.574553355, 0.573925430,
+       0.573297167, 0.572668566, 0.572039629, 0.571410356, 0.570780746,
+       0.570150800, 0.569520519, 0.568889903, 0.568258953, 0.567627668,
+       0.566996049, 0.566364096, 0.565731811, 0.565099192, 0.564466242,
+       0.563832959, 0.563199344, 0.562565398, 0.561931121, 0.561296514,
+       0.560661576, 0.560026309, 0.559390712, 0.558754786, 0.558118531,
+       0.557481948, 0.556845037, 0.556207799, 0.555570233, 0.554932340,
+       0.554294121, 0.553655576, 0.553016706, 0.552377509, 0.551737988,
+       0.551098143, 0.550457973, 0.549817479, 0.549176662, 0.548535522,
+       0.547894059, 0.547252274, 0.546610167, 0.545967738, 0.545324988,
+       0.544681918, 0.544038527, 0.543394816, 0.542750785, 0.542106435,
+       0.541461766, 0.540816778, 0.540171473, 0.539525849, 0.538879909,
+       0.538233651, 0.537587076, 0.536940186, 0.536292979, 0.535645457,
+       0.534997620, 0.534349468, 0.533701002, 0.533052222, 0.532403128,
+       0.531753721, 0.531104001, 0.530453969, 0.529803625, 0.529152969,
+       0.528502002, 0.527850723, 0.527199135, 0.526547236, 0.525895027,
+       0.525242510, 0.524589683, 0.523936547, 0.523283103, 0.522629352,
+       0.521975293, 0.521320927, 0.520666254, 0.520011275, 0.519355990,
+       0.518700400, 0.518044504, 0.517388304, 0.516731799, 0.516074990,
+       0.515417878, 0.514760463, 0.514102744, 0.513444723, 0.512786401,
+       0.512127776, 0.511468850, 0.510809624, 0.510150097, 0.509490269,
+       0.508830143, 0.508169716, 0.507508991, 0.506847967, 0.506186645,
+       0.505525026, 0.504863109, 0.504200894, 0.503538384, 0.502875577,
+       0.502212474, 0.501549076, 0.500885383, 0.500221395, 0.499557113,
+       0.498892537, 0.498227667, 0.497562504, 0.496897049, 0.496231301,
+       0.495565262, 0.494898931, 0.494232309, 0.493565396, 0.492898192,
+       0.492230699, 0.491562916, 0.490894844, 0.490226483, 0.489557834,
+       0.488888897, 0.488219672, 0.487550160, 0.486880361, 0.486210276,
+       0.485539905, 0.484869248, 0.484198306, 0.483527079, 0.482855568,
+       0.482183772, 0.481511693, 0.480839331, 0.480166685, 0.479493758,
+       0.478820548, 0.478147056, 0.477473284, 0.476799230, 0.476124896,
+       0.475450282, 0.474775388, 0.474100215, 0.473424763, 0.472749032,
+       0.472073023, 0.471396737, 0.470720173, 0.470043332, 0.469366215,
+       0.468688822, 0.468011153, 0.467333209, 0.466654990, 0.465976496,
+       0.465297728, 0.464618686, 0.463939371, 0.463259784, 0.462579923,
+       0.461899791, 0.461219386, 0.460538711, 0.459857765, 0.459176548,
+       0.458495060, 0.457813304, 0.457131277, 0.456448982, 0.455766419,
+       0.455083587, 0.454400488, 0.453717121, 0.453033487, 0.452349587,
+       0.451665421, 0.450980989, 0.450296292, 0.449611330, 0.448926103,
+       0.448240612, 0.447554858, 0.446868840, 0.446182560, 0.445496017,
+       0.444809211, 0.444122145, 0.443434816, 0.442747228, 0.442059378,
+       0.441371269, 0.440682900, 0.439994271, 0.439305384, 0.438616239,
+       0.437926835, 0.437237174, 0.436547255, 0.435857080, 0.435166648,
+       0.434475961, 0.433785017, 0.433093819, 0.432402366, 0.431710658,
+       0.431018696, 0.430326481, 0.429634013, 0.428941292, 0.428248319,
+       0.427555093, 0.426861617, 0.426167889, 0.425473910, 0.424779681,
+       0.424085202, 0.423390474, 0.422695497, 0.422000271, 0.421304797,
+       0.420609074, 0.419913105, 0.419216888, 0.418520425, 0.417823716,
+       0.417126761, 0.416429560, 0.415732115, 0.415034424, 0.414336490,
+       0.413638312, 0.412939891, 0.412241227, 0.411542320, 0.410843171,
+       0.410143781, 0.409444149, 0.408744276, 0.408044163, 0.407343810,
+       0.406643217, 0.405942385, 0.405241314, 0.404540005, 0.403838458,
+       0.403136673, 0.402434651, 0.401732392, 0.401029897, 0.400327166,
+       0.399624200, 0.398920998, 0.398217562, 0.397513892, 0.396809987,
+       0.396105850, 0.395401479, 0.394696876, 0.393992040, 0.393286973,
+       0.392581674, 0.391876144, 0.391170384, 0.390464394, 0.389758174,
+       0.389051725, 0.388345047, 0.387638140, 0.386931006, 0.386223643,
+       0.385516054, 0.384808238, 0.384100195, 0.383391926, 0.382683432,
+       0.381974713, 0.381265769, 0.380556601, 0.379847209, 0.379137593,
+       0.378427755, 0.377717694, 0.377007410, 0.376296905, 0.375586178,
+       0.374875231, 0.374164063, 0.373452675, 0.372741067, 0.372029240,
+       0.371317194, 0.370604930, 0.369892447, 0.369179747, 0.368466830,
+       0.367753696, 0.367040346, 0.366326780, 0.365612998, 0.364899001,
+       0.364184790, 0.363470364, 0.362755724, 0.362040871, 0.361325806,
+       0.360610527, 0.359895037, 0.359179334, 0.358463421, 0.357747296,
+       0.357030961, 0.356314416, 0.355597662, 0.354880698, 0.354163525,
+       0.353446145, 0.352728556, 0.352010759, 0.351292756, 0.350574546,
+       0.349856130, 0.349137508, 0.348418680, 0.347699648, 0.346980411,
+       0.346260970, 0.345541325, 0.344821477, 0.344101426, 0.343381173,
+       0.342660717, 0.341940060, 0.341219202, 0.340498144, 0.339776884,
+       0.339055425, 0.338333767, 0.337611909, 0.336889853, 0.336167599,
+       0.335445147, 0.334722498, 0.333999651, 0.333276609, 0.332553370,
+       0.331829935, 0.331106306, 0.330382481, 0.329658463, 0.328934250,
+       0.328209844, 0.327485244, 0.326760452, 0.326035468, 0.325310292,
+       0.324584925, 0.323859367, 0.323133618, 0.322407679, 0.321681550,
+       0.320955232, 0.320228726, 0.319502031, 0.318775148, 0.318048077,
+       0.317320820, 0.316593376, 0.315865745, 0.315137929, 0.314409927,
+       0.313681740, 0.312953369, 0.312224814, 0.311496075, 0.310767153,
+       0.310038048, 0.309308760, 0.308579291, 0.307849640, 0.307119808,
+       0.306389795, 0.305659602, 0.304929230, 0.304198678, 0.303467947,
+       0.302737037, 0.302005949, 0.301274684, 0.300543241, 0.299811622,
+       0.299079826, 0.298347855, 0.297615707, 0.296883385, 0.296150888,
+       0.295418217, 0.294685372, 0.293952354, 0.293219163, 0.292485799,
+       0.291752263, 0.291018556, 0.290284677, 0.289550628, 0.288816408,
+       0.288082019, 0.287347460, 0.286612731, 0.285877835, 0.285142770,
+       0.284407537, 0.283672137, 0.282936570, 0.282200837, 0.281464938,
+       0.280728873, 0.279992643, 0.279256248, 0.278519689, 0.277782967,
+       0.277046080, 0.276309031, 0.275571819, 0.274834445, 0.274096910,
+       0.273359213, 0.272621355, 0.271883337, 0.271145160, 0.270406822,
+       0.269668326, 0.268929670, 0.268190857, 0.267451886, 0.266712757,
+       0.265973472, 0.265234030, 0.264494432, 0.263754679, 0.263014770,
+       0.262274707, 0.261534489, 0.260794118, 0.260053593, 0.259312915,
+       0.258572085, 0.257831102, 0.257089968, 0.256348682, 0.255607246,
+       0.254865660, 0.254123923, 0.253382037, 0.252640002, 0.251897818,
+       0.251155486, 0.250413007, 0.249670380, 0.248927606, 0.248184685,
+       0.247441619, 0.246698407, 0.245955050, 0.245211549, 0.244467903,
+       0.243724113, 0.242980180, 0.242236104, 0.241491885, 0.240747525,
+       0.240003022, 0.239258379, 0.238513595, 0.237768670, 0.237023606,
+       0.236278402, 0.235533059, 0.234787578, 0.234041959, 0.233296201,
+       0.232550307, 0.231804276, 0.231058108, 0.230311805, 0.229565366,
+       0.228818792, 0.228072083, 0.227325240, 0.226578264, 0.225831154,
+       0.225083911, 0.224336536, 0.223589029, 0.222841391, 0.222093621,
+       0.221345721, 0.220597690, 0.219849530, 0.219101240, 0.218352822,
+       0.217604275, 0.216855600, 0.216106797, 0.215357867, 0.214608811,
+       0.213859628, 0.213110320, 0.212360886, 0.211611327, 0.210861644,
+       0.210111837, 0.209361906, 0.208611852, 0.207861675, 0.207111376,
+       0.206360955, 0.205610413, 0.204859750, 0.204108966, 0.203358062,
+       0.202607039, 0.201855896, 0.201104635, 0.200353255, 0.199601758,
+       0.198850143, 0.198098411, 0.197346562, 0.196594598, 0.195842517,
+       0.195090322, 0.194338012, 0.193585587, 0.192833049, 0.192080397,
+       0.191327632, 0.190574755, 0.189821765, 0.189068664, 0.188315452,
+       0.187562129, 0.186808695, 0.186055152, 0.185301499, 0.184547737,
+       0.183793867, 0.183039888, 0.182285802, 0.181531608, 0.180777308,
+       0.180022901, 0.179268389, 0.178513771, 0.177759048, 0.177004220,
+       0.176249289, 0.175494253, 0.174739115, 0.173983873, 0.173228530,
+       0.172473084, 0.171717537, 0.170961889, 0.170206140, 0.169450291,
+       0.168694343, 0.167938295, 0.167182148, 0.166425904, 0.165669561,
+       0.164913120, 0.164156583, 0.163399949, 0.162643219, 0.161886394,
+       0.161129473, 0.160372457, 0.159615347, 0.158858143, 0.158100846,
+       0.157343456, 0.156585973, 0.155828398, 0.155070731, 0.154312973,
+       0.153555124, 0.152797185, 0.152039156, 0.151281038, 0.150522831,
+       0.149764535, 0.149006151, 0.148247679, 0.147489120, 0.146730474,
+       0.145971742, 0.145212925, 0.144454021, 0.143695033, 0.142935960,
+       0.142176804, 0.141417563, 0.140658239, 0.139898833, 0.139139344,
+       0.138379774, 0.137620122, 0.136860389, 0.136100575, 0.135340682,
+       0.134580709, 0.133820656, 0.133060525, 0.132300316, 0.131540029,
+       0.130779664, 0.130019223, 0.129258705, 0.128498111, 0.127737441,
+       0.126976696, 0.126215877, 0.125454983, 0.124694016, 0.123932975,
+       0.123171861, 0.122410675, 0.121649417, 0.120888087, 0.120126686,
+       0.119365215, 0.118603673, 0.117842062, 0.117080381, 0.116318631,
+       0.115556813, 0.114794927, 0.114032973, 0.113270952, 0.112508865,
+       0.111746711, 0.110984492, 0.110222207, 0.109459858, 0.108697444,
+       0.107934966, 0.107172425, 0.106409821, 0.105647154, 0.104884425,
+       0.104121634, 0.103358782, 0.102595869, 0.101832896, 0.101069863,
+       0.100306770, 0.099543619, 0.098780409, 0.098017140, 0.097253814,
+       0.096490431, 0.095726991, 0.094963495, 0.094199943, 0.093436336,
+       0.092672673, 0.091908956, 0.091145185, 0.090381361, 0.089617483,
+       0.088853553, 0.088089570, 0.087325535, 0.086561449, 0.085797312,
+       0.085033125, 0.084268888, 0.083504601, 0.082740265, 0.081975880,
+       0.081211447, 0.080446966, 0.079682438, 0.078917863, 0.078153242,
+       0.077388574, 0.076623861, 0.075859103, 0.075094301, 0.074329454,
+       0.073564564, 0.072799630, 0.072034653, 0.071269634, 0.070504573,
+       0.069739471, 0.068974328, 0.068209144, 0.067443920, 0.066678656,
+       0.065913353, 0.065148011, 0.064382631, 0.063617213, 0.062851758,
+       0.062086265, 0.061320736, 0.060555171, 0.059789571, 0.059023935,
+       0.058258265, 0.057492560, 0.056726821, 0.055961049, 0.055195244,
+       0.054429407, 0.053663538, 0.052897637, 0.052131705, 0.051365742,
+       0.050599749, 0.049833726, 0.049067674, 0.048301593, 0.047535484,
+       0.046769347, 0.046003182, 0.045236990, 0.044470772, 0.043704527,
+       0.042938257, 0.042171961, 0.041405641, 0.040639296, 0.039872928,
+       0.039106535, 0.038340120, 0.037573683, 0.036807223, 0.036040742,
+       0.035274239, 0.034507716, 0.033741172, 0.032974608, 0.032208025,
+       0.031441424, 0.030674803, 0.029908165, 0.029141509, 0.028374836,
+       0.027608146, 0.026841440, 0.026074718, 0.025307981, 0.024541229,
+       0.023774462, 0.023007681, 0.022240887, 0.021474080, 0.020707261,
+       0.019940429, 0.019173585, 0.018406730, 0.017639864, 0.016872988,
+       0.016106102, 0.015339206, 0.014572302, 0.013805389, 0.013038467,
+       0.012271538, 0.011504602, 0.010737659, 0.009970710, 0.009203755,
+       0.008436794, 0.007669829, 0.006902859, 0.006135885, 0.005368907,
+       0.004601926, 0.003834943, 0.003067957, 0.002300969, 0.001533980,
+       0.000766990, -0.000000000, -0.000766990, -0.001533980, -0.002300969,
+       -0.003067957, -0.003834943, -0.004601926, -0.005368907, -0.006135885,
+       -0.006902859, -0.007669829, -0.008436794, -0.009203755, -0.009970710,
+       -0.010737659, -0.011504602, -0.012271538, -0.013038467, -0.013805389,
+       -0.014572302, -0.015339206, -0.016106102, -0.016872988, -0.017639864,
+       -0.018406730, -0.019173585, -0.019940429, -0.020707261, -0.021474080,
+       -0.022240887, -0.023007681, -0.023774462, -0.024541229, -0.025307981,
+       -0.026074718, -0.026841440, -0.027608146, -0.028374836, -0.029141509,
+       -0.029908165, -0.030674803, -0.031441424, -0.032208025, -0.032974608,
+       -0.033741172, -0.034507716, -0.035274239, -0.036040742, -0.036807223,
+       -0.037573683, -0.038340120, -0.039106535, -0.039872928, -0.040639296,
+       -0.041405641, -0.042171961, -0.042938257, -0.043704527, -0.044470772,
+       -0.045236990, -0.046003182, -0.046769347, -0.047535484, -0.048301593,
+       -0.049067674, -0.049833726, -0.050599749, -0.051365742, -0.052131705,
+       -0.052897637, -0.053663538, -0.054429407, -0.055195244, -0.055961049,
+       -0.056726821, -0.057492560, -0.058258265, -0.059023935, -0.059789571,
+       -0.060555171, -0.061320736, -0.062086265, -0.062851758, -0.063617213,
+       -0.064382631, -0.065148011, -0.065913353, -0.066678656, -0.067443920,
+       -0.068209144, -0.068974328, -0.069739471, -0.070504573, -0.071269634,
+       -0.072034653, -0.072799630, -0.073564564, -0.074329454, -0.075094301,
+       -0.075859103, -0.076623861, -0.077388574, -0.078153242, -0.078917863,
+       -0.079682438, -0.080446966, -0.081211447, -0.081975880, -0.082740265,
+       -0.083504601, -0.084268888, -0.085033125, -0.085797312, -0.086561449,
+       -0.087325535, -0.088089570, -0.088853553, -0.089617483, -0.090381361,
+       -0.091145185, -0.091908956, -0.092672673, -0.093436336, -0.094199943,
+       -0.094963495, -0.095726991, -0.096490431, -0.097253814, -0.098017140,
+       -0.098780409, -0.099543619, -0.100306770, -0.101069863, -0.101832896,
+       -0.102595869, -0.103358782, -0.104121634, -0.104884425, -0.105647154,
+       -0.106409821, -0.107172425, -0.107934966, -0.108697444, -0.109459858,
+       -0.110222207, -0.110984492, -0.111746711, -0.112508865, -0.113270952,
+       -0.114032973, -0.114794927, -0.115556813, -0.116318631, -0.117080381,
+       -0.117842062, -0.118603673, -0.119365215, -0.120126686, -0.120888087,
+       -0.121649417, -0.122410675, -0.123171861, -0.123932975, -0.124694016,
+       -0.125454983, -0.126215877, -0.126976696, -0.127737441, -0.128498111,
+       -0.129258705, -0.130019223, -0.130779664, -0.131540029, -0.132300316,
+       -0.133060525, -0.133820656, -0.134580709, -0.135340682, -0.136100575,
+       -0.136860389, -0.137620122, -0.138379774, -0.139139344, -0.139898833,
+       -0.140658239, -0.141417563, -0.142176804, -0.142935960, -0.143695033,
+       -0.144454021, -0.145212925, -0.145971742, -0.146730474, -0.147489120,
+       -0.148247679, -0.149006151, -0.149764535, -0.150522831, -0.151281038,
+       -0.152039156, -0.152797185, -0.153555124, -0.154312973, -0.155070731,
+       -0.155828398, -0.156585973, -0.157343456, -0.158100846, -0.158858143,
+       -0.159615347, -0.160372457, -0.161129473, -0.161886394, -0.162643219,
+       -0.163399949, -0.164156583, -0.164913120, -0.165669561, -0.166425904,
+       -0.167182148, -0.167938295, -0.168694343, -0.169450291, -0.170206140,
+       -0.170961889, -0.171717537, -0.172473084, -0.173228530, -0.173983873,
+       -0.174739115, -0.175494253, -0.176249289, -0.177004220, -0.177759048,
+       -0.178513771, -0.179268389, -0.180022901, -0.180777308, -0.181531608,
+       -0.182285802, -0.183039888, -0.183793867, -0.184547737, -0.185301499,
+       -0.186055152, -0.186808695, -0.187562129, -0.188315452, -0.189068664,
+       -0.189821765, -0.190574755, -0.191327632, -0.192080397, -0.192833049,
+       -0.193585587, -0.194338012, -0.195090322, -0.195842517, -0.196594598,
+       -0.197346562, -0.198098411, -0.198850143, -0.199601758, -0.200353255,
+       -0.201104635, -0.201855896, -0.202607039, -0.203358062, -0.204108966,
+       -0.204859750, -0.205610413, -0.206360955, -0.207111376, -0.207861675,
+       -0.208611852, -0.209361906, -0.210111837, -0.210861644, -0.211611327,
+       -0.212360886, -0.213110320, -0.213859628, -0.214608811, -0.215357867,
+       -0.216106797, -0.216855600, -0.217604275, -0.218352822, -0.219101240,
+       -0.219849530, -0.220597690, -0.221345721, -0.222093621, -0.222841391,
+       -0.223589029, -0.224336536, -0.225083911, -0.225831154, -0.226578264,
+       -0.227325240, -0.228072083, -0.228818792, -0.229565366, -0.230311805,
+       -0.231058108, -0.231804276, -0.232550307, -0.233296201, -0.234041959,
+       -0.234787578, -0.235533059, -0.236278402, -0.237023606, -0.237768670,
+       -0.238513595, -0.239258379, -0.240003022, -0.240747525, -0.241491885,
+       -0.242236104, -0.242980180, -0.243724113, -0.244467903, -0.245211549,
+       -0.245955050, -0.246698407, -0.247441619, -0.248184685, -0.248927606,
+       -0.249670380, -0.250413007, -0.251155486, -0.251897818, -0.252640002,
+       -0.253382037, -0.254123923, -0.254865660, -0.255607246, -0.256348682,
+       -0.257089968, -0.257831102, -0.258572085, -0.259312915, -0.260053593,
+       -0.260794118, -0.261534489, -0.262274707, -0.263014770, -0.263754679,
+       -0.264494432, -0.265234030, -0.265973472, -0.266712757, -0.267451886,
+       -0.268190857, -0.268929670, -0.269668326, -0.270406822, -0.271145160,
+       -0.271883337, -0.272621355, -0.273359213, -0.274096910, -0.274834445,
+       -0.275571819, -0.276309031, -0.277046080, -0.277782967, -0.278519689,
+       -0.279256248, -0.279992643, -0.280728873, -0.281464938, -0.282200837,
+       -0.282936570, -0.283672137, -0.284407537, -0.285142770, -0.285877835,
+       -0.286612731, -0.287347460, -0.288082019, -0.288816408, -0.289550628,
+       -0.290284677, -0.291018556, -0.291752263, -0.292485799, -0.293219163,
+       -0.293952354, -0.294685372, -0.295418217, -0.296150888, -0.296883385,
+       -0.297615707, -0.298347855, -0.299079826, -0.299811622, -0.300543241,
+       -0.301274684, -0.302005949, -0.302737037, -0.303467947, -0.304198678,
+       -0.304929230, -0.305659602, -0.306389795, -0.307119808, -0.307849640,
+       -0.308579291, -0.309308760, -0.310038048, -0.310767153, -0.311496075,
+       -0.312224814, -0.312953369, -0.313681740, -0.314409927, -0.315137929,
+       -0.315865745, -0.316593376, -0.317320820, -0.318048077, -0.318775148,
+       -0.319502031, -0.320228726, -0.320955232, -0.321681550, -0.322407679,
+       -0.323133618, -0.323859367, -0.324584925, -0.325310292, -0.326035468,
+       -0.326760452, -0.327485244, -0.328209844, -0.328934250, -0.329658463,
+       -0.330382481, -0.331106306, -0.331829935, -0.332553370, -0.333276609,
+       -0.333999651, -0.334722498, -0.335445147, -0.336167599, -0.336889853,
+       -0.337611909, -0.338333767, -0.339055425, -0.339776884, -0.340498144,
+       -0.341219202, -0.341940060, -0.342660717, -0.343381173, -0.344101426,
+       -0.344821477, -0.345541325, -0.346260970, -0.346980411, -0.347699648,
+       -0.348418680, -0.349137508, -0.349856130, -0.350574546, -0.351292756,
+       -0.352010759, -0.352728556, -0.353446145, -0.354163525, -0.354880698,
+       -0.355597662, -0.356314416, -0.357030961, -0.357747296, -0.358463421,
+       -0.359179334, -0.359895037, -0.360610527, -0.361325806, -0.362040871,
+       -0.362755724, -0.363470364, -0.364184790, -0.364899001, -0.365612998,
+       -0.366326780, -0.367040346, -0.367753696, -0.368466830, -0.369179747,
+       -0.369892447, -0.370604930, -0.371317194, -0.372029240, -0.372741067,
+       -0.373452675, -0.374164063, -0.374875231, -0.375586178, -0.376296905,
+       -0.377007410, -0.377717694, -0.378427755, -0.379137593, -0.379847209,
+       -0.380556601, -0.381265769, -0.381974713, -0.382683432, -0.383391926,
+       -0.384100195, -0.384808238, -0.385516054, -0.386223643, -0.386931006,
+       -0.387638140, -0.388345047, -0.389051725, -0.389758174, -0.390464394,
+       -0.391170384, -0.391876144, -0.392581674, -0.393286973, -0.393992040,
+       -0.394696876, -0.395401479, -0.396105850, -0.396809987, -0.397513892,
+       -0.398217562, -0.398920998, -0.399624200, -0.400327166, -0.401029897,
+       -0.401732392, -0.402434651, -0.403136673, -0.403838458, -0.404540005,
+       -0.405241314, -0.405942385, -0.406643217, -0.407343810, -0.408044163,
+       -0.408744276, -0.409444149, -0.410143781, -0.410843171, -0.411542320,
+       -0.412241227, -0.412939891, -0.413638312, -0.414336490, -0.415034424,
+       -0.415732115, -0.416429560, -0.417126761, -0.417823716, -0.418520425,
+       -0.419216888, -0.419913105, -0.420609074, -0.421304797, -0.422000271,
+       -0.422695497, -0.423390474, -0.424085202, -0.424779681, -0.425473910,
+       -0.426167889, -0.426861617, -0.427555093, -0.428248319, -0.428941292,
+       -0.429634013, -0.430326481, -0.431018696, -0.431710658, -0.432402366,
+       -0.433093819, -0.433785017, -0.434475961, -0.435166648, -0.435857080,
+       -0.436547255, -0.437237174, -0.437926835, -0.438616239, -0.439305384,
+       -0.439994271, -0.440682900, -0.441371269, -0.442059378, -0.442747228,
+       -0.443434816, -0.444122145, -0.444809211, -0.445496017, -0.446182560,
+       -0.446868840, -0.447554858, -0.448240612, -0.448926103, -0.449611330,
+       -0.450296292, -0.450980989, -0.451665421, -0.452349587, -0.453033487,
+       -0.453717121, -0.454400488, -0.455083587, -0.455766419, -0.456448982,
+       -0.457131277, -0.457813304, -0.458495060, -0.459176548, -0.459857765,
+       -0.460538711, -0.461219386, -0.461899791, -0.462579923, -0.463259784,
+       -0.463939371, -0.464618686, -0.465297728, -0.465976496, -0.466654990,
+       -0.467333209, -0.468011153, -0.468688822, -0.469366215, -0.470043332,
+       -0.470720173, -0.471396737, -0.472073023, -0.472749032, -0.473424763,
+       -0.474100215, -0.474775388, -0.475450282, -0.476124896, -0.476799230,
+       -0.477473284, -0.478147056, -0.478820548, -0.479493758, -0.480166685,
+       -0.480839331, -0.481511693, -0.482183772, -0.482855568, -0.483527079,
+       -0.484198306, -0.484869248, -0.485539905, -0.486210276, -0.486880361,
+       -0.487550160, -0.488219672, -0.488888897, -0.489557834, -0.490226483,
+       -0.490894844, -0.491562916, -0.492230699, -0.492898192, -0.493565396,
+       -0.494232309, -0.494898931, -0.495565262, -0.496231301, -0.496897049,
+       -0.497562504, -0.498227667, -0.498892537, -0.499557113, -0.500221395,
+       -0.500885383, -0.501549076, -0.502212474, -0.502875577, -0.503538384,
+       -0.504200894, -0.504863109, -0.505525026, -0.506186645, -0.506847967,
+       -0.507508991, -0.508169716, -0.508830143, -0.509490269, -0.510150097,
+       -0.510809624, -0.511468850, -0.512127776, -0.512786401, -0.513444723,
+       -0.514102744, -0.514760463, -0.515417878, -0.516074990, -0.516731799,
+       -0.517388304, -0.518044504, -0.518700400, -0.519355990, -0.520011275,
+       -0.520666254, -0.521320927, -0.521975293, -0.522629352, -0.523283103,
+       -0.523936547, -0.524589683, -0.525242510, -0.525895027, -0.526547236,
+       -0.527199135, -0.527850723, -0.528502002, -0.529152969, -0.529803625,
+       -0.530453969, -0.531104001, -0.531753721, -0.532403128, -0.533052222,
+       -0.533701002, -0.534349468, -0.534997620, -0.535645457, -0.536292979,
+       -0.536940186, -0.537587076, -0.538233651, -0.538879909, -0.539525849,
+       -0.540171473, -0.540816778, -0.541461766, -0.542106435, -0.542750785,
+       -0.543394816, -0.544038527, -0.544681918, -0.545324988, -0.545967738,
+       -0.546610167, -0.547252274, -0.547894059, -0.548535522, -0.549176662,
+       -0.549817479, -0.550457973, -0.551098143, -0.551737988, -0.552377509,
+       -0.553016706, -0.553655576, -0.554294121, -0.554932340, -0.555570233,
+       -0.556207799, -0.556845037, -0.557481948, -0.558118531, -0.558754786,
+       -0.559390712, -0.560026309, -0.560661576, -0.561296514, -0.561931121,
+       -0.562565398, -0.563199344, -0.563832959, -0.564466242, -0.565099192,
+       -0.565731811, -0.566364096, -0.566996049, -0.567627668, -0.568258953,
+       -0.568889903, -0.569520519, -0.570150800, -0.570780746, -0.571410356,
+       -0.572039629, -0.572668566, -0.573297167, -0.573925430, -0.574553355,
+       -0.575180942, -0.575808191, -0.576435102, -0.577061673, -0.577687905,
+       -0.578313796, -0.578939348, -0.579564559, -0.580189429, -0.580813958,
+       -0.581438145, -0.582061990, -0.582685493, -0.583308653, -0.583931470,
+       -0.584553943, -0.585176072, -0.585797857, -0.586419298, -0.587040394,
+       -0.587661144, -0.588281548, -0.588901607, -0.589521319, -0.590140684,
+       -0.590759702, -0.591378372, -0.591996695, -0.592614669, -0.593232295,
+       -0.593849572, -0.594466499, -0.595083077, -0.595699304, -0.596315182,
+       -0.596930708, -0.597545883, -0.598160707, -0.598775179, -0.599389298,
+       -0.600003065, -0.600616479, -0.601229540, -0.601842247, -0.602454600,
+       -0.603066599, -0.603678242, -0.604289531, -0.604900464, -0.605511041,
+       -0.606121263, -0.606731127, -0.607340635, -0.607949785, -0.608558578,
+       -0.609167012, -0.609775089, -0.610382806, -0.610990165, -0.611597164,
+       -0.612203803, -0.612810082, -0.613416001, -0.614021559, -0.614626756,
+       -0.615231591, -0.615836064, -0.616440175, -0.617043923, -0.617647308,
+       -0.618250330, -0.618852988, -0.619455282, -0.620057212, -0.620658777,
+       -0.621259977, -0.621860811, -0.622461279, -0.623061382, -0.623661118,
+       -0.624260486, -0.624859488, -0.625458122, -0.626056388, -0.626654286,
+       -0.627251815, -0.627848976, -0.628445767, -0.629042188, -0.629638239,
+       -0.630233920, -0.630829230, -0.631424169, -0.632018736, -0.632612932,
+       -0.633206755, -0.633800206, -0.634393284, -0.634985989, -0.635578320,
+       -0.636170278, -0.636761861, -0.637353070, -0.637943904, -0.638534362,
+       -0.639124445, -0.639714152, -0.640303482, -0.640892436, -0.641481013,
+       -0.642069212, -0.642657034, -0.643244478, -0.643831543, -0.644418229,
+       -0.645004537, -0.645590465, -0.646176013, -0.646761181, -0.647345969,
+       -0.647930375, -0.648514401, -0.649098045, -0.649681307, -0.650264187,
+       -0.650846685, -0.651428800, -0.652010531, -0.652591879, -0.653172843,
+       -0.653753423, -0.654333618, -0.654913428, -0.655492853, -0.656071892,
+       -0.656650546, -0.657228813, -0.657806693, -0.658384187, -0.658961293,
+       -0.659538012, -0.660114342, -0.660690284, -0.661265838, -0.661841002,
+       -0.662415778, -0.662990163, -0.663564159, -0.664137764, -0.664710978,
+       -0.665283802, -0.665856234, -0.666428274, -0.666999922, -0.667571178,
+       -0.668142041, -0.668712512, -0.669282588, -0.669852271, -0.670421560,
+       -0.670990455, -0.671558955, -0.672127060, -0.672694769, -0.673262083,
+       -0.673829000, -0.674395522, -0.674961646, -0.675527374, -0.676092704,
+       -0.676657636, -0.677222170, -0.677786306, -0.678350043, -0.678913381,
+       -0.679476320, -0.680038859, -0.680600998, -0.681162736, -0.681724074,
+       -0.682285011, -0.682845546, -0.683405680, -0.683965412, -0.684524741,
+       -0.685083668, -0.685642191, -0.686200312, -0.686758028, -0.687315341,
+       -0.687872249, -0.688428753, -0.688984851, -0.689540545, -0.690095832,
+       -0.690650714, -0.691205190, -0.691759258, -0.692312920, -0.692866175,
+       -0.693419022, -0.693971461, -0.694523492, -0.695075114, -0.695626327,
+       -0.696177131, -0.696727526, -0.697277511, -0.697827085, -0.698376249,
+       -0.698925003, -0.699473345, -0.700021275, -0.700568794, -0.701115901,
+       -0.701662595, -0.702208876, -0.702754744, -0.703300199, -0.703845241,
+       -0.704389868, -0.704934080, -0.705477878, -0.706021261, -0.706564229,
+       -0.707106781, -0.707648917, -0.708190637, -0.708731940, -0.709272826,
+       -0.709813295, -0.710353347, -0.710892980, -0.711432196, -0.711970993,
+       -0.712509371, -0.713047329, -0.713584869, -0.714121988, -0.714658688,
+       -0.715194967, -0.715730825, -0.716266263, -0.716801279, -0.717335873,
+       -0.717870045, -0.718403795, -0.718937122, -0.719470027, -0.720002508,
+       -0.720534566, -0.721066199, -0.721597409, -0.722128194, -0.722658554,
+       -0.723188489, -0.723717999, -0.724247083, -0.724775741, -0.725303972,
+       -0.725831777, -0.726359155, -0.726886106, -0.727412629, -0.727938724,
+       -0.728464390, -0.728989629, -0.729514438, -0.730038818, -0.730562769,
+       -0.731086290, -0.731609381, -0.732132042, -0.732654272, -0.733176071,
+       -0.733697438, -0.734218374, -0.734738878, -0.735258950, -0.735778589,
+       -0.736297796, -0.736816569, -0.737334909, -0.737852815, -0.738370287,
+       -0.738887324, -0.739403927, -0.739920095, -0.740435828, -0.740951125,
+       -0.741465987, -0.741980412, -0.742494400, -0.743007952, -0.743521067,
+       -0.744033744, -0.744545984, -0.745057785, -0.745569149, -0.746080074,
+       -0.746590559, -0.747100606, -0.747610213, -0.748119380, -0.748628108,
+       -0.749136395, -0.749644241, -0.750151646, -0.750658610, -0.751165132,
+       -0.751671212, -0.752176850, -0.752682046, -0.753186799, -0.753691109,
+       -0.754194975, -0.754698398, -0.755201377, -0.755703911, -0.756206001,
+       -0.756707647, -0.757208847, -0.757709601, -0.758209910, -0.758709773,
+       -0.759209189, -0.759708159, -0.760206682, -0.760704757, -0.761202385,
+       -0.761699566, -0.762196298, -0.762692582, -0.763188417, -0.763683804,
+       -0.764178741, -0.764673228, -0.765167266, -0.765660853, -0.766153990,
+       -0.766646677, -0.767138912, -0.767630696, -0.768122029, -0.768612909,
+       -0.769103338, -0.769593314, -0.770082837, -0.770571907, -0.771060524,
+       -0.771548688, -0.772036397, -0.772523652, -0.773010453, -0.773496799,
+       -0.773982691, -0.774468126, -0.774953107, -0.775437631, -0.775921699,
+       -0.776405311, -0.776888466, -0.777371164, -0.777853404, -0.778335187,
+       -0.778816512, -0.779297379, -0.779777788, -0.780257738, -0.780737229,
+       -0.781216260, -0.781694832, -0.782172944, -0.782650596, -0.783127788,
+       -0.783604519, -0.784080789, -0.784556597, -0.785031944, -0.785506830,
+       -0.785981253, -0.786455214, -0.786928712, -0.787401747, -0.787874319,
+       -0.788346428, -0.788818072, -0.789289253, -0.789759970, -0.790230221,
+       -0.790700008, -0.791169330, -0.791638187, -0.792106577, -0.792574502,
+       -0.793041960, -0.793508952, -0.793975478, -0.794441536, -0.794907126,
+       -0.795372249, -0.795836905, -0.796301092, -0.796764810, -0.797228060,
+       -0.797690841, -0.798153153, -0.798614995, -0.799076367, -0.799537269,
+       -0.799997701, -0.800457662, -0.800917153, -0.801376172, -0.801834719,
+       -0.802292796, -0.802750400, -0.803207531, -0.803664191, -0.804120377,
+       -0.804576091, -0.805031331, -0.805486098, -0.805940391, -0.806394209,
+       -0.806847554, -0.807300423, -0.807752818, -0.808204737, -0.808656182,
+       -0.809107150, -0.809557642, -0.810007659, -0.810457198, -0.810906261,
+       -0.811354847, -0.811802956, -0.812250587, -0.812697740, -0.813144415,
+       -0.813590612, -0.814036330, -0.814481569, -0.814926329, -0.815370610,
+       -0.815814411, -0.816257732, -0.816700573, -0.817142933, -0.817584813,
+       -0.818026212, -0.818467130, -0.818907566, -0.819347520, -0.819786992,
+       -0.820225983, -0.820664490, -0.821102515, -0.821540057, -0.821977115,
+       -0.822413690, -0.822849781, -0.823285388, -0.823720511, -0.824155149,
+       -0.824589303, -0.825022971, -0.825456154, -0.825888851, -0.826321063,
+       -0.826752788, -0.827184027, -0.827614780, -0.828045045, -0.828474824,
+       -0.828904115, -0.829332918, -0.829761234, -0.830189061, -0.830616400,
+       -0.831043251, -0.831469612, -0.831895485, -0.832320868, -0.832745761,
+       -0.833170165, -0.833594078, -0.834017501, -0.834440433, -0.834862875,
+       -0.835284825, -0.835706284, -0.836127252, -0.836547727, -0.836967711,
+       -0.837387202, -0.837806200, -0.838224706, -0.838642718, -0.839060237,
+       -0.839477263, -0.839893794, -0.840309832, -0.840725375, -0.841140424,
+       -0.841554977, -0.841969036, -0.842382600, -0.842795668, -0.843208240,
+       -0.843620316, -0.844031895, -0.844442979, -0.844853565, -0.845263655,
+       -0.845673247, -0.846082342, -0.846490939, -0.846899038, -0.847306639,
+       -0.847713741, -0.848120345, -0.848526450, -0.848932055, -0.849337161,
+       -0.849741768, -0.850145875, -0.850549481, -0.850952587, -0.851355193,
+       -0.851757298, -0.852158902, -0.852560004, -0.852960605, -0.853360704,
+       -0.853760301, -0.854159396, -0.854557988, -0.854956078, -0.855353665,
+       -0.855750748, -0.856147328, -0.856543405, -0.856938977, -0.857334046,
+       -0.857728610, -0.858122670, -0.858516224, -0.858909274, -0.859301818,
+       -0.859693857, -0.860085390, -0.860476418, -0.860866939, -0.861256953,
+       -0.861646461, -0.862035462, -0.862423956, -0.862811943, -0.863199422,
+       -0.863586393, -0.863972856, -0.864358811, -0.864744258, -0.865129195,
+       -0.865513624, -0.865897544, -0.866280954, -0.866663855, -0.867046246,
+       -0.867428126, -0.867809497, -0.868190357, -0.868570706, -0.868950544,
+       -0.869329871, -0.869708687, -0.870086991, -0.870464783, -0.870842063,
+       -0.871218831, -0.871595087, -0.871970829, -0.872346059, -0.872720775,
+       -0.873094978, -0.873468668, -0.873841843, -0.874214505, -0.874586652,
+       -0.874958285, -0.875329403, -0.875700006, -0.876070094, -0.876439667,
+       -0.876808724, -0.877177265, -0.877545290, -0.877912799, -0.878279792,
+       -0.878646267, -0.879012226, -0.879377668, -0.879742593, -0.880107000,
+       -0.880470889, -0.880834260, -0.881197113, -0.881559448, -0.881921264,
+       -0.882282562, -0.882643340, -0.883003599, -0.883363339, -0.883722559,
+       -0.884081259, -0.884439439, -0.884797098, -0.885154238, -0.885510856,
+       -0.885866954, -0.886222530, -0.886577585, -0.886932119, -0.887286131,
+       -0.887639620, -0.887992588, -0.888345033, -0.888696956, -0.889048356,
+       -0.889399233, -0.889749586, -0.890099417, -0.890448723, -0.890797506,
+       -0.891145765, -0.891493499, -0.891840709, -0.892187395, -0.892533555,
+       -0.892879191, -0.893224301, -0.893568886, -0.893912945, -0.894256478,
+       -0.894599486, -0.894941967, -0.895283921, -0.895625349, -0.895966250,
+       -0.896306624, -0.896646470, -0.896985789, -0.897324581, -0.897662844,
+       -0.898000580, -0.898337787, -0.898674466, -0.899010616, -0.899346237,
+       -0.899681329, -0.900015892, -0.900349925, -0.900683429, -0.901016403,
+       -0.901348847, -0.901680761, -0.902012144, -0.902342996, -0.902673318,
+       -0.903003109, -0.903332368, -0.903661097, -0.903989293, -0.904316958,
+       -0.904644091, -0.904970691, -0.905296759, -0.905622295, -0.905947298,
+       -0.906271768, -0.906595705, -0.906919108, -0.907241978, -0.907564314,
+       -0.907886116, -0.908207385, -0.908528119, -0.908848318, -0.909167983,
+       -0.909487113, -0.909805708, -0.910123768, -0.910441292, -0.910758281,
+       -0.911074734, -0.911390651, -0.911706032, -0.912020877, -0.912335185,
+       -0.912648956, -0.912962190, -0.913274888, -0.913587048, -0.913898671,
+       -0.914209756, -0.914520303, -0.914830312, -0.915139783, -0.915448716,
+       -0.915757110, -0.916064966, -0.916372282, -0.916679060, -0.916985298,
+       -0.917290997, -0.917596156, -0.917900776, -0.918204855, -0.918508394,
+       -0.918811393, -0.919113852, -0.919415769, -0.919717146, -0.920017982,
+       -0.920318277, -0.920618030, -0.920917242, -0.921215911, -0.921514039,
+       -0.921811625, -0.922108669, -0.922405170, -0.922701128, -0.922996544,
+       -0.923291417, -0.923585746, -0.923879533, -0.924172775, -0.924465474,
+       -0.924757630, -0.925049241, -0.925340308, -0.925630831, -0.925920809,
+       -0.926210242, -0.926499131, -0.926787474, -0.927075273, -0.927362526,
+       -0.927649233, -0.927935395, -0.928221011, -0.928506080, -0.928790604,
+       -0.929074581, -0.929358012, -0.929640896, -0.929923233, -0.930205023,
+       -0.930486266, -0.930766961, -0.931047109, -0.931326709, -0.931605761,
+       -0.931884266, -0.932162222, -0.932439629, -0.932716488, -0.932992799,
+       -0.933268560, -0.933543773, -0.933818436, -0.934092550, -0.934366115,
+       -0.934639130, -0.934911595, -0.935183510, -0.935454875, -0.935725689,
+       -0.935995954, -0.936265667, -0.936534830, -0.936803442, -0.937071502,
+       -0.937339012, -0.937605970, -0.937872376, -0.938138231, -0.938403534,
+       -0.938668285, -0.938932484, -0.939196130, -0.939459224, -0.939721765,
+       -0.939983753, -0.940245188, -0.940506071, -0.940766400, -0.941026175,
+       -0.941285397, -0.941544065, -0.941802179, -0.942059740, -0.942316746,
+       -0.942573198, -0.942829095, -0.943084437, -0.943339225, -0.943593458,
+       -0.943847136, -0.944100258, -0.944352826, -0.944604837, -0.944856293,
+       -0.945107193, -0.945357537, -0.945607325, -0.945856557, -0.946105232,
+       -0.946353351, -0.946600913, -0.946847918, -0.947094366, -0.947340257,
+       -0.947585591, -0.947830367, -0.948074586, -0.948318247, -0.948561350,
+       -0.948803895, -0.949045882, -0.949287310, -0.949528181, -0.949768492,
+       -0.950008245, -0.950247439, -0.950486074, -0.950724150, -0.950961666,
+       -0.951198623, -0.951435021, -0.951670859, -0.951906137, -0.952140855,
+       -0.952375013, -0.952608610, -0.952841648, -0.953074124, -0.953306040,
+       -0.953537396, -0.953768190, -0.953998423, -0.954228095, -0.954457206,
+       -0.954685755, -0.954913742, -0.955141168, -0.955368032, -0.955594334,
+       -0.955820074, -0.956045251, -0.956269866, -0.956493919, -0.956717409,
+       -0.956940336, -0.957162700, -0.957384501, -0.957605739, -0.957826413,
+       -0.958046524, -0.958266071, -0.958485055, -0.958703475, -0.958921331,
+       -0.959138622, -0.959355350, -0.959571513, -0.959787112, -0.960002146,
+       -0.960216615, -0.960430519, -0.960643859, -0.960856633, -0.961068842,
+       -0.961280486, -0.961491564, -0.961702077, -0.961912023, -0.962121404,
+       -0.962330219, -0.962538468, -0.962746151, -0.962953267, -0.963159817,
+       -0.963365800, -0.963571216, -0.963776066, -0.963980348, -0.964184064,
+       -0.964387212, -0.964589793, -0.964791807, -0.964993253, -0.965194131,
+       -0.965394442, -0.965594184, -0.965793359, -0.965991965, -0.966190003,
+       -0.966387473, -0.966584374, -0.966780707, -0.966976471, -0.967171666,
+       -0.967366292, -0.967560349, -0.967753837, -0.967946756, -0.968139105,
+       -0.968330884, -0.968522094, -0.968712734, -0.968902805, -0.969092305,
+       -0.969281235, -0.969469595, -0.969657385, -0.969844604, -0.970031253,
+       -0.970217331, -0.970402839, -0.970587775, -0.970772141, -0.970955935,
+       -0.971139158, -0.971321810, -0.971503891, -0.971685400, -0.971866337,
+       -0.972046703, -0.972226497, -0.972405719, -0.972584369, -0.972762447,
+       -0.972939952, -0.973116885, -0.973293246, -0.973469034, -0.973644250,
+       -0.973818892, -0.973992962, -0.974166459, -0.974339383, -0.974511733,
+       -0.974683511, -0.974854715, -0.975025345, -0.975195402, -0.975364885,
+       -0.975533795, -0.975702130, -0.975869892, -0.976037079, -0.976203692,
+       -0.976369731, -0.976535196, -0.976700086, -0.976864402, -0.977028143,
+       -0.977191309, -0.977353900, -0.977515917, -0.977677358, -0.977838224,
+       -0.977998515, -0.978158231, -0.978317371, -0.978475935, -0.978633924,
+       -0.978791338, -0.978948175, -0.979104437, -0.979260123, -0.979415232,
+       -0.979569766, -0.979723723, -0.979877104, -0.980029908, -0.980182136,
+       -0.980333787, -0.980484862, -0.980635360, -0.980785280, -0.980934624,
+       -0.981083391, -0.981231581, -0.981379193, -0.981526228, -0.981672686,
+       -0.981818566, -0.981963869, -0.982108594, -0.982252741, -0.982396311,
+       -0.982539302, -0.982681716, -0.982823551, -0.982964808, -0.983105487,
+       -0.983245588, -0.983385110, -0.983524054, -0.983662419, -0.983800206,
+       -0.983937413, -0.984074042, -0.984210092, -0.984345563, -0.984480455,
+       -0.984614768, -0.984748502, -0.984881656, -0.985014231, -0.985146226,
+       -0.985277642, -0.985408479, -0.985538735, -0.985668412, -0.985797509,
+       -0.985926026, -0.986053963, -0.986181320, -0.986308097, -0.986434294,
+       -0.986559910, -0.986684946, -0.986809402, -0.986933277, -0.987056571,
+       -0.987179285, -0.987301418, -0.987422970, -0.987543942, -0.987664332,
+       -0.987784142, -0.987903370, -0.988022017, -0.988140083, -0.988257568,
+       -0.988374471, -0.988490793, -0.988606533, -0.988721692, -0.988836269,
+       -0.988950265, -0.989063678, -0.989176510, -0.989288760, -0.989400428,
+       -0.989511514, -0.989622017, -0.989731939, -0.989841278, -0.989950036,
+       -0.990058210, -0.990165803, -0.990272812, -0.990379240, -0.990485084,
+       -0.990590346, -0.990695025, -0.990799122, -0.990902635, -0.991005566,
+       -0.991107914, -0.991209678, -0.991310860, -0.991411458, -0.991511473,
+       -0.991610905, -0.991709754, -0.991808019, -0.991905700, -0.992002799,
+       -0.992099313, -0.992195244, -0.992290591, -0.992385355, -0.992479535,
+       -0.992573130, -0.992666142, -0.992758570, -0.992850414, -0.992941674,
+       -0.993032350, -0.993122442, -0.993211949, -0.993300872, -0.993389211,
+       -0.993476966, -0.993564136, -0.993650721, -0.993736722, -0.993822138,
+       -0.993906970, -0.993991217, -0.994074879, -0.994157957, -0.994240449,
+       -0.994322357, -0.994403680, -0.994484418, -0.994564571, -0.994644138,
+       -0.994723121, -0.994801519, -0.994879331, -0.994956558, -0.995033199,
+       -0.995109256, -0.995184727, -0.995259612, -0.995333912, -0.995407627,
+       -0.995480755, -0.995553299, -0.995625256, -0.995696628, -0.995767414,
+       -0.995837615, -0.995907229, -0.995976258, -0.996044701, -0.996112558,
+       -0.996179829, -0.996246513, -0.996312612, -0.996378125, -0.996443051,
+       -0.996507392, -0.996571146, -0.996634314, -0.996696895, -0.996758890,
+       -0.996820299, -0.996881122, -0.996941358, -0.997001007, -0.997060070,
+       -0.997118547, -0.997176437, -0.997233740, -0.997290457, -0.997346587,
+       -0.997402130, -0.997457086, -0.997511456, -0.997565239, -0.997618435,
+       -0.997671044, -0.997723067, -0.997774502, -0.997825350, -0.997875612,
+       -0.997925286, -0.997974374, -0.998022874, -0.998070787, -0.998118113,
+       -0.998164852, -0.998211003, -0.998256568, -0.998301545, -0.998345935,
+       -0.998389737, -0.998432953, -0.998475581, -0.998517621, -0.998559074,
+       -0.998599940, -0.998640218, -0.998679909, -0.998719012, -0.998757528,
+       -0.998795456, -0.998832797, -0.998869550, -0.998905715, -0.998941293,
+       -0.998976283, -0.999010686, -0.999044501, -0.999077728, -0.999110367,
+       -0.999142419, -0.999173883, -0.999204759, -0.999235047, -0.999264747,
+       -0.999293860, -0.999322385, -0.999350321, -0.999377670, -0.999404431,
+       -0.999430605, -0.999456190, -0.999481187, -0.999505596, -0.999529418,
+       -0.999552651, -0.999575296, -0.999597353, -0.999618822, -0.999639704,
+       -0.999659997, -0.999679702, -0.999698819, -0.999717348, -0.999735288,
+       -0.999752641, -0.999769405, -0.999785582, -0.999801170, -0.999816170,
+       -0.999830582, -0.999844405, -0.999857641, -0.999870288, -0.999882347,
+       -0.999893818, -0.999904701, -0.999914996, -0.999924702, -0.999933820,
+       -0.999942350, -0.999950291, -0.999957645, -0.999964410, -0.999970586,
+       -0.999976175, -0.999981175, -0.999985587, -0.999989411, -0.999992647,
+       -0.999995294, -0.999997353, -0.999998823, -0.999999706, -1.000000000,
+       -0.999999706, -0.999998823, -0.999997353, -0.999995294, -0.999992647,
+       -0.999989411, -0.999985587, -0.999981175, -0.999976175, -0.999970586,
+       -0.999964410, -0.999957645, -0.999950291, -0.999942350, -0.999933820,
+       -0.999924702, -0.999914996, -0.999904701, -0.999893818, -0.999882347,
+       -0.999870288, -0.999857641, -0.999844405, -0.999830582, -0.999816170,
+       -0.999801170, -0.999785582, -0.999769405, -0.999752641, -0.999735288,
+       -0.999717348, -0.999698819, -0.999679702, -0.999659997, -0.999639704,
+       -0.999618822, -0.999597353, -0.999575296, -0.999552651, -0.999529418,
+       -0.999505596, -0.999481187, -0.999456190, -0.999430605, -0.999404431,
+       -0.999377670, -0.999350321, -0.999322385, -0.999293860, -0.999264747,
+       -0.999235047, -0.999204759, -0.999173883, -0.999142419, -0.999110367,
+       -0.999077728, -0.999044501, -0.999010686, -0.998976283, -0.998941293,
+       -0.998905715, -0.998869550, -0.998832797, -0.998795456, -0.998757528,
+       -0.998719012, -0.998679909, -0.998640218, -0.998599940, -0.998559074,
+       -0.998517621, -0.998475581, -0.998432953, -0.998389737, -0.998345935,
+       -0.998301545, -0.998256568, -0.998211003, -0.998164852, -0.998118113,
+       -0.998070787, -0.998022874, -0.997974374, -0.997925286, -0.997875612,
+       -0.997825350, -0.997774502, -0.997723067, -0.997671044, -0.997618435,
+       -0.997565239, -0.997511456, -0.997457086, -0.997402130, -0.997346587,
+       -0.997290457, -0.997233740, -0.997176437, -0.997118547, -0.997060070,
+       -0.997001007, -0.996941358, -0.996881122, -0.996820299, -0.996758890,
+       -0.996696895, -0.996634314, -0.996571146, -0.996507392, -0.996443051,
+       -0.996378125, -0.996312612, -0.996246513, -0.996179829, -0.996112558,
+       -0.996044701, -0.995976258, -0.995907229, -0.995837615, -0.995767414,
+       -0.995696628, -0.995625256, -0.995553299, -0.995480755, -0.995407627,
+       -0.995333912, -0.995259612, -0.995184727, -0.995109256, -0.995033199,
+       -0.994956558, -0.994879331, -0.994801519, -0.994723121, -0.994644138,
+       -0.994564571, -0.994484418, -0.994403680, -0.994322357, -0.994240449,
+       -0.994157957, -0.994074879, -0.993991217, -0.993906970, -0.993822138,
+       -0.993736722, -0.993650721, -0.993564136, -0.993476966, -0.993389211,
+       -0.993300872, -0.993211949, -0.993122442, -0.993032350, -0.992941674,
+       -0.992850414, -0.992758570, -0.992666142, -0.992573130, -0.992479535,
+       -0.992385355, -0.992290591, -0.992195244, -0.992099313, -0.992002799,
+       -0.991905700, -0.991808019, -0.991709754, -0.991610905, -0.991511473,
+       -0.991411458, -0.991310860, -0.991209678, -0.991107914, -0.991005566,
+       -0.990902635, -0.990799122, -0.990695025, -0.990590346, -0.990485084,
+       -0.990379240, -0.990272812, -0.990165803, -0.990058210, -0.989950036,
+       -0.989841278, -0.989731939, -0.989622017, -0.989511514, -0.989400428,
+       -0.989288760, -0.989176510, -0.989063678, -0.988950265, -0.988836269,
+       -0.988721692, -0.988606533, -0.988490793, -0.988374471, -0.988257568,
+       -0.988140083, -0.988022017, -0.987903370, -0.987784142, -0.987664332,
+       -0.987543942, -0.987422970, -0.987301418, -0.987179285, -0.987056571,
+       -0.986933277, -0.986809402, -0.986684946, -0.986559910, -0.986434294,
+       -0.986308097, -0.986181320, -0.986053963, -0.985926026, -0.985797509,
+       -0.985668412, -0.985538735, -0.985408479, -0.985277642, -0.985146226,
+       -0.985014231, -0.984881656, -0.984748502, -0.984614768, -0.984480455,
+       -0.984345563, -0.984210092, -0.984074042, -0.983937413, -0.983800206,
+       -0.983662419, -0.983524054, -0.983385110, -0.983245588, -0.983105487,
+       -0.982964808, -0.982823551, -0.982681716, -0.982539302, -0.982396311,
+       -0.982252741, -0.982108594, -0.981963869, -0.981818566, -0.981672686,
+       -0.981526228, -0.981379193, -0.981231581, -0.981083391, -0.980934624,
+       -0.980785280, -0.980635360, -0.980484862, -0.980333787, -0.980182136,
+       -0.980029908, -0.979877104, -0.979723723, -0.979569766, -0.979415232,
+       -0.979260123, -0.979104437, -0.978948175, -0.978791338, -0.978633924,
+       -0.978475935, -0.978317371, -0.978158231, -0.977998515, -0.977838224,
+       -0.977677358, -0.977515917, -0.977353900, -0.977191309, -0.977028143,
+       -0.976864402, -0.976700086, -0.976535196, -0.976369731, -0.976203692,
+       -0.976037079, -0.975869892, -0.975702130, -0.975533795, -0.975364885,
+       -0.975195402, -0.975025345, -0.974854715, -0.974683511, -0.974511733,
+       -0.974339383, -0.974166459, -0.973992962, -0.973818892, -0.973644250,
+       -0.973469034, -0.973293246, -0.973116885, -0.972939952, -0.972762447,
+       -0.972584369, -0.972405719, -0.972226497, -0.972046703, -0.971866337,
+       -0.971685400, -0.971503891, -0.971321810, -0.971139158, -0.970955935,
+       -0.970772141, -0.970587775, -0.970402839, -0.970217331, -0.970031253,
+       -0.969844604, -0.969657385, -0.969469595, -0.969281235, -0.969092305,
+       -0.968902805, -0.968712734, -0.968522094, -0.968330884, -0.968139105,
+       -0.967946756, -0.967753837, -0.967560349, -0.967366292, -0.967171666,
+       -0.966976471, -0.966780707, -0.966584374, -0.966387473, -0.966190003,
+       -0.965991965, -0.965793359, -0.965594184, -0.965394442, -0.965194131,
+       -0.964993253, -0.964791807, -0.964589793, -0.964387212, -0.964184064,
+       -0.963980348, -0.963776066, -0.963571216, -0.963365800, -0.963159817,
+       -0.962953267, -0.962746151, -0.962538468, -0.962330219, -0.962121404,
+       -0.961912023, -0.961702077, -0.961491564, -0.961280486, -0.961068842,
+       -0.960856633, -0.960643859, -0.960430519, -0.960216615, -0.960002146,
+       -0.959787112, -0.959571513, -0.959355350, -0.959138622, -0.958921331,
+       -0.958703475, -0.958485055, -0.958266071, -0.958046524, -0.957826413,
+       -0.957605739, -0.957384501, -0.957162700, -0.956940336, -0.956717409,
+       -0.956493919, -0.956269866, -0.956045251, -0.955820074, -0.955594334,
+       -0.955368032, -0.955141168, -0.954913742, -0.954685755, -0.954457206,
+       -0.954228095, -0.953998423, -0.953768190, -0.953537396, -0.953306040,
+       -0.953074124, -0.952841648, -0.952608610, -0.952375013, -0.952140855,
+       -0.951906137, -0.951670859, -0.951435021, -0.951198623, -0.950961666,
+       -0.950724150, -0.950486074, -0.950247439, -0.950008245, -0.949768492,
+       -0.949528181, -0.949287310, -0.949045882, -0.948803895, -0.948561350,
+       -0.948318247, -0.948074586, -0.947830367, -0.947585591, -0.947340257,
+       -0.947094366, -0.946847918, -0.946600913, -0.946353351, -0.946105232,
+       -0.945856557, -0.945607325, -0.945357537, -0.945107193, -0.944856293,
+       -0.944604837, -0.944352826, -0.944100258, -0.943847136, -0.943593458,
+       -0.943339225, -0.943084437, -0.942829095, -0.942573198, -0.942316746,
+       -0.942059740, -0.941802179, -0.941544065, -0.941285397, -0.941026175,
+       -0.940766400, -0.940506071, -0.940245188, -0.939983753, -0.939721765,
+       -0.939459224, -0.939196130, -0.938932484, -0.938668285, -0.938403534,
+       -0.938138231, -0.937872376, -0.937605970, -0.937339012, -0.937071502,
+       -0.936803442, -0.936534830, -0.936265667, -0.935995954, -0.935725689,
+       -0.935454875, -0.935183510, -0.934911595, -0.934639130, -0.934366115,
+       -0.934092550, -0.933818436, -0.933543773, -0.933268560, -0.932992799,
+       -0.932716488, -0.932439629, -0.932162222, -0.931884266, -0.931605761,
+       -0.931326709, -0.931047109, -0.930766961, -0.930486266, -0.930205023,
+       -0.929923233, -0.929640896, -0.929358012, -0.929074581, -0.928790604,
+       -0.928506080, -0.928221011, -0.927935395, -0.927649233, -0.927362526,
+       -0.927075273, -0.926787474, -0.926499131, -0.926210242, -0.925920809,
+       -0.925630831, -0.925340308, -0.925049241, -0.924757630, -0.924465474,
+       -0.924172775, -0.923879533, -0.923585746, -0.923291417, -0.922996544,
+       -0.922701128, -0.922405170, -0.922108669, -0.921811625, -0.921514039,
+       -0.921215911, -0.920917242, -0.920618030, -0.920318277, -0.920017982,
+       -0.919717146, -0.919415769, -0.919113852, -0.918811393, -0.918508394,
+       -0.918204855, -0.917900776, -0.917596156, -0.917290997, -0.916985298,
+       -0.916679060, -0.916372282, -0.916064966, -0.915757110, -0.915448716,
+       -0.915139783, -0.914830312, -0.914520303, -0.914209756, -0.913898671,
+       -0.913587048, -0.913274888, -0.912962190, -0.912648956, -0.912335185,
+       -0.912020877, -0.911706032, -0.911390651, -0.911074734, -0.910758281,
+       -0.910441292, -0.910123768, -0.909805708, -0.909487113, -0.909167983,
+       -0.908848318, -0.908528119, -0.908207385, -0.907886116, -0.907564314,
+       -0.907241978, -0.906919108, -0.906595705, -0.906271768, -0.905947298,
+       -0.905622295, -0.905296759, -0.904970691, -0.904644091, -0.904316958,
+       -0.903989293, -0.903661097, -0.903332368, -0.903003109, -0.902673318,
+       -0.902342996, -0.902012144, -0.901680761, -0.901348847, -0.901016403,
+       -0.900683429, -0.900349925, -0.900015892, -0.899681329, -0.899346237,
+       -0.899010616, -0.898674466, -0.898337787, -0.898000580, -0.897662844,
+       -0.897324581, -0.896985789, -0.896646470, -0.896306624, -0.895966250,
+       -0.895625349, -0.895283921, -0.894941967, -0.894599486, -0.894256478,
+       -0.893912945, -0.893568886, -0.893224301, -0.892879191, -0.892533555,
+       -0.892187395, -0.891840709, -0.891493499, -0.891145765, -0.890797506,
+       -0.890448723, -0.890099417, -0.889749586, -0.889399233, -0.889048356,
+       -0.888696956, -0.888345033, -0.887992588, -0.887639620, -0.887286131,
+       -0.886932119, -0.886577585, -0.886222530, -0.885866954, -0.885510856,
+       -0.885154238, -0.884797098, -0.884439439, -0.884081259, -0.883722559,
+       -0.883363339, -0.883003599, -0.882643340, -0.882282562, -0.881921264,
+       -0.881559448, -0.881197113, -0.880834260, -0.880470889, -0.880107000,
+       -0.879742593, -0.879377668, -0.879012226, -0.878646267, -0.878279792,
+       -0.877912799, -0.877545290, -0.877177265, -0.876808724, -0.876439667,
+       -0.876070094, -0.875700006, -0.875329403, -0.874958285, -0.874586652,
+       -0.874214505, -0.873841843, -0.873468668, -0.873094978, -0.872720775,
+       -0.872346059, -0.871970829, -0.871595087, -0.871218831, -0.870842063,
+       -0.870464783, -0.870086991, -0.869708687, -0.869329871, -0.868950544,
+       -0.868570706, -0.868190357, -0.867809497, -0.867428126, -0.867046246,
+       -0.866663855, -0.866280954, -0.865897544, -0.865513624, -0.865129195,
+       -0.864744258, -0.864358811, -0.863972856, -0.863586393, -0.863199422,
+       -0.862811943, -0.862423956, -0.862035462, -0.861646461, -0.861256953,
+       -0.860866939, -0.860476418, -0.860085390, -0.859693857, -0.859301818,
+       -0.858909274, -0.858516224, -0.858122670, -0.857728610, -0.857334046,
+       -0.856938977, -0.856543405, -0.856147328, -0.855750748, -0.855353665,
+       -0.854956078, -0.854557988, -0.854159396, -0.853760301, -0.853360704,
+       -0.852960605, -0.852560004, -0.852158902, -0.851757298, -0.851355193,
+       -0.850952587, -0.850549481, -0.850145875, -0.849741768, -0.849337161,
+       -0.848932055, -0.848526450, -0.848120345, -0.847713741, -0.847306639,
+       -0.846899038, -0.846490939, -0.846082342, -0.845673247, -0.845263655,
+       -0.844853565, -0.844442979, -0.844031895, -0.843620316, -0.843208240,
+       -0.842795668, -0.842382600, -0.841969036, -0.841554977, -0.841140424,
+       -0.840725375, -0.840309832, -0.839893794, -0.839477263, -0.839060237,
+       -0.838642718, -0.838224706, -0.837806200, -0.837387202, -0.836967711,
+       -0.836547727, -0.836127252, -0.835706284, -0.835284825, -0.834862875,
+       -0.834440433, -0.834017501, -0.833594078, -0.833170165, -0.832745761,
+       -0.832320868, -0.831895485, -0.831469612, -0.831043251, -0.830616400,
+       -0.830189061, -0.829761234, -0.829332918, -0.828904115, -0.828474824,
+       -0.828045045, -0.827614780, -0.827184027, -0.826752788, -0.826321063,
+       -0.825888851, -0.825456154, -0.825022971, -0.824589303, -0.824155149,
+       -0.823720511, -0.823285388, -0.822849781, -0.822413690, -0.821977115,
+       -0.821540057, -0.821102515, -0.820664490, -0.820225983, -0.819786992,
+       -0.819347520, -0.818907566, -0.818467130, -0.818026212, -0.817584813,
+       -0.817142933, -0.816700573, -0.816257732, -0.815814411, -0.815370610,
+       -0.814926329, -0.814481569, -0.814036330, -0.813590612, -0.813144415,
+       -0.812697740, -0.812250587, -0.811802956, -0.811354847, -0.810906261,
+       -0.810457198, -0.810007659, -0.809557642, -0.809107150, -0.808656182,
+       -0.808204737, -0.807752818, -0.807300423, -0.806847554, -0.806394209,
+       -0.805940391, -0.805486098, -0.805031331, -0.804576091, -0.804120377,
+       -0.803664191, -0.803207531, -0.802750400, -0.802292796, -0.801834719,
+       -0.801376172, -0.800917153, -0.800457662, -0.799997701, -0.799537269,
+       -0.799076367, -0.798614995, -0.798153153, -0.797690841, -0.797228060,
+       -0.796764810, -0.796301092, -0.795836905, -0.795372249, -0.794907126,
+       -0.794441536, -0.793975478, -0.793508952, -0.793041960, -0.792574502,
+       -0.792106577, -0.791638187, -0.791169330, -0.790700008, -0.790230221,
+       -0.789759970, -0.789289253, -0.788818072, -0.788346428, -0.787874319,
+       -0.787401747, -0.786928712, -0.786455214, -0.785981253, -0.785506830,
+       -0.785031944, -0.784556597, -0.784080789, -0.783604519, -0.783127788,
+       -0.782650596, -0.782172944, -0.781694832, -0.781216260, -0.780737229,
+       -0.780257738, -0.779777788, -0.779297379, -0.778816512, -0.778335187,
+       -0.777853404, -0.777371164, -0.776888466, -0.776405311, -0.775921699,
+       -0.775437631, -0.774953107, -0.774468126, -0.773982691, -0.773496799,
+       -0.773010453, -0.772523652, -0.772036397, -0.771548688, -0.771060524,
+       -0.770571907, -0.770082837, -0.769593314, -0.769103338, -0.768612909,
+       -0.768122029, -0.767630696, -0.767138912, -0.766646677, -0.766153990,
+       -0.765660853, -0.765167266, -0.764673228, -0.764178741, -0.763683804,
+       -0.763188417, -0.762692582, -0.762196298, -0.761699566, -0.761202385,
+       -0.760704757, -0.760206682, -0.759708159, -0.759209189, -0.758709773,
+       -0.758209910, -0.757709601, -0.757208847, -0.756707647, -0.756206001,
+       -0.755703911, -0.755201377, -0.754698398, -0.754194975, -0.753691109,
+       -0.753186799, -0.752682046, -0.752176850, -0.751671212, -0.751165132,
+       -0.750658610, -0.750151646, -0.749644241, -0.749136395, -0.748628108,
+       -0.748119380, -0.747610213, -0.747100606, -0.746590559, -0.746080074,
+       -0.745569149, -0.745057785, -0.744545984, -0.744033744, -0.743521067,
+       -0.743007952, -0.742494400, -0.741980412, -0.741465987, -0.740951125,
+       -0.740435828, -0.739920095, -0.739403927, -0.738887324, -0.738370287,
+       -0.737852815, -0.737334909, -0.736816569, -0.736297796, -0.735778589,
+       -0.735258950, -0.734738878, -0.734218374, -0.733697438, -0.733176071,
+       -0.732654272, -0.732132042, -0.731609381, -0.731086290, -0.730562769,
+       -0.730038818, -0.729514438, -0.728989629, -0.728464390, -0.727938724,
+       -0.727412629, -0.726886106, -0.726359155, -0.725831777, -0.725303972,
+       -0.724775741, -0.724247083, -0.723717999, -0.723188489, -0.722658554,
+       -0.722128194, -0.721597409, -0.721066199, -0.720534566, -0.720002508,
+       -0.719470027, -0.718937122, -0.718403795, -0.717870045, -0.717335873,
+       -0.716801279, -0.716266263, -0.715730825, -0.715194967, -0.714658688,
+       -0.714121988, -0.713584869, -0.713047329, -0.712509371, -0.711970993,
+       -0.711432196, -0.710892980, -0.710353347, -0.709813295, -0.709272826,
+       -0.708731940, -0.708190637, -0.707648917, -0.707106781, -0.706564229,
+       -0.706021261, -0.705477878, -0.704934080, -0.704389868, -0.703845241,
+       -0.703300199, -0.702754744, -0.702208876, -0.701662595, -0.701115901,
+       -0.700568794, -0.700021275, -0.699473345, -0.698925003, -0.698376249,
+       -0.697827085, -0.697277511, -0.696727526, -0.696177131, -0.695626327,
+       -0.695075114, -0.694523492, -0.693971461, -0.693419022, -0.692866175,
+       -0.692312920, -0.691759258, -0.691205190, -0.690650714, -0.690095832,
+       -0.689540545, -0.688984851, -0.688428753, -0.687872249, -0.687315341,
+       -0.686758028, -0.686200312, -0.685642191, -0.685083668, -0.684524741,
+       -0.683965412, -0.683405680, -0.682845546, -0.682285011, -0.681724074,
+       -0.681162736, -0.680600998, -0.680038859, -0.679476320, -0.678913381,
+       -0.678350043, -0.677786306, -0.677222170, -0.676657636, -0.676092704,
+       -0.675527374, -0.674961646, -0.674395522, -0.673829000, -0.673262083,
+       -0.672694769, -0.672127060, -0.671558955, -0.670990455, -0.670421560,
+       -0.669852271, -0.669282588, -0.668712512, -0.668142041, -0.667571178,
+       -0.666999922, -0.666428274, -0.665856234, -0.665283802, -0.664710978,
+       -0.664137764, -0.663564159, -0.662990163, -0.662415778, -0.661841002,
+       -0.661265838, -0.660690284, -0.660114342, -0.659538012, -0.658961293,
+       -0.658384187, -0.657806693, -0.657228813, -0.656650546, -0.656071892,
+       -0.655492853, -0.654913428, -0.654333618, -0.653753423, -0.653172843,
+       -0.652591879, -0.652010531, -0.651428800, -0.650846685, -0.650264187,
+       -0.649681307, -0.649098045, -0.648514401, -0.647930375, -0.647345969,
+       -0.646761181, -0.646176013, -0.645590465, -0.645004537, -0.644418229,
+       -0.643831543, -0.643244478, -0.642657034, -0.642069212, -0.641481013,
+       -0.640892436, -0.640303482, -0.639714152, -0.639124445, -0.638534362,
+       -0.637943904, -0.637353070, -0.636761861, -0.636170278, -0.635578320,
+       -0.634985989, -0.634393284, -0.633800206, -0.633206755, -0.632612932,
+       -0.632018736, -0.631424169, -0.630829230, -0.630233920, -0.629638239,
+       -0.629042188, -0.628445767, -0.627848976, -0.627251815, -0.626654286,
+       -0.626056388, -0.625458122, -0.624859488, -0.624260486, -0.623661118,
+       -0.623061382, -0.622461279, -0.621860811, -0.621259977, -0.620658777,
+       -0.620057212, -0.619455282, -0.618852988, -0.618250330, -0.617647308,
+       -0.617043923, -0.616440175, -0.615836064, -0.615231591, -0.614626756,
+       -0.614021559, -0.613416001, -0.612810082, -0.612203803, -0.611597164,
+       -0.610990165, -0.610382806, -0.609775089, -0.609167012, -0.608558578,
+       -0.607949785, -0.607340635, -0.606731127, -0.606121263, -0.605511041,
+       -0.604900464, -0.604289531, -0.603678242, -0.603066599, -0.602454600,
+       -0.601842247, -0.601229540, -0.600616479, -0.600003065, -0.599389298,
+       -0.598775179, -0.598160707, -0.597545883, -0.596930708, -0.596315182,
+       -0.595699304, -0.595083077, -0.594466499, -0.593849572, -0.593232295,
+       -0.592614669, -0.591996695, -0.591378372, -0.590759702, -0.590140684,
+       -0.589521319, -0.588901607, -0.588281548, -0.587661144, -0.587040394,
+       -0.586419298, -0.585797857, -0.585176072, -0.584553943, -0.583931470,
+       -0.583308653, -0.582685493, -0.582061990, -0.581438145, -0.580813958,
+       -0.580189429, -0.579564559, -0.578939348, -0.578313796, -0.577687905,
+       -0.577061673, -0.576435102, -0.575808191, -0.575180942, -0.574553355,
+       -0.573925430, -0.573297167, -0.572668566, -0.572039629, -0.571410356,
+       -0.570780746, -0.570150800, -0.569520519, -0.568889903, -0.568258953,
+       -0.567627668, -0.566996049, -0.566364096, -0.565731811, -0.565099192,
+       -0.564466242, -0.563832959, -0.563199344, -0.562565398, -0.561931121,
+       -0.561296514, -0.560661576, -0.560026309, -0.559390712, -0.558754786,
+       -0.558118531, -0.557481948, -0.556845037, -0.556207799, -0.555570233,
+       -0.554932340, -0.554294121, -0.553655576, -0.553016706, -0.552377509,
+       -0.551737988, -0.551098143, -0.550457973, -0.549817479, -0.549176662,
+       -0.548535522, -0.547894059, -0.547252274, -0.546610167, -0.545967738,
+       -0.545324988, -0.544681918, -0.544038527, -0.543394816, -0.542750785,
+       -0.542106435, -0.541461766, -0.540816778, -0.540171473, -0.539525849,
+       -0.538879909, -0.538233651, -0.537587076, -0.536940186, -0.536292979,
+       -0.535645457, -0.534997620, -0.534349468, -0.533701002, -0.533052222,
+       -0.532403128, -0.531753721, -0.531104001, -0.530453969, -0.529803625,
+       -0.529152969, -0.528502002, -0.527850723, -0.527199135, -0.526547236,
+       -0.525895027, -0.525242510, -0.524589683, -0.523936547, -0.523283103,
+       -0.522629352, -0.521975293, -0.521320927, -0.520666254, -0.520011275,
+       -0.519355990, -0.518700400, -0.518044504, -0.517388304, -0.516731799,
+       -0.516074990, -0.515417878, -0.514760463, -0.514102744, -0.513444723,
+       -0.512786401, -0.512127776, -0.511468850, -0.510809624, -0.510150097,
+       -0.509490269, -0.508830143, -0.508169716, -0.507508991, -0.506847967,
+       -0.506186645, -0.505525026, -0.504863109, -0.504200894, -0.503538384,
+       -0.502875577, -0.502212474, -0.501549076, -0.500885383, -0.500221395,
+       -0.499557113, -0.498892537, -0.498227667, -0.497562504, -0.496897049,
+       -0.496231301, -0.495565262, -0.494898931, -0.494232309, -0.493565396,
+       -0.492898192, -0.492230699, -0.491562916, -0.490894844, -0.490226483,
+       -0.489557834, -0.488888897, -0.488219672, -0.487550160, -0.486880361,
+       -0.486210276, -0.485539905, -0.484869248, -0.484198306, -0.483527079,
+       -0.482855568, -0.482183772, -0.481511693, -0.480839331, -0.480166685,
+       -0.479493758, -0.478820548, -0.478147056, -0.477473284, -0.476799230,
+       -0.476124896, -0.475450282, -0.474775388, -0.474100215, -0.473424763,
+       -0.472749032, -0.472073023, -0.471396737, -0.470720173, -0.470043332,
+       -0.469366215, -0.468688822, -0.468011153, -0.467333209, -0.466654990,
+       -0.465976496, -0.465297728, -0.464618686, -0.463939371, -0.463259784,
+       -0.462579923, -0.461899791, -0.461219386, -0.460538711, -0.459857765,
+       -0.459176548, -0.458495060, -0.457813304, -0.457131277, -0.456448982,
+       -0.455766419, -0.455083587, -0.454400488, -0.453717121, -0.453033487,
+       -0.452349587, -0.451665421, -0.450980989, -0.450296292, -0.449611330,
+       -0.448926103, -0.448240612, -0.447554858, -0.446868840, -0.446182560,
+       -0.445496017, -0.444809211, -0.444122145, -0.443434816, -0.442747228,
+       -0.442059378, -0.441371269, -0.440682900, -0.439994271, -0.439305384,
+       -0.438616239, -0.437926835, -0.437237174, -0.436547255, -0.435857080,
+       -0.435166648, -0.434475961, -0.433785017, -0.433093819, -0.432402366,
+       -0.431710658, -0.431018696, -0.430326481, -0.429634013, -0.428941292,
+       -0.428248319, -0.427555093, -0.426861617, -0.426167889, -0.425473910,
+       -0.424779681, -0.424085202, -0.423390474, -0.422695497, -0.422000271,
+       -0.421304797, -0.420609074, -0.419913105, -0.419216888, -0.418520425,
+       -0.417823716, -0.417126761, -0.416429560, -0.415732115, -0.415034424,
+       -0.414336490, -0.413638312, -0.412939891, -0.412241227, -0.411542320,
+       -0.410843171, -0.410143781, -0.409444149, -0.408744276, -0.408044163,
+       -0.407343810, -0.406643217, -0.405942385, -0.405241314, -0.404540005,
+       -0.403838458, -0.403136673, -0.402434651, -0.401732392, -0.401029897,
+       -0.400327166, -0.399624200, -0.398920998, -0.398217562, -0.397513892,
+       -0.396809987, -0.396105850, -0.395401479, -0.394696876, -0.393992040,
+       -0.393286973, -0.392581674, -0.391876144, -0.391170384, -0.390464394,
+       -0.389758174, -0.389051725, -0.388345047, -0.387638140, -0.386931006,
+       -0.386223643, -0.385516054, -0.384808238, -0.384100195, -0.383391926,
+       -0.382683432, -0.381974713, -0.381265769, -0.380556601, -0.379847209,
+       -0.379137593, -0.378427755, -0.377717694, -0.377007410, -0.376296905,
+       -0.375586178, -0.374875231, -0.374164063, -0.373452675, -0.372741067,
+       -0.372029240, -0.371317194, -0.370604930, -0.369892447, -0.369179747,
+       -0.368466830, -0.367753696, -0.367040346, -0.366326780, -0.365612998,
+       -0.364899001, -0.364184790, -0.363470364, -0.362755724, -0.362040871,
+       -0.361325806, -0.360610527, -0.359895037, -0.359179334, -0.358463421,
+       -0.357747296, -0.357030961, -0.356314416, -0.355597662, -0.354880698,
+       -0.354163525, -0.353446145, -0.352728556, -0.352010759, -0.351292756,
+       -0.350574546, -0.349856130, -0.349137508, -0.348418680, -0.347699648,
+       -0.346980411, -0.346260970, -0.345541325, -0.344821477, -0.344101426,
+       -0.343381173, -0.342660717, -0.341940060, -0.341219202, -0.340498144,
+       -0.339776884, -0.339055425, -0.338333767, -0.337611909, -0.336889853,
+       -0.336167599, -0.335445147, -0.334722498, -0.333999651, -0.333276609,
+       -0.332553370, -0.331829935, -0.331106306, -0.330382481, -0.329658463,
+       -0.328934250, -0.328209844, -0.327485244, -0.326760452, -0.326035468,
+       -0.325310292, -0.324584925, -0.323859367, -0.323133618, -0.322407679,
+       -0.321681550, -0.320955232, -0.320228726, -0.319502031, -0.318775148,
+       -0.318048077, -0.317320820, -0.316593376, -0.315865745, -0.315137929,
+       -0.314409927, -0.313681740, -0.312953369, -0.312224814, -0.311496075,
+       -0.310767153, -0.310038048, -0.309308760, -0.308579291, -0.307849640,
+       -0.307119808, -0.306389795, -0.305659602, -0.304929230, -0.304198678,
+       -0.303467947, -0.302737037, -0.302005949, -0.301274684, -0.300543241,
+       -0.299811622, -0.299079826, -0.298347855, -0.297615707, -0.296883385,
+       -0.296150888, -0.295418217, -0.294685372, -0.293952354, -0.293219163,
+       -0.292485799, -0.291752263, -0.291018556, -0.290284677, -0.289550628,
+       -0.288816408, -0.288082019, -0.287347460, -0.286612731, -0.285877835,
+       -0.285142770, -0.284407537, -0.283672137, -0.282936570, -0.282200837,
+       -0.281464938, -0.280728873, -0.279992643, -0.279256248, -0.278519689,
+       -0.277782967, -0.277046080, -0.276309031, -0.275571819, -0.274834445,
+       -0.274096910, -0.273359213, -0.272621355, -0.271883337, -0.271145160,
+       -0.270406822, -0.269668326, -0.268929670, -0.268190857, -0.267451886,
+       -0.266712757, -0.265973472, -0.265234030, -0.264494432, -0.263754679,
+       -0.263014770, -0.262274707, -0.261534489, -0.260794118, -0.260053593,
+       -0.259312915, -0.258572085, -0.257831102, -0.257089968, -0.256348682,
+       -0.255607246, -0.254865660, -0.254123923, -0.253382037, -0.252640002,
+       -0.251897818, -0.251155486, -0.250413007, -0.249670380, -0.248927606,
+       -0.248184685, -0.247441619, -0.246698407, -0.245955050, -0.245211549,
+       -0.244467903, -0.243724113, -0.242980180, -0.242236104, -0.241491885,
+       -0.240747525, -0.240003022, -0.239258379, -0.238513595, -0.237768670,
+       -0.237023606, -0.236278402, -0.235533059, -0.234787578, -0.234041959,
+       -0.233296201, -0.232550307, -0.231804276, -0.231058108, -0.230311805,
+       -0.229565366, -0.228818792, -0.228072083, -0.227325240, -0.226578264,
+       -0.225831154, -0.225083911, -0.224336536, -0.223589029, -0.222841391,
+       -0.222093621, -0.221345721, -0.220597690, -0.219849530, -0.219101240,
+       -0.218352822, -0.217604275, -0.216855600, -0.216106797, -0.215357867,
+       -0.214608811, -0.213859628, -0.213110320, -0.212360886, -0.211611327,
+       -0.210861644, -0.210111837, -0.209361906, -0.208611852, -0.207861675,
+       -0.207111376, -0.206360955, -0.205610413, -0.204859750, -0.204108966,
+       -0.203358062, -0.202607039, -0.201855896, -0.201104635, -0.200353255,
+       -0.199601758, -0.198850143, -0.198098411, -0.197346562, -0.196594598,
+       -0.195842517, -0.195090322, -0.194338012, -0.193585587, -0.192833049,
+       -0.192080397, -0.191327632, -0.190574755, -0.189821765, -0.189068664,
+       -0.188315452, -0.187562129, -0.186808695, -0.186055152, -0.185301499,
+       -0.184547737, -0.183793867, -0.183039888, -0.182285802, -0.181531608,
+       -0.180777308, -0.180022901, -0.179268389, -0.178513771, -0.177759048,
+       -0.177004220, -0.176249289, -0.175494253, -0.174739115, -0.173983873,
+       -0.173228530, -0.172473084, -0.171717537, -0.170961889, -0.170206140,
+       -0.169450291, -0.168694343, -0.167938295, -0.167182148, -0.166425904,
+       -0.165669561, -0.164913120, -0.164156583, -0.163399949, -0.162643219,
+       -0.161886394, -0.161129473, -0.160372457, -0.159615347, -0.158858143,
+       -0.158100846, -0.157343456, -0.156585973, -0.155828398, -0.155070731,
+       -0.154312973, -0.153555124, -0.152797185, -0.152039156, -0.151281038,
+       -0.150522831, -0.149764535, -0.149006151, -0.148247679, -0.147489120,
+       -0.146730474, -0.145971742, -0.145212925, -0.144454021, -0.143695033,
+       -0.142935960, -0.142176804, -0.141417563, -0.140658239, -0.139898833,
+       -0.139139344, -0.138379774, -0.137620122, -0.136860389, -0.136100575,
+       -0.135340682, -0.134580709, -0.133820656, -0.133060525, -0.132300316,
+       -0.131540029, -0.130779664, -0.130019223, -0.129258705, -0.128498111,
+       -0.127737441, -0.126976696, -0.126215877, -0.125454983, -0.124694016,
+       -0.123932975, -0.123171861, -0.122410675, -0.121649417, -0.120888087,
+       -0.120126686, -0.119365215, -0.118603673, -0.117842062, -0.117080381,
+       -0.116318631, -0.115556813, -0.114794927, -0.114032973, -0.113270952,
+       -0.112508865, -0.111746711, -0.110984492, -0.110222207, -0.109459858,
+       -0.108697444, -0.107934966, -0.107172425, -0.106409821, -0.105647154,
+       -0.104884425, -0.104121634, -0.103358782, -0.102595869, -0.101832896,
+       -0.101069863, -0.100306770, -0.099543619, -0.098780409, -0.098017140,
+       -0.097253814, -0.096490431, -0.095726992, -0.094963495, -0.094199943,
+       -0.093436336, -0.092672673, -0.091908956, -0.091145185, -0.090381361,
+       -0.089617483, -0.088853553, -0.088089570, -0.087325535, -0.086561449,
+       -0.085797312, -0.085033125, -0.084268888, -0.083504601, -0.082740265,
+       -0.081975880, -0.081211447, -0.080446966, -0.079682438, -0.078917863,
+       -0.078153242, -0.077388574, -0.076623861, -0.075859103, -0.075094301,
+       -0.074329454, -0.073564564, -0.072799630, -0.072034653, -0.071269634,
+       -0.070504573, -0.069739471, -0.068974328, -0.068209144, -0.067443920,
+       -0.066678656, -0.065913353, -0.065148011, -0.064382631, -0.063617213,
+       -0.062851758, -0.062086265, -0.061320736, -0.060555171, -0.059789571,
+       -0.059023935, -0.058258265, -0.057492560, -0.056726821, -0.055961049,
+       -0.055195244, -0.054429407, -0.053663538, -0.052897637, -0.052131705,
+       -0.051365742, -0.050599749, -0.049833726, -0.049067674, -0.048301593,
+       -0.047535484, -0.046769347, -0.046003182, -0.045236990, -0.044470772,
+       -0.043704527, -0.042938257, -0.042171961, -0.041405641, -0.040639296,
+       -0.039872928, -0.039106535, -0.038340120, -0.037573683, -0.036807223,
+       -0.036040742, -0.035274239, -0.034507716, -0.033741172, -0.032974608,
+       -0.032208025, -0.031441424, -0.030674803, -0.029908165, -0.029141509,
+       -0.028374836, -0.027608146, -0.026841440, -0.026074718, -0.025307981,
+       -0.024541229, -0.023774462, -0.023007681, -0.022240887, -0.021474080,
+       -0.020707261, -0.019940429, -0.019173585, -0.018406730, -0.017639864,
+       -0.016872988, -0.016106102, -0.015339206, -0.014572302, -0.013805389,
+       -0.013038467, -0.012271538, -0.011504602, -0.010737659, -0.009970710,
+       -0.009203755, -0.008436794, -0.007669829, -0.006902859, -0.006135885,
+       -0.005368907, -0.004601926, -0.003834943, -0.003067957, -0.002300969,
+       -0.001533980, -0.000766990,
+}; // END of _fastangle_sin_table_13[8192]
+
+static const int _fastangle_asin_table_13[8192] =
+{
+       -2047, -2018, -2006, -1997, -1989, -1983, -1976, -1971, -1965, -1961,
+       -1956, -1951, -1947, -1943, -1939, -1935, -1932, -1928, -1925, -1921,
+       -1918, -1915, -1912, -1909, -1906, -1903, -1900, -1897, -1894, -1892,
+       -1889, -1886, -1884, -1881, -1879, -1876, -1874, -1872, -1869, -1867,
+       -1865, -1862, -1860, -1858, -1856, -1854, -1851, -1849, -1847, -1845,
+       -1843, -1841, -1839, -1837, -1835, -1833, -1831, -1829, -1827, -1825,
+       -1824, -1822, -1820, -1818, -1816, -1814, -1813, -1811, -1809, -1807,
+       -1806, -1804, -1802, -1800, -1799, -1797, -1795, -1794, -1792, -1791,
+       -1789, -1787, -1786, -1784, -1782, -1781, -1779, -1778, -1776, -1775,
+       -1773, -1772, -1770, -1769, -1767, -1766, -1764, -1763, -1761, -1760,
+       -1758, -1757, -1755, -1754, -1753, -1751, -1750, -1748, -1747, -1746,
+       -1744, -1743, -1741, -1740, -1739, -1737, -1736, -1735, -1733, -1732,
+       -1731, -1729, -1728, -1727, -1725, -1724, -1723, -1721, -1720, -1719,
+       -1718, -1716, -1715, -1714, -1713, -1711, -1710, -1709, -1708, -1706,
+       -1705, -1704, -1703, -1701, -1700, -1699, -1698, -1697, -1695, -1694,
+       -1693, -1692, -1691, -1689, -1688, -1687, -1686, -1685, -1684, -1683,
+       -1681, -1680, -1679, -1678, -1677, -1676, -1675, -1673, -1672, -1671,
+       -1670, -1669, -1668, -1667, -1666, -1664, -1663, -1662, -1661, -1660,
+       -1659, -1658, -1657, -1656, -1655, -1654, -1653, -1651, -1650, -1649,
+       -1648, -1647, -1646, -1645, -1644, -1643, -1642, -1641, -1640, -1639,
+       -1638, -1637, -1636, -1635, -1634, -1633, -1632, -1631, -1630, -1629,
+       -1628, -1627, -1626, -1625, -1624, -1623, -1622, -1621, -1620, -1619,
+       -1618, -1617, -1616, -1615, -1614, -1613, -1612, -1611, -1610, -1609,
+       -1608, -1607, -1606, -1605, -1604, -1603, -1602, -1601, -1600, -1599,
+       -1598, -1597, -1597, -1596, -1595, -1594, -1593, -1592, -1591, -1590,
+       -1589, -1588, -1587, -1586, -1585, -1584, -1584, -1583, -1582, -1581,
+       -1580, -1579, -1578, -1577, -1576, -1575, -1575, -1574, -1573, -1572,
+       -1571, -1570, -1569, -1568, -1567, -1566, -1566, -1565, -1564, -1563,
+       -1562, -1561, -1560, -1559, -1559, -1558, -1557, -1556, -1555, -1554,
+       -1553, -1553, -1552, -1551, -1550, -1549, -1548, -1547, -1547, -1546,
+       -1545, -1544, -1543, -1542, -1541, -1541, -1540, -1539, -1538, -1537,
+       -1536, -1536, -1535, -1534, -1533, -1532, -1531, -1531, -1530, -1529,
+       -1528, -1527, -1527, -1526, -1525, -1524, -1523, -1522, -1522, -1521,
+       -1520, -1519, -1518, -1518, -1517, -1516, -1515, -1514, -1514, -1513,
+       -1512, -1511, -1510, -1510, -1509, -1508, -1507, -1506, -1506, -1505,
+       -1504, -1503, -1502, -1502, -1501, -1500, -1499, -1499, -1498, -1497,
+       -1496, -1495, -1495, -1494, -1493, -1492, -1492, -1491, -1490, -1489,
+       -1489, -1488, -1487, -1486, -1485, -1485, -1484, -1483, -1482, -1482,
+       -1481, -1480, -1479, -1479, -1478, -1477, -1476, -1476, -1475, -1474,
+       -1473, -1473, -1472, -1471, -1470, -1470, -1469, -1468, -1467, -1467,
+       -1466, -1465, -1464, -1464, -1463, -1462, -1462, -1461, -1460, -1459,
+       -1459, -1458, -1457, -1456, -1456, -1455, -1454, -1454, -1453, -1452,
+       -1451, -1451, -1450, -1449, -1448, -1448, -1447, -1446, -1446, -1445,
+       -1444, -1443, -1443, -1442, -1441, -1441, -1440, -1439, -1439, -1438,
+       -1437, -1436, -1436, -1435, -1434, -1434, -1433, -1432, -1431, -1431,
+       -1430, -1429, -1429, -1428, -1427, -1427, -1426, -1425, -1425, -1424,
+       -1423, -1422, -1422, -1421, -1420, -1420, -1419, -1418, -1418, -1417,
+       -1416, -1416, -1415, -1414, -1414, -1413, -1412, -1411, -1411, -1410,
+       -1409, -1409, -1408, -1407, -1407, -1406, -1405, -1405, -1404, -1403,
+       -1403, -1402, -1401, -1401, -1400, -1399, -1399, -1398, -1397, -1397,
+       -1396, -1395, -1395, -1394, -1393, -1393, -1392, -1391, -1391, -1390,
+       -1389, -1389, -1388, -1387, -1387, -1386, -1385, -1385, -1384, -1383,
+       -1383, -1382, -1382, -1381, -1380, -1380, -1379, -1378, -1378, -1377,
+       -1376, -1376, -1375, -1374, -1374, -1373, -1372, -1372, -1371, -1371,
+       -1370, -1369, -1369, -1368, -1367, -1367, -1366, -1365, -1365, -1364,
+       -1364, -1363, -1362, -1362, -1361, -1360, -1360, -1359, -1358, -1358,
+       -1357, -1357, -1356, -1355, -1355, -1354, -1353, -1353, -1352, -1352,
+       -1351, -1350, -1350, -1349, -1348, -1348, -1347, -1347, -1346, -1345,
+       -1345, -1344, -1343, -1343, -1342, -1342, -1341, -1340, -1340, -1339,
+       -1338, -1338, -1337, -1337, -1336, -1335, -1335, -1334, -1334, -1333,
+       -1332, -1332, -1331, -1331, -1330, -1329, -1329, -1328, -1327, -1327,
+       -1326, -1326, -1325, -1324, -1324, -1323, -1323, -1322, -1321, -1321,
+       -1320, -1320, -1319, -1318, -1318, -1317, -1317, -1316, -1315, -1315,
+       -1314, -1314, -1313, -1312, -1312, -1311, -1311, -1310, -1309, -1309,
+       -1308, -1308, -1307, -1306, -1306, -1305, -1305, -1304, -1304, -1303,
+       -1302, -1302, -1301, -1301, -1300, -1299, -1299, -1298, -1298, -1297,
+       -1296, -1296, -1295, -1295, -1294, -1294, -1293, -1292, -1292, -1291,
+       -1291, -1290, -1290, -1289, -1288, -1288, -1287, -1287, -1286, -1285,
+       -1285, -1284, -1284, -1283, -1283, -1282, -1281, -1281, -1280, -1280,
+       -1279, -1279, -1278, -1277, -1277, -1276, -1276, -1275, -1275, -1274,
+       -1273, -1273, -1272, -1272, -1271, -1271, -1270, -1269, -1269, -1268,
+       -1268, -1267, -1267, -1266, -1265, -1265, -1264, -1264, -1263, -1263,
+       -1262, -1262, -1261, -1260, -1260, -1259, -1259, -1258, -1258, -1257,
+       -1256, -1256, -1255, -1255, -1254, -1254, -1253, -1253, -1252, -1251,
+       -1251, -1250, -1250, -1249, -1249, -1248, -1248, -1247, -1246, -1246,
+       -1245, -1245, -1244, -1244, -1243, -1243, -1242, -1242, -1241, -1240,
+       -1240, -1239, -1239, -1238, -1238, -1237, -1237, -1236, -1236, -1235,
+       -1234, -1234, -1233, -1233, -1232, -1232, -1231, -1231, -1230, -1230,
+       -1229, -1228, -1228, -1227, -1227, -1226, -1226, -1225, -1225, -1224,
+       -1224, -1223, -1222, -1222, -1221, -1221, -1220, -1220, -1219, -1219,
+       -1218, -1218, -1217, -1217, -1216, -1216, -1215, -1214, -1214, -1213,
+       -1213, -1212, -1212, -1211, -1211, -1210, -1210, -1209, -1209, -1208,
+       -1208, -1207, -1206, -1206, -1205, -1205, -1204, -1204, -1203, -1203,
+       -1202, -1202, -1201, -1201, -1200, -1200, -1199, -1199, -1198, -1198,
+       -1197, -1196, -1196, -1195, -1195, -1194, -1194, -1193, -1193, -1192,
+       -1192, -1191, -1191, -1190, -1190, -1189, -1189, -1188, -1188, -1187,
+       -1187, -1186, -1186, -1185, -1184, -1184, -1183, -1183, -1182, -1182,
+       -1181, -1181, -1180, -1180, -1179, -1179, -1178, -1178, -1177, -1177,
+       -1176, -1176, -1175, -1175, -1174, -1174, -1173, -1173, -1172, -1172,
+       -1171, -1171, -1170, -1170, -1169, -1169, -1168, -1168, -1167, -1166,
+       -1166, -1165, -1165, -1164, -1164, -1163, -1163, -1162, -1162, -1161,
+       -1161, -1160, -1160, -1159, -1159, -1158, -1158, -1157, -1157, -1156,
+       -1156, -1155, -1155, -1154, -1154, -1153, -1153, -1152, -1152, -1151,
+       -1151, -1150, -1150, -1149, -1149, -1148, -1148, -1147, -1147, -1146,
+       -1146, -1145, -1145, -1144, -1144, -1143, -1143, -1142, -1142, -1141,
+       -1141, -1140, -1140, -1139, -1139, -1138, -1138, -1137, -1137, -1136,
+       -1136, -1135, -1135, -1134, -1134, -1133, -1133, -1132, -1132, -1131,
+       -1131, -1130, -1130, -1129, -1129, -1128, -1128, -1127, -1127, -1127,
+       -1126, -1126, -1125, -1125, -1124, -1124, -1123, -1123, -1122, -1122,
+       -1121, -1121, -1120, -1120, -1119, -1119, -1118, -1118, -1117, -1117,
+       -1116, -1116, -1115, -1115, -1114, -1114, -1113, -1113, -1112, -1112,
+       -1111, -1111, -1110, -1110, -1109, -1109, -1108, -1108, -1108, -1107,
+       -1107, -1106, -1106, -1105, -1105, -1104, -1104, -1103, -1103, -1102,
+       -1102, -1101, -1101, -1100, -1100, -1099, -1099, -1098, -1098, -1097,
+       -1097, -1096, -1096, -1096, -1095, -1095, -1094, -1094, -1093, -1093,
+       -1092, -1092, -1091, -1091, -1090, -1090, -1089, -1089, -1088, -1088,
+       -1087, -1087, -1086, -1086, -1086, -1085, -1085, -1084, -1084, -1083,
+       -1083, -1082, -1082, -1081, -1081, -1080, -1080, -1079, -1079, -1078,
+       -1078, -1078, -1077, -1077, -1076, -1076, -1075, -1075, -1074, -1074,
+       -1073, -1073, -1072, -1072, -1071, -1071, -1070, -1070, -1070, -1069,
+       -1069, -1068, -1068, -1067, -1067, -1066, -1066, -1065, -1065, -1064,
+       -1064, -1063, -1063, -1063, -1062, -1062, -1061, -1061, -1060, -1060,
+       -1059, -1059, -1058, -1058, -1057, -1057, -1057, -1056, -1056, -1055,
+       -1055, -1054, -1054, -1053, -1053, -1052, -1052, -1051, -1051, -1051,
+       -1050, -1050, -1049, -1049, -1048, -1048, -1047, -1047, -1046, -1046,
+       -1046, -1045, -1045, -1044, -1044, -1043, -1043, -1042, -1042, -1041,
+       -1041, -1040, -1040, -1040, -1039, -1039, -1038, -1038, -1037, -1037,
+       -1036, -1036, -1035, -1035, -1035, -1034, -1034, -1033, -1033, -1032,
+       -1032, -1031, -1031, -1030, -1030, -1030, -1029, -1029, -1028, -1028,
+       -1027, -1027, -1026, -1026, -1025, -1025, -1025, -1024, -1024, -1023,
+       -1023, -1022, -1022, -1021, -1021, -1021, -1020, -1020, -1019, -1019,
+       -1018, -1018, -1017, -1017, -1017, -1016, -1016, -1015, -1015, -1014,
+       -1014, -1013, -1013, -1012, -1012, -1012, -1011, -1011, -1010, -1010,
+       -1009, -1009, -1008, -1008, -1008, -1007, -1007, -1006, -1006, -1005,
+       -1005, -1004, -1004, -1004, -1003, -1003, -1002, -1002, -1001, -1001,
+       -1000, -1000, -1000, -999, -999, -998, -998, -997, -997, -996,
+       -996, -996, -995, -995, -994, -994, -993, -993, -993, -992,
+       -992, -991, -991, -990, -990, -989, -989, -989, -988, -988,
+       -987, -987, -986, -986, -986, -985, -985, -984, -984, -983,
+       -983, -982, -982, -982, -981, -981, -980, -980, -979, -979,
+       -979, -978, -978, -977, -977, -976, -976, -975, -975, -975,
+       -974, -974, -973, -973, -972, -972, -972, -971, -971, -970,
+       -970, -969, -969, -969, -968, -968, -967, -967, -966, -966,
+       -966, -965, -965, -964, -964, -963, -963, -962, -962, -962,
+       -961, -961, -960, -960, -959, -959, -959, -958, -958, -957,
+       -957, -956, -956, -956, -955, -955, -954, -954, -953, -953,
+       -953, -952, -952, -951, -951, -950, -950, -950, -949, -949,
+       -948, -948, -948, -947, -947, -946, -946, -945, -945, -945,
+       -944, -944, -943, -943, -942, -942, -942, -941, -941, -940,
+       -940, -939, -939, -939, -938, -938, -937, -937, -936, -936,
+       -936, -935, -935, -934, -934, -934, -933, -933, -932, -932,
+       -931, -931, -931, -930, -930, -929, -929, -928, -928, -928,
+       -927, -927, -926, -926, -926, -925, -925, -924, -924, -923,
+       -923, -923, -922, -922, -921, -921, -920, -920, -920, -919,
+       -919, -918, -918, -918, -917, -917, -916, -916, -915, -915,
+       -915, -914, -914, -913, -913, -913, -912, -912, -911, -911,
+       -910, -910, -910, -909, -909, -908, -908, -908, -907, -907,
+       -906, -906, -905, -905, -905, -904, -904, -903, -903, -903,
+       -902, -902, -901, -901, -901, -900, -900, -899, -899, -898,
+       -898, -898, -897, -897, -896, -896, -896, -895, -895, -894,
+       -894, -893, -893, -893, -892, -892, -891, -891, -891, -890,
+       -890, -889, -889, -889, -888, -888, -887, -887, -887, -886,
+       -886, -885, -885, -884, -884, -884, -883, -883, -882, -882,
+       -882, -881, -881, -880, -880, -880, -879, -879, -878, -878,
+       -878, -877, -877, -876, -876, -875, -875, -875, -874, -874,
+       -873, -873, -873, -872, -872, -871, -871, -871, -870, -870,
+       -869, -869, -869, -868, -868, -867, -867, -867, -866, -866,
+       -865, -865, -865, -864, -864, -863, -863, -863, -862, -862,
+       -861, -861, -861, -860, -860, -859, -859, -858, -858, -858,
+       -857, -857, -856, -856, -856, -855, -855, -854, -854, -854,
+       -853, -853, -852, -852, -852, -851, -851, -850, -850, -850,
+       -849, -849, -848, -848, -848, -847, -847, -846, -846, -846,
+       -845, -845, -844, -844, -844, -843, -843, -842, -842, -842,
+       -841, -841, -840, -840, -840, -839, -839, -838, -838, -838,
+       -837, -837, -836, -836, -836, -835, -835, -834, -834, -834,
+       -833, -833, -833, -832, -832, -831, -831, -831, -830, -830,
+       -829, -829, -829, -828, -828, -827, -827, -827, -826, -826,
+       -825, -825, -825, -824, -824, -823, -823, -823, -822, -822,
+       -821, -821, -821, -820, -820, -819, -819, -819, -818, -818,
+       -818, -817, -817, -816, -816, -816, -815, -815, -814, -814,
+       -814, -813, -813, -812, -812, -812, -811, -811, -810, -810,
+       -810, -809, -809, -808, -808, -808, -807, -807, -807, -806,
+       -806, -805, -805, -805, -804, -804, -803, -803, -803, -802,
+       -802, -801, -801, -801, -800, -800, -799, -799, -799, -798,
+       -798, -798, -797, -797, -796, -796, -796, -795, -795, -794,
+       -794, -794, -793, -793, -793, -792, -792, -791, -791, -791,
+       -790, -790, -789, -789, -789, -788, -788, -787, -787, -787,
+       -786, -786, -786, -785, -785, -784, -784, -784, -783, -783,
+       -782, -782, -782, -781, -781, -781, -780, -780, -779, -779,
+       -779, -778, -778, -777, -777, -777, -776, -776, -776, -775,
+       -775, -774, -774, -774, -773, -773, -772, -772, -772, -771,
+       -771, -771, -770, -770, -769, -769, -769, -768, -768, -767,
+       -767, -767, -766, -766, -766, -765, -765, -764, -764, -764,
+       -763, -763, -762, -762, -762, -761, -761, -761, -760, -760,
+       -759, -759, -759, -758, -758, -758, -757, -757, -756, -756,
+       -756, -755, -755, -754, -754, -754, -753, -753, -753, -752,
+       -752, -751, -751, -751, -750, -750, -750, -749, -749, -748,
+       -748, -748, -747, -747, -746, -746, -746, -745, -745, -745,
+       -744, -744, -743, -743, -743, -742, -742, -742, -741, -741,
+       -740, -740, -740, -739, -739, -739, -738, -738, -737, -737,
+       -737, -736, -736, -736, -735, -735, -734, -734, -734, -733,
+       -733, -733, -732, -732, -731, -731, -731, -730, -730, -730,
+       -729, -729, -728, -728, -728, -727, -727, -727, -726, -726,
+       -725, -725, -725, -724, -724, -724, -723, -723, -722, -722,
+       -722, -721, -721, -721, -720, -720, -719, -719, -719, -718,
+       -718, -718, -717, -717, -716, -716, -716, -715, -715, -715,
+       -714, -714, -713, -713, -713, -712, -712, -712, -711, -711,
+       -710, -710, -710, -709, -709, -709, -708, -708, -707, -707,
+       -707, -706, -706, -706, -705, -705, -704, -704, -704, -703,
+       -703, -703, -702, -702, -702, -701, -701, -700, -700, -700,
+       -699, -699, -699, -698, -698, -697, -697, -697, -696, -696,
+       -696, -695, -695, -694, -694, -694, -693, -693, -693, -692,
+       -692, -692, -691, -691, -690, -690, -690, -689, -689, -689,
+       -688, -688, -687, -687, -687, -686, -686, -686, -685, -685,
+       -685, -684, -684, -683, -683, -683, -682, -682, -682, -681,
+       -681, -680, -680, -680, -679, -679, -679, -678, -678, -678,
+       -677, -677, -676, -676, -676, -675, -675, -675, -674, -674,
+       -674, -673, -673, -672, -672, -672, -671, -671, -671, -670,
+       -670, -669, -669, -669, -668, -668, -668, -667, -667, -667,
+       -666, -666, -665, -665, -665, -664, -664, -664, -663, -663,
+       -663, -662, -662, -661, -661, -661, -660, -660, -660, -659,
+       -659, -659, -658, -658, -657, -657, -657, -656, -656, -656,
+       -655, -655, -655, -654, -654, -653, -653, -653, -652, -652,
+       -652, -651, -651, -651, -650, -650, -649, -649, -649, -648,
+       -648, -648, -647, -647, -647, -646, -646, -645, -645, -645,
+       -644, -644, -644, -643, -643, -643, -642, -642, -641, -641,
+       -641, -640, -640, -640, -639, -639, -639, -638, -638, -638,
+       -637, -637, -636, -636, -636, -635, -635, -635, -634, -634,
+       -634, -633, -633, -632, -632, -632, -631, -631, -631, -630,
+       -630, -630, -629, -629, -629, -628, -628, -627, -627, -627,
+       -626, -626, -626, -625, -625, -625, -624, -624, -623, -623,
+       -623, -622, -622, -622, -621, -621, -621, -620, -620, -620,
+       -619, -619, -618, -618, -618, -617, -617, -617, -616, -616,
+       -616, -615, -615, -615, -614, -614, -613, -613, -613, -612,
+       -612, -612, -611, -611, -611, -610, -610, -610, -609, -609,
+       -608, -608, -608, -607, -607, -607, -606, -606, -606, -605,
+       -605, -605, -604, -604, -603, -603, -603, -602, -602, -602,
+       -601, -601, -601, -600, -600, -600, -599, -599, -599, -598,
+       -598, -597, -597, -597, -596, -596, -596, -595, -595, -595,
+       -594, -594, -594, -593, -593, -592, -592, -592, -591, -591,
+       -591, -590, -590, -590, -589, -589, -589, -588, -588, -588,
+       -587, -587, -586, -586, -586, -585, -585, -585, -584, -584,
+       -584, -583, -583, -583, -582, -582, -582, -581, -581, -580,
+       -580, -580, -579, -579, -579, -578, -578, -578, -577, -577,
+       -577, -576, -576, -576, -575, -575, -574, -574, -574, -573,
+       -573, -573, -572, -572, -572, -571, -571, -571, -570, -570,
+       -570, -569, -569, -568, -568, -568, -567, -567, -567, -566,
+       -566, -566, -565, -565, -565, -564, -564, -564, -563, -563,
+       -563, -562, -562, -561, -561, -561, -560, -560, -560, -559,
+       -559, -559, -558, -558, -558, -557, -557, -557, -556, -556,
+       -556, -555, -555, -554, -554, -554, -553, -553, -553, -552,
+       -552, -552, -551, -551, -551, -550, -550, -550, -549, -549,
+       -549, -548, -548, -547, -547, -547, -546, -546, -546, -545,
+       -545, -545, -544, -544, -544, -543, -543, -543, -542, -542,
+       -542, -541, -541, -541, -540, -540, -539, -539, -539, -538,
+       -538, -538, -537, -537, -537, -536, -536, -536, -535, -535,
+       -535, -534, -534, -534, -533, -533, -533, -532, -532, -531,
+       -531, -531, -530, -530, -530, -529, -529, -529, -528, -528,
+       -528, -527, -527, -527, -526, -526, -526, -525, -525, -525,
+       -524, -524, -524, -523, -523, -522, -522, -522, -521, -521,
+       -521, -520, -520, -520, -519, -519, -519, -518, -518, -518,
+       -517, -517, -517, -516, -516, -516, -515, -515, -515, -514,
+       -514, -513, -513, -513, -512, -512, -512, -511, -511, -511,
+       -510, -510, -510, -509, -509, -509, -508, -508, -508, -507,
+       -507, -507, -506, -506, -506, -505, -505, -505, -504, -504,
+       -504, -503, -503, -502, -502, -502, -501, -501, -501, -500,
+       -500, -500, -499, -499, -499, -498, -498, -498, -497, -497,
+       -497, -496, -496, -496, -495, -495, -495, -494, -494, -494,
+       -493, -493, -493, -492, -492, -491, -491, -491, -490, -490,
+       -490, -489, -489, -489, -488, -488, -488, -487, -487, -487,
+       -486, -486, -486, -485, -485, -485, -484, -484, -484, -483,
+       -483, -483, -482, -482, -482, -481, -481, -481, -480, -480,
+       -480, -479, -479, -479, -478, -478, -477, -477, -477, -476,
+       -476, -476, -475, -475, -475, -474, -474, -474, -473, -473,
+       -473, -472, -472, -472, -471, -471, -471, -470, -470, -470,
+       -469, -469, -469, -468, -468, -468, -467, -467, -467, -466,
+       -466, -466, -465, -465, -465, -464, -464, -464, -463, -463,
+       -463, -462, -462, -461, -461, -461, -460, -460, -460, -459,
+       -459, -459, -458, -458, -458, -457, -457, -457, -456, -456,
+       -456, -455, -455, -455, -454, -454, -454, -453, -453, -453,
+       -452, -452, -452, -451, -451, -451, -450, -450, -450, -449,
+       -449, -449, -448, -448, -448, -447, -447, -447, -446, -446,
+       -446, -445, -445, -445, -444, -444, -444, -443, -443, -443,
+       -442, -442, -442, -441, -441, -441, -440, -440, -439, -439,
+       -439, -438, -438, -438, -437, -437, -437, -436, -436, -436,
+       -435, -435, -435, -434, -434, -434, -433, -433, -433, -432,
+       -432, -432, -431, -431, -431, -430, -430, -430, -429, -429,
+       -429, -428, -428, -428, -427, -427, -427, -426, -426, -426,
+       -425, -425, -425, -424, -424, -424, -423, -423, -423, -422,
+       -422, -422, -421, -421, -421, -420, -420, -420, -419, -419,
+       -419, -418, -418, -418, -417, -417, -417, -416, -416, -416,
+       -415, -415, -415, -414, -414, -414, -413, -413, -413, -412,
+       -412, -412, -411, -411, -411, -410, -410, -410, -409, -409,
+       -409, -408, -408, -408, -407, -407, -407, -406, -406, -406,
+       -405, -405, -405, -404, -404, -404, -403, -403, -403, -402,
+       -402, -402, -401, -401, -401, -400, -400, -400, -399, -399,
+       -399, -398, -398, -398, -397, -397, -397, -396, -396, -396,
+       -395, -395, -395, -394, -394, -394, -393, -393, -393, -392,
+       -392, -392, -391, -391, -391, -390, -390, -390, -389, -389,
+       -389, -388, -388, -388, -387, -387, -387, -386, -386, -386,
+       -385, -385, -385, -384, -384, -384, -383, -383, -383, -382,
+       -382, -382, -381, -381, -381, -380, -380, -380, -379, -379,
+       -379, -378, -378, -378, -377, -377, -377, -376, -376, -376,
+       -375, -375, -375, -374, -374, -374, -373, -373, -373, -372,
+       -372, -372, -371, -371, -371, -370, -370, -370, -369, -369,
+       -369, -368, -368, -368, -367, -367, -367, -366, -366, -366,
+       -365, -365, -365, -364, -364, -364, -363, -363, -363, -362,
+       -362, -362, -361, -361, -361, -360, -360, -360, -359, -359,
+       -359, -358, -358, -358, -357, -357, -357, -356, -356, -356,
+       -355, -355, -355, -354, -354, -354, -353, -353, -353, -352,
+       -352, -352, -351, -351, -351, -350, -350, -350, -349, -349,
+       -349, -348, -348, -348, -347, -347, -347, -346, -346, -346,
+       -345, -345, -345, -344, -344, -344, -343, -343, -343, -342,
+       -342, -342, -341, -341, -341, -341, -340, -340, -340, -339,
+       -339, -339, -338, -338, -338, -337, -337, -337, -336, -336,
+       -336, -335, -335, -335, -334, -334, -334, -333, -333, -333,
+       -332, -332, -332, -331, -331, -331, -330, -330, -330, -329,
+       -329, -329, -328, -328, -328, -327, -327, -327, -326, -326,
+       -326, -325, -325, -325, -324, -324, -324, -323, -323, -323,
+       -322, -322, -322, -321, -321, -321, -320, -320, -320, -319,
+       -319, -319, -318, -318, -318, -317, -317, -317, -316, -316,
+       -316, -316, -315, -315, -315, -314, -314, -314, -313, -313,
+       -313, -312, -312, -312, -311, -311, -311, -310, -310, -310,
+       -309, -309, -309, -308, -308, -308, -307, -307, -307, -306,
+       -306, -306, -305, -305, -305, -304, -304, -304, -303, -303,
+       -303, -302, -302, -302, -301, -301, -301, -300, -300, -300,
+       -299, -299, -299, -298, -298, -298, -298, -297, -297, -297,
+       -296, -296, -296, -295, -295, -295, -294, -294, -294, -293,
+       -293, -293, -292, -292, -292, -291, -291, -291, -290, -290,
+       -290, -289, -289, -289, -288, -288, -288, -287, -287, -287,
+       -286, -286, -286, -285, -285, -285, -284, -284, -284, -283,
+       -283, -283, -282, -282, -282, -282, -281, -281, -281, -280,
+       -280, -280, -279, -279, -279, -278, -278, -278, -277, -277,
+       -277, -276, -276, -276, -275, -275, -275, -274, -274, -274,
+       -273, -273, -273, -272, -272, -272, -271, -271, -271, -270,
+       -270, -270, -269, -269, -269, -268, -268, -268, -268, -267,
+       -267, -267, -266, -266, -266, -265, -265, -265, -264, -264,
+       -264, -263, -263, -263, -262, -262, -262, -261, -261, -261,
+       -260, -260, -260, -259, -259, -259, -258, -258, -258, -257,
+       -257, -257, -256, -256, -256, -255, -255, -255, -255, -254,
+       -254, -254, -253, -253, -253, -252, -252, -252, -251, -251,
+       -251, -250, -250, -250, -249, -249, -249, -248, -248, -248,
+       -247, -247, -247, -246, -246, -246, -245, -245, -245, -244,
+       -244, -244, -243, -243, -243, -243, -242, -242, -242, -241,
+       -241, -241, -240, -240, -240, -239, -239, -239, -238, -238,
+       -238, -237, -237, -237, -236, -236, -236, -235, -235, -235,
+       -234, -234, -234, -233, -233, -233, -232, -232, -232, -232,
+       -231, -231, -231, -230, -230, -230, -229, -229, -229, -228,
+       -228, -228, -227, -227, -227, -226, -226, -226, -225, -225,
+       -225, -224, -224, -224, -223, -223, -223, -222, -222, -222,
+       -221, -221, -221, -221, -220, -220, -220, -219, -219, -219,
+       -218, -218, -218, -217, -217, -217, -216, -216, -216, -215,
+       -215, -215, -214, -214, -214, -213, -213, -213, -212, -212,
+       -212, -211, -211, -211, -211, -210, -210, -210, -209, -209,
+       -209, -208, -208, -208, -207, -207, -207, -206, -206, -206,
+       -205, -205, -205, -204, -204, -204, -203, -203, -203, -202,
+       -202, -202, -201, -201, -201, -201, -200, -200, -200, -199,
+       -199, -199, -198, -198, -198, -197, -197, -197, -196, -196,
+       -196, -195, -195, -195, -194, -194, -194, -193, -193, -193,
+       -192, -192, -192, -192, -191, -191, -191, -190, -190, -190,
+       -189, -189, -189, -188, -188, -188, -187, -187, -187, -186,
+       -186, -186, -185, -185, -185, -184, -184, -184, -183, -183,
+       -183, -182, -182, -182, -182, -181, -181, -181, -180, -180,
+       -180, -179, -179, -179, -178, -178, -178, -177, -177, -177,
+       -176, -176, -176, -175, -175, -175, -174, -174, -174, -173,
+       -173, -173, -173, -172, -172, -172, -171, -171, -171, -170,
+       -170, -170, -169, -169, -169, -168, -168, -168, -167, -167,
+       -167, -166, -166, -166, -165, -165, -165, -165, -164, -164,
+       -164, -163, -163, -163, -162, -162, -162, -161, -161, -161,
+       -160, -160, -160, -159, -159, -159, -158, -158, -158, -157,
+       -157, -157, -156, -156, -156, -156, -155, -155, -155, -154,
+       -154, -154, -153, -153, -153, -152, -152, -152, -151, -151,
+       -151, -150, -150, -150, -149, -149, -149, -148, -148, -148,
+       -148, -147, -147, -147, -146, -146, -146, -145, -145, -145,
+       -144, -144, -144, -143, -143, -143, -142, -142, -142, -141,
+       -141, -141, -140, -140, -140, -140, -139, -139, -139, -138,
+       -138, -138, -137, -137, -137, -136, -136, -136, -135, -135,
+       -135, -134, -134, -134, -133, -133, -133, -132, -132, -132,
+       -132, -131, -131, -131, -130, -130, -130, -129, -129, -129,
+       -128, -128, -128, -127, -127, -127, -126, -126, -126, -125,
+       -125, -125, -124, -124, -124, -124, -123, -123, -123, -122,
+       -122, -122, -121, -121, -121, -120, -120, -120, -119, -119,
+       -119, -118, -118, -118, -117, -117, -117, -116, -116, -116,
+       -116, -115, -115, -115, -114, -114, -114, -113, -113, -113,
+       -112, -112, -112, -111, -111, -111, -110, -110, -110, -109,
+       -109, -109, -108, -108, -108, -108, -107, -107, -107, -106,
+       -106, -106, -105, -105, -105, -104, -104, -104, -103, -103,
+       -103, -102, -102, -102, -101, -101, -101, -100, -100, -100,
+       -100, -99, -99, -99, -98, -98, -98, -97, -97, -97,
+       -96, -96, -96, -95, -95, -95, -94, -94, -94, -93,
+       -93, -93, -93, -92, -92, -92, -91, -91, -91, -90,
+       -90, -90, -89, -89, -89, -88, -88, -88, -87, -87,
+       -87, -86, -86, -86, -85, -85, -85, -85, -84, -84,
+       -84, -83, -83, -83, -82, -82, -82, -81, -81, -81,
+       -80, -80, -80, -79, -79, -79, -78, -78, -78, -78,
+       -77, -77, -77, -76, -76, -76, -75, -75, -75, -74,
+       -74, -74, -73, -73, -73, -72, -72, -72, -71, -71,
+       -71, -71, -70, -70, -70, -69, -69, -69, -68, -68,
+       -68, -67, -67, -67, -66, -66, -66, -65, -65, -65,
+       -64, -64, -64, -63, -63, -63, -63, -62, -62, -62,
+       -61, -61, -61, -60, -60, -60, -59, -59, -59, -58,
+       -58, -58, -57, -57, -57, -56, -56, -56, -56, -55,
+       -55, -55, -54, -54, -54, -53, -53, -53, -52, -52,
+       -52, -51, -51, -51, -50, -50, -50, -49, -49, -49,
+       -49, -48, -48, -48, -47, -47, -47, -46, -46, -46,
+       -45, -45, -45, -44, -44, -44, -43, -43, -43, -42,
+       -42, -42, -42, -41, -41, -41, -40, -40, -40, -39,
+       -39, -39, -38, -38, -38, -37, -37, -37, -36, -36,
+       -36, -35, -35, -35, -35, -34, -34, -34, -33, -33,
+       -33, -32, -32, -32, -31, -31, -31, -30, -30, -30,
+       -29, -29, -29, -28, -28, -28, -27, -27, -27, -27,
+       -26, -26, -26, -25, -25, -25, -24, -24, -24, -23,
+       -23, -23, -22, -22, -22, -21, -21, -21, -20, -20,
+       -20, -20, -19, -19, -19, -18, -18, -18, -17, -17,
+       -17, -16, -16, -16, -15, -15, -15, -14, -14, -14,
+       -13, -13, -13, -13, -12, -12, -12, -11, -11, -11,
+       -10, -10, -10, -9, -9, -9, -8, -8, -8, -7,
+       -7, -7, -6, -6, -6, -6, -5, -5, -5, -4,
+       -4, -4, -3, -3, -3, -2, -2, -2, -1, -1,
+       -1, 0, 0, 0, 0, 0, 0, 0, 1, 1,
+       1, 2, 2, 2, 3, 3, 3, 4, 4, 4,
+       5, 5, 5, 6, 6, 6, 7, 7, 7, 7,
+       8, 8, 8, 9, 9, 9, 10, 10, 10, 11,
+       11, 11, 12, 12, 12, 13, 13, 13, 14, 14,
+       14, 14, 15, 15, 15, 16, 16, 16, 17, 17,
+       17, 18, 18, 18, 19, 19, 19, 20, 20, 20,
+       21, 21, 21, 21, 22, 22, 22, 23, 23, 23,
+       24, 24, 24, 25, 25, 25, 26, 26, 26, 27,
+       27, 27, 28, 28, 28, 28, 29, 29, 29, 30,
+       30, 30, 31, 31, 31, 32, 32, 32, 33, 33,
+       33, 34, 34, 34, 35, 35, 35, 36, 36, 36,
+       36, 37, 37, 37, 38, 38, 38, 39, 39, 39,
+       40, 40, 40, 41, 41, 41, 42, 42, 42, 43,
+       43, 43, 43, 44, 44, 44, 45, 45, 45, 46,
+       46, 46, 47, 47, 47, 48, 48, 48, 49, 49,
+       49, 50, 50, 50, 50, 51, 51, 51, 52, 52,
+       52, 53, 53, 53, 54, 54, 54, 55, 55, 55,
+       56, 56, 56, 57, 57, 57, 57, 58, 58, 58,
+       59, 59, 59, 60, 60, 60, 61, 61, 61, 62,
+       62, 62, 63, 63, 63, 64, 64, 64, 64, 65,
+       65, 65, 66, 66, 66, 67, 67, 67, 68, 68,
+       68, 69, 69, 69, 70, 70, 70, 71, 71, 71,
+       72, 72, 72, 72, 73, 73, 73, 74, 74, 74,
+       75, 75, 75, 76, 76, 76, 77, 77, 77, 78,
+       78, 78, 79, 79, 79, 79, 80, 80, 80, 81,
+       81, 81, 82, 82, 82, 83, 83, 83, 84, 84,
+       84, 85, 85, 85, 86, 86, 86, 86, 87, 87,
+       87, 88, 88, 88, 89, 89, 89, 90, 90, 90,
+       91, 91, 91, 92, 92, 92, 93, 93, 93, 94,
+       94, 94, 94, 95, 95, 95, 96, 96, 96, 97,
+       97, 97, 98, 98, 98, 99, 99, 99, 100, 100,
+       100, 101, 101, 101, 101, 102, 102, 102, 103, 103,
+       103, 104, 104, 104, 105, 105, 105, 106, 106, 106,
+       107, 107, 107, 108, 108, 108, 109, 109, 109, 109,
+       110, 110, 110, 111, 111, 111, 112, 112, 112, 113,
+       113, 113, 114, 114, 114, 115, 115, 115, 116, 116,
+       116, 117, 117, 117, 117, 118, 118, 118, 119, 119,
+       119, 120, 120, 120, 121, 121, 121, 122, 122, 122,
+       123, 123, 123, 124, 124, 124, 125, 125, 125, 125,
+       126, 126, 126, 127, 127, 127, 128, 128, 128, 129,
+       129, 129, 130, 130, 130, 131, 131, 131, 132, 132,
+       132, 133, 133, 133, 133, 134, 134, 134, 135, 135,
+       135, 136, 136, 136, 137, 137, 137, 138, 138, 138,
+       139, 139, 139, 140, 140, 140, 141, 141, 141, 141,
+       142, 142, 142, 143, 143, 143, 144, 144, 144, 145,
+       145, 145, 146, 146, 146, 147, 147, 147, 148, 148,
+       148, 149, 149, 149, 149, 150, 150, 150, 151, 151,
+       151, 152, 152, 152, 153, 153, 153, 154, 154, 154,
+       155, 155, 155, 156, 156, 156, 157, 157, 157, 157,
+       158, 158, 158, 159, 159, 159, 160, 160, 160, 161,
+       161, 161, 162, 162, 162, 163, 163, 163, 164, 164,
+       164, 165, 165, 165, 166, 166, 166, 166, 167, 167,
+       167, 168, 168, 168, 169, 169, 169, 170, 170, 170,
+       171, 171, 171, 172, 172, 172, 173, 173, 173, 174,
+       174, 174, 174, 175, 175, 175, 176, 176, 176, 177,
+       177, 177, 178, 178, 178, 179, 179, 179, 180, 180,
+       180, 181, 181, 181, 182, 182, 182, 183, 183, 183,
+       183, 184, 184, 184, 185, 185, 185, 186, 186, 186,
+       187, 187, 187, 188, 188, 188, 189, 189, 189, 190,
+       190, 190, 191, 191, 191, 192, 192, 192, 193, 193,
+       193, 193, 194, 194, 194, 195, 195, 195, 196, 196,
+       196, 197, 197, 197, 198, 198, 198, 199, 199, 199,
+       200, 200, 200, 201, 201, 201, 202, 202, 202, 202,
+       203, 203, 203, 204, 204, 204, 205, 205, 205, 206,
+       206, 206, 207, 207, 207, 208, 208, 208, 209, 209,
+       209, 210, 210, 210, 211, 211, 211, 212, 212, 212,
+       212, 213, 213, 213, 214, 214, 214, 215, 215, 215,
+       216, 216, 216, 217, 217, 217, 218, 218, 218, 219,
+       219, 219, 220, 220, 220, 221, 221, 221, 222, 222,
+       222, 222, 223, 223, 223, 224, 224, 224, 225, 225,
+       225, 226, 226, 226, 227, 227, 227, 228, 228, 228,
+       229, 229, 229, 230, 230, 230, 231, 231, 231, 232,
+       232, 232, 233, 233, 233, 233, 234, 234, 234, 235,
+       235, 235, 236, 236, 236, 237, 237, 237, 238, 238,
+       238, 239, 239, 239, 240, 240, 240, 241, 241, 241,
+       242, 242, 242, 243, 243, 243, 244, 244, 244, 244,
+       245, 245, 245, 246, 246, 246, 247, 247, 247, 248,
+       248, 248, 249, 249, 249, 250, 250, 250, 251, 251,
+       251, 252, 252, 252, 253, 253, 253, 254, 254, 254,
+       255, 255, 255, 256, 256, 256, 256, 257, 257, 257,
+       258, 258, 258, 259, 259, 259, 260, 260, 260, 261,
+       261, 261, 262, 262, 262, 263, 263, 263, 264, 264,
+       264, 265, 265, 265, 266, 266, 266, 267, 267, 267,
+       268, 268, 268, 269, 269, 269, 269, 270, 270, 270,
+       271, 271, 271, 272, 272, 272, 273, 273, 273, 274,
+       274, 274, 275, 275, 275, 276, 276, 276, 277, 277,
+       277, 278, 278, 278, 279, 279, 279, 280, 280, 280,
+       281, 281, 281, 282, 282, 282, 283, 283, 283, 283,
+       284, 284, 284, 285, 285, 285, 286, 286, 286, 287,
+       287, 287, 288, 288, 288, 289, 289, 289, 290, 290,
+       290, 291, 291, 291, 292, 292, 292, 293, 293, 293,
+       294, 294, 294, 295, 295, 295, 296, 296, 296, 297,
+       297, 297, 298, 298, 298, 299, 299, 299, 299, 300,
+       300, 300, 301, 301, 301, 302, 302, 302, 303, 303,
+       303, 304, 304, 304, 305, 305, 305, 306, 306, 306,
+       307, 307, 307, 308, 308, 308, 309, 309, 309, 310,
+       310, 310, 311, 311, 311, 312, 312, 312, 313, 313,
+       313, 314, 314, 314, 315, 315, 315, 316, 316, 316,
+       317, 317, 317, 317, 318, 318, 318, 319, 319, 319,
+       320, 320, 320, 321, 321, 321, 322, 322, 322, 323,
+       323, 323, 324, 324, 324, 325, 325, 325, 326, 326,
+       326, 327, 327, 327, 328, 328, 328, 329, 329, 329,
+       330, 330, 330, 331, 331, 331, 332, 332, 332, 333,
+       333, 333, 334, 334, 334, 335, 335, 335, 336, 336,
+       336, 337, 337, 337, 338, 338, 338, 339, 339, 339,
+       340, 340, 340, 341, 341, 341, 342, 342, 342, 342,
+       343, 343, 343, 344, 344, 344, 345, 345, 345, 346,
+       346, 346, 347, 347, 347, 348, 348, 348, 349, 349,
+       349, 350, 350, 350, 351, 351, 351, 352, 352, 352,
+       353, 353, 353, 354, 354, 354, 355, 355, 355, 356,
+       356, 356, 357, 357, 357, 358, 358, 358, 359, 359,
+       359, 360, 360, 360, 361, 361, 361, 362, 362, 362,
+       363, 363, 363, 364, 364, 364, 365, 365, 365, 366,
+       366, 366, 367, 367, 367, 368, 368, 368, 369, 369,
+       369, 370, 370, 370, 371, 371, 371, 372, 372, 372,
+       373, 373, 373, 374, 374, 374, 375, 375, 375, 376,
+       376, 376, 377, 377, 377, 378, 378, 378, 379, 379,
+       379, 380, 380, 380, 381, 381, 381, 382, 382, 382,
+       383, 383, 383, 384, 384, 384, 385, 385, 385, 386,
+       386, 386, 387, 387, 387, 388, 388, 388, 389, 389,
+       389, 390, 390, 390, 391, 391, 391, 392, 392, 392,
+       393, 393, 393, 394, 394, 394, 395, 395, 395, 396,
+       396, 396, 397, 397, 397, 398, 398, 398, 399, 399,
+       399, 400, 400, 400, 401, 401, 401, 402, 402, 402,
+       403, 403, 403, 404, 404, 404, 405, 405, 405, 406,
+       406, 406, 407, 407, 407, 408, 408, 408, 409, 409,
+       409, 410, 410, 410, 411, 411, 411, 412, 412, 412,
+       413, 413, 413, 414, 414, 414, 415, 415, 415, 416,
+       416, 416, 417, 417, 417, 418, 418, 418, 419, 419,
+       419, 420, 420, 420, 421, 421, 421, 422, 422, 422,
+       423, 423, 423, 424, 424, 424, 425, 425, 425, 426,
+       426, 426, 427, 427, 427, 428, 428, 428, 429, 429,
+       429, 430, 430, 430, 431, 431, 431, 432, 432, 432,
+       433, 433, 433, 434, 434, 434, 435, 435, 435, 436,
+       436, 436, 437, 437, 437, 438, 438, 438, 439, 439,
+       439, 440, 440, 440, 441, 441, 442, 442, 442, 443,
+       443, 443, 444, 444, 444, 445, 445, 445, 446, 446,
+       446, 447, 447, 447, 448, 448, 448, 449, 449, 449,
+       450, 450, 450, 451, 451, 451, 452, 452, 452, 453,
+       453, 453, 454, 454, 454, 455, 455, 455, 456, 456,
+       456, 457, 457, 457, 458, 458, 458, 459, 459, 459,
+       460, 460, 460, 461, 461, 461, 462, 462, 462, 463,
+       463, 464, 464, 464, 465, 465, 465, 466, 466, 466,
+       467, 467, 467, 468, 468, 468, 469, 469, 469, 470,
+       470, 470, 471, 471, 471, 472, 472, 472, 473, 473,
+       473, 474, 474, 474, 475, 475, 475, 476, 476, 476,
+       477, 477, 477, 478, 478, 478, 479, 479, 480, 480,
+       480, 481, 481, 481, 482, 482, 482, 483, 483, 483,
+       484, 484, 484, 485, 485, 485, 486, 486, 486, 487,
+       487, 487, 488, 488, 488, 489, 489, 489, 490, 490,
+       490, 491, 491, 491, 492, 492, 492, 493, 493, 494,
+       494, 494, 495, 495, 495, 496, 496, 496, 497, 497,
+       497, 498, 498, 498, 499, 499, 499, 500, 500, 500,
+       501, 501, 501, 502, 502, 502, 503, 503, 503, 504,
+       504, 505, 505, 505, 506, 506, 506, 507, 507, 507,
+       508, 508, 508, 509, 509, 509, 510, 510, 510, 511,
+       511, 511, 512, 512, 512, 513, 513, 513, 514, 514,
+       514, 515, 515, 516, 516, 516, 517, 517, 517, 518,
+       518, 518, 519, 519, 519, 520, 520, 520, 521, 521,
+       521, 522, 522, 522, 523, 523, 523, 524, 524, 525,
+       525, 525, 526, 526, 526, 527, 527, 527, 528, 528,
+       528, 529, 529, 529, 530, 530, 530, 531, 531, 531,
+       532, 532, 532, 533, 533, 534, 534, 534, 535, 535,
+       535, 536, 536, 536, 537, 537, 537, 538, 538, 538,
+       539, 539, 539, 540, 540, 540, 541, 541, 542, 542,
+       542, 543, 543, 543, 544, 544, 544, 545, 545, 545,
+       546, 546, 546, 547, 547, 547, 548, 548, 548, 549,
+       549, 550, 550, 550, 551, 551, 551, 552, 552, 552,
+       553, 553, 553, 554, 554, 554, 555, 555, 555, 556,
+       556, 557, 557, 557, 558, 558, 558, 559, 559, 559,
+       560, 560, 560, 561, 561, 561, 562, 562, 562, 563,
+       563, 564, 564, 564, 565, 565, 565, 566, 566, 566,
+       567, 567, 567, 568, 568, 568, 569, 569, 569, 570,
+       570, 571, 571, 571, 572, 572, 572, 573, 573, 573,
+       574, 574, 574, 575, 575, 575, 576, 576, 577, 577,
+       577, 578, 578, 578, 579, 579, 579, 580, 580, 580,
+       581, 581, 581, 582, 582, 583, 583, 583, 584, 584,
+       584, 585, 585, 585, 586, 586, 586, 587, 587, 587,
+       588, 588, 589, 589, 589, 590, 590, 590, 591, 591,
+       591, 592, 592, 592, 593, 593, 593, 594, 594, 595,
+       595, 595, 596, 596, 596, 597, 597, 597, 598, 598,
+       598, 599, 599, 600, 600, 600, 601, 601, 601, 602,
+       602, 602, 603, 603, 603, 604, 604, 604, 605, 605,
+       606, 606, 606, 607, 607, 607, 608, 608, 608, 609,
+       609, 609, 610, 610, 611, 611, 611, 612, 612, 612,
+       613, 613, 613, 614, 614, 614, 615, 615, 616, 616,
+       616, 617, 617, 617, 618, 618, 618, 619, 619, 619,
+       620, 620, 621, 621, 621, 622, 622, 622, 623, 623,
+       623, 624, 624, 624, 625, 625, 626, 626, 626, 627,
+       627, 627, 628, 628, 628, 629, 629, 630, 630, 630,
+       631, 631, 631, 632, 632, 632, 633, 633, 633, 634,
+       634, 635, 635, 635, 636, 636, 636, 637, 637, 637,
+       638, 638, 639, 639, 639, 640, 640, 640, 641, 641,
+       641, 642, 642, 642, 643, 643, 644, 644, 644, 645,
+       645, 645, 646, 646, 646, 647, 647, 648, 648, 648,
+       649, 649, 649, 650, 650, 650, 651, 651, 652, 652,
+       652, 653, 653, 653, 654, 654, 654, 655, 655, 656,
+       656, 656, 657, 657, 657, 658, 658, 658, 659, 659,
+       660, 660, 660, 661, 661, 661, 662, 662, 662, 663,
+       663, 664, 664, 664, 665, 665, 665, 666, 666, 666,
+       667, 667, 668, 668, 668, 669, 669, 669, 670, 670,
+       670, 671, 671, 672, 672, 672, 673, 673, 673, 674,
+       674, 675, 675, 675, 676, 676, 676, 677, 677, 677,
+       678, 678, 679, 679, 679, 680, 680, 680, 681, 681,
+       681, 682, 682, 683, 683, 683, 684, 684, 684, 685,
+       685, 686, 686, 686, 687, 687, 687, 688, 688, 688,
+       689, 689, 690, 690, 690, 691, 691, 691, 692, 692,
+       693, 693, 693, 694, 694, 694, 695, 695, 695, 696,
+       696, 697, 697, 697, 698, 698, 698, 699, 699, 700,
+       700, 700, 701, 701, 701, 702, 702, 703, 703, 703,
+       704, 704, 704, 705, 705, 705, 706, 706, 707, 707,
+       707, 708, 708, 708, 709, 709, 710, 710, 710, 711,
+       711, 711, 712, 712, 713, 713, 713, 714, 714, 714,
+       715, 715, 716, 716, 716, 717, 717, 717, 718, 718,
+       719, 719, 719, 720, 720, 720, 721, 721, 722, 722,
+       722, 723, 723, 723, 724, 724, 725, 725, 725, 726,
+       726, 726, 727, 727, 728, 728, 728, 729, 729, 729,
+       730, 730, 731, 731, 731, 732, 732, 732, 733, 733,
+       734, 734, 734, 735, 735, 735, 736, 736, 737, 737,
+       737, 738, 738, 738, 739, 739, 740, 740, 740, 741,
+       741, 741, 742, 742, 743, 743, 743, 744, 744, 744,
+       745, 745, 746, 746, 746, 747, 747, 747, 748, 748,
+       749, 749, 749, 750, 750, 751, 751, 751, 752, 752,
+       752, 753, 753, 754, 754, 754, 755, 755, 755, 756,
+       756, 757, 757, 757, 758, 758, 759, 759, 759, 760,
+       760, 760, 761, 761, 762, 762, 762, 763, 763, 763,
+       764, 764, 765, 765, 765, 766, 766, 767, 767, 767,
+       768, 768, 768, 769, 769, 770, 770, 770, 771, 771,
+       772, 772, 772, 773, 773, 773, 774, 774, 775, 775,
+       775, 776, 776, 777, 777, 777, 778, 778, 778, 779,
+       779, 780, 780, 780, 781, 781, 782, 782, 782, 783,
+       783, 783, 784, 784, 785, 785, 785, 786, 786, 787,
+       787, 787, 788, 788, 788, 789, 789, 790, 790, 790,
+       791, 791, 792, 792, 792, 793, 793, 794, 794, 794,
+       795, 795, 795, 796, 796, 797, 797, 797, 798, 798,
+       799, 799, 799, 800, 800, 800, 801, 801, 802, 802,
+       802, 803, 803, 804, 804, 804, 805, 805, 806, 806,
+       806, 807, 807, 808, 808, 808, 809, 809, 809, 810,
+       810, 811, 811, 811, 812, 812, 813, 813, 813, 814,
+       814, 815, 815, 815, 816, 816, 817, 817, 817, 818,
+       818, 819, 819, 819, 820, 820, 820, 821, 821, 822,
+       822, 822, 823, 823, 824, 824, 824, 825, 825, 826,
+       826, 826, 827, 827, 828, 828, 828, 829, 829, 830,
+       830, 830, 831, 831, 832, 832, 832, 833, 833, 834,
+       834, 834, 835, 835, 835, 836, 836, 837, 837, 837,
+       838, 838, 839, 839, 839, 840, 840, 841, 841, 841,
+       842, 842, 843, 843, 843, 844, 844, 845, 845, 845,
+       846, 846, 847, 847, 847, 848, 848, 849, 849, 849,
+       850, 850, 851, 851, 851, 852, 852, 853, 853, 853,
+       854, 854, 855, 855, 855, 856, 856, 857, 857, 857,
+       858, 858, 859, 859, 859, 860, 860, 861, 861, 862,
+       862, 862, 863, 863, 864, 864, 864, 865, 865, 866,
+       866, 866, 867, 867, 868, 868, 868, 869, 869, 870,
+       870, 870, 871, 871, 872, 872, 872, 873, 873, 874,
+       874, 874, 875, 875, 876, 876, 876, 877, 877, 878,
+       878, 879, 879, 879, 880, 880, 881, 881, 881, 882,
+       882, 883, 883, 883, 884, 884, 885, 885, 885, 886,
+       886, 887, 887, 888, 888, 888, 889, 889, 890, 890,
+       890, 891, 891, 892, 892, 892, 893, 893, 894, 894,
+       894, 895, 895, 896, 896, 897, 897, 897, 898, 898,
+       899, 899, 899, 900, 900, 901, 901, 902, 902, 902,
+       903, 903, 904, 904, 904, 905, 905, 906, 906, 906,
+       907, 907, 908, 908, 909, 909, 909, 910, 910, 911,
+       911, 911, 912, 912, 913, 913, 914, 914, 914, 915,
+       915, 916, 916, 916, 917, 917, 918, 918, 919, 919,
+       919, 920, 920, 921, 921, 921, 922, 922, 923, 923,
+       924, 924, 924, 925, 925, 926, 926, 927, 927, 927,
+       928, 928, 929, 929, 929, 930, 930, 931, 931, 932,
+       932, 932, 933, 933, 934, 934, 935, 935, 935, 936,
+       936, 937, 937, 937, 938, 938, 939, 939, 940, 940,
+       940, 941, 941, 942, 942, 943, 943, 943, 944, 944,
+       945, 945, 946, 946, 946, 947, 947, 948, 948, 949,
+       949, 949, 950, 950, 951, 951, 951, 952, 952, 953,
+       953, 954, 954, 954, 955, 955, 956, 956, 957, 957,
+       957, 958, 958, 959, 959, 960, 960, 960, 961, 961,
+       962, 962, 963, 963, 963, 964, 964, 965, 965, 966,
+       966, 967, 967, 967, 968, 968, 969, 969, 970, 970,
+       970, 971, 971, 972, 972, 973, 973, 973, 974, 974,
+       975, 975, 976, 976, 976, 977, 977, 978, 978, 979,
+       979, 980, 980, 980, 981, 981, 982, 982, 983, 983,
+       983, 984, 984, 985, 985, 986, 986, 987, 987, 987,
+       988, 988, 989, 989, 990, 990, 990, 991, 991, 992,
+       992, 993, 993, 994, 994, 994, 995, 995, 996, 996,
+       997, 997, 997, 998, 998, 999, 999, 1000, 1000, 1001,
+       1001, 1001, 1002, 1002, 1003, 1003, 1004, 1004, 1005, 1005,
+       1005, 1006, 1006, 1007, 1007, 1008, 1008, 1009, 1009, 1009,
+       1010, 1010, 1011, 1011, 1012, 1012, 1013, 1013, 1013, 1014,
+       1014, 1015, 1015, 1016, 1016, 1017, 1017, 1018, 1018, 1018,
+       1019, 1019, 1020, 1020, 1021, 1021, 1022, 1022, 1022, 1023,
+       1023, 1024, 1024, 1025, 1025, 1026, 1026, 1026, 1027, 1027,
+       1028, 1028, 1029, 1029, 1030, 1030, 1031, 1031, 1031, 1032,
+       1032, 1033, 1033, 1034, 1034, 1035, 1035, 1036, 1036, 1036,
+       1037, 1037, 1038, 1038, 1039, 1039, 1040, 1040, 1041, 1041,
+       1041, 1042, 1042, 1043, 1043, 1044, 1044, 1045, 1045, 1046,
+       1046, 1047, 1047, 1047, 1048, 1048, 1049, 1049, 1050, 1050,
+       1051, 1051, 1052, 1052, 1052, 1053, 1053, 1054, 1054, 1055,
+       1055, 1056, 1056, 1057, 1057, 1058, 1058, 1058, 1059, 1059,
+       1060, 1060, 1061, 1061, 1062, 1062, 1063, 1063, 1064, 1064,
+       1064, 1065, 1065, 1066, 1066, 1067, 1067, 1068, 1068, 1069,
+       1069, 1070, 1070, 1071, 1071, 1071, 1072, 1072, 1073, 1073,
+       1074, 1074, 1075, 1075, 1076, 1076, 1077, 1077, 1078, 1078,
+       1079, 1079, 1079, 1080, 1080, 1081, 1081, 1082, 1082, 1083,
+       1083, 1084, 1084, 1085, 1085, 1086, 1086, 1087, 1087, 1087,
+       1088, 1088, 1089, 1089, 1090, 1090, 1091, 1091, 1092, 1092,
+       1093, 1093, 1094, 1094, 1095, 1095, 1096, 1096, 1097, 1097,
+       1097, 1098, 1098, 1099, 1099, 1100, 1100, 1101, 1101, 1102,
+       1102, 1103, 1103, 1104, 1104, 1105, 1105, 1106, 1106, 1107,
+       1107, 1108, 1108, 1109, 1109, 1109, 1110, 1110, 1111, 1111,
+       1112, 1112, 1113, 1113, 1114, 1114, 1115, 1115, 1116, 1116,
+       1117, 1117, 1118, 1118, 1119, 1119, 1120, 1120, 1121, 1121,
+       1122, 1122, 1123, 1123, 1124, 1124, 1125, 1125, 1126, 1126,
+       1127, 1127, 1128, 1128, 1128, 1129, 1129, 1130, 1130, 1131,
+       1131, 1132, 1132, 1133, 1133, 1134, 1134, 1135, 1135, 1136,
+       1136, 1137, 1137, 1138, 1138, 1139, 1139, 1140, 1140, 1141,
+       1141, 1142, 1142, 1143, 1143, 1144, 1144, 1145, 1145, 1146,
+       1146, 1147, 1147, 1148, 1148, 1149, 1149, 1150, 1150, 1151,
+       1151, 1152, 1152, 1153, 1153, 1154, 1154, 1155, 1155, 1156,
+       1156, 1157, 1157, 1158, 1158, 1159, 1159, 1160, 1160, 1161,
+       1161, 1162, 1162, 1163, 1163, 1164, 1164, 1165, 1165, 1166,
+       1166, 1167, 1167, 1168, 1169, 1169, 1170, 1170, 1171, 1171,
+       1172, 1172, 1173, 1173, 1174, 1174, 1175, 1175, 1176, 1176,
+       1177, 1177, 1178, 1178, 1179, 1179, 1180, 1180, 1181, 1181,
+       1182, 1182, 1183, 1183, 1184, 1184, 1185, 1185, 1186, 1187,
+       1187, 1188, 1188, 1189, 1189, 1190, 1190, 1191, 1191, 1192,
+       1192, 1193, 1193, 1194, 1194, 1195, 1195, 1196, 1196, 1197,
+       1197, 1198, 1199, 1199, 1200, 1200, 1201, 1201, 1202, 1202,
+       1203, 1203, 1204, 1204, 1205, 1205, 1206, 1206, 1207, 1207,
+       1208, 1209, 1209, 1210, 1210, 1211, 1211, 1212, 1212, 1213,
+       1213, 1214, 1214, 1215, 1215, 1216, 1217, 1217, 1218, 1218,
+       1219, 1219, 1220, 1220, 1221, 1221, 1222, 1222, 1223, 1223,
+       1224, 1225, 1225, 1226, 1226, 1227, 1227, 1228, 1228, 1229,
+       1229, 1230, 1231, 1231, 1232, 1232, 1233, 1233, 1234, 1234,
+       1235, 1235, 1236, 1237, 1237, 1238, 1238, 1239, 1239, 1240,
+       1240, 1241, 1241, 1242, 1243, 1243, 1244, 1244, 1245, 1245,
+       1246, 1246, 1247, 1247, 1248, 1249, 1249, 1250, 1250, 1251,
+       1251, 1252, 1252, 1253, 1254, 1254, 1255, 1255, 1256, 1256,
+       1257, 1257, 1258, 1259, 1259, 1260, 1260, 1261, 1261, 1262,
+       1263, 1263, 1264, 1264, 1265, 1265, 1266, 1266, 1267, 1268,
+       1268, 1269, 1269, 1270, 1270, 1271, 1272, 1272, 1273, 1273,
+       1274, 1274, 1275, 1276, 1276, 1277, 1277, 1278, 1278, 1279,
+       1280, 1280, 1281, 1281, 1282, 1282, 1283, 1284, 1284, 1285,
+       1285, 1286, 1286, 1287, 1288, 1288, 1289, 1289, 1290, 1291,
+       1291, 1292, 1292, 1293, 1293, 1294, 1295, 1295, 1296, 1296,
+       1297, 1297, 1298, 1299, 1299, 1300, 1300, 1301, 1302, 1302,
+       1303, 1303, 1304, 1305, 1305, 1306, 1306, 1307, 1307, 1308,
+       1309, 1309, 1310, 1310, 1311, 1312, 1312, 1313, 1313, 1314,
+       1315, 1315, 1316, 1316, 1317, 1318, 1318, 1319, 1319, 1320,
+       1321, 1321, 1322, 1322, 1323, 1324, 1324, 1325, 1325, 1326,
+       1327, 1327, 1328, 1328, 1329, 1330, 1330, 1331, 1332, 1332,
+       1333, 1333, 1334, 1335, 1335, 1336, 1336, 1337, 1338, 1338,
+       1339, 1339, 1340, 1341, 1341, 1342, 1343, 1343, 1344, 1344,
+       1345, 1346, 1346, 1347, 1348, 1348, 1349, 1349, 1350, 1351,
+       1351, 1352, 1353, 1353, 1354, 1354, 1355, 1356, 1356, 1357,
+       1358, 1358, 1359, 1359, 1360, 1361, 1361, 1362, 1363, 1363,
+       1364, 1365, 1365, 1366, 1366, 1367, 1368, 1368, 1369, 1370,
+       1370, 1371, 1372, 1372, 1373, 1373, 1374, 1375, 1375, 1376,
+       1377, 1377, 1378, 1379, 1379, 1380, 1381, 1381, 1382, 1383,
+       1383, 1384, 1384, 1385, 1386, 1386, 1387, 1388, 1388, 1389,
+       1390, 1390, 1391, 1392, 1392, 1393, 1394, 1394, 1395, 1396,
+       1396, 1397, 1398, 1398, 1399, 1400, 1400, 1401, 1402, 1402,
+       1403, 1404, 1404, 1405, 1406, 1406, 1407, 1408, 1408, 1409,
+       1410, 1410, 1411, 1412, 1412, 1413, 1414, 1415, 1415, 1416,
+       1417, 1417, 1418, 1419, 1419, 1420, 1421, 1421, 1422, 1423,
+       1423, 1424, 1425, 1426, 1426, 1427, 1428, 1428, 1429, 1430,
+       1430, 1431, 1432, 1432, 1433, 1434, 1435, 1435, 1436, 1437,
+       1437, 1438, 1439, 1440, 1440, 1441, 1442, 1442, 1443, 1444,
+       1444, 1445, 1446, 1447, 1447, 1448, 1449, 1449, 1450, 1451,
+       1452, 1452, 1453, 1454, 1455, 1455, 1456, 1457, 1457, 1458,
+       1459, 1460, 1460, 1461, 1462, 1463, 1463, 1464, 1465, 1465,
+       1466, 1467, 1468, 1468, 1469, 1470, 1471, 1471, 1472, 1473,
+       1474, 1474, 1475, 1476, 1477, 1477, 1478, 1479, 1480, 1480,
+       1481, 1482, 1483, 1483, 1484, 1485, 1486, 1486, 1487, 1488,
+       1489, 1490, 1490, 1491, 1492, 1493, 1493, 1494, 1495, 1496,
+       1496, 1497, 1498, 1499, 1500, 1500, 1501, 1502, 1503, 1503,
+       1504, 1505, 1506, 1507, 1507, 1508, 1509, 1510, 1511, 1511,
+       1512, 1513, 1514, 1515, 1515, 1516, 1517, 1518, 1519, 1519,
+       1520, 1521, 1522, 1523, 1523, 1524, 1525, 1526, 1527, 1528,
+       1528, 1529, 1530, 1531, 1532, 1532, 1533, 1534, 1535, 1536,
+       1537, 1537, 1538, 1539, 1540, 1541, 1542, 1542, 1543, 1544,
+       1545, 1546, 1547, 1548, 1548, 1549, 1550, 1551, 1552, 1553,
+       1554, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1560, 1561,
+       1562, 1563, 1564, 1565, 1566, 1567, 1567, 1568, 1569, 1570,
+       1571, 1572, 1573, 1574, 1575, 1576, 1576, 1577, 1578, 1579,
+       1580, 1581, 1582, 1583, 1584, 1585, 1585, 1586, 1587, 1588,
+       1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598,
+       1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607,
+       1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617,
+       1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627,
+       1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637,
+       1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647,
+       1648, 1649, 1650, 1651, 1652, 1654, 1655, 1656, 1657, 1658,
+       1659, 1660, 1661, 1662, 1663, 1664, 1665, 1667, 1668, 1669,
+       1670, 1671, 1672, 1673, 1674, 1676, 1677, 1678, 1679, 1680,
+       1681, 1682, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1692,
+       1693, 1694, 1695, 1696, 1698, 1699, 1700, 1701, 1702, 1704,
+       1705, 1706, 1707, 1709, 1710, 1711, 1712, 1714, 1715, 1716,
+       1717, 1719, 1720, 1721, 1722, 1724, 1725, 1726, 1728, 1729,
+       1730, 1732, 1733, 1734, 1736, 1737, 1738, 1740, 1741, 1742,
+       1744, 1745, 1747, 1748, 1749, 1751, 1752, 1754, 1755, 1756,
+       1758, 1759, 1761, 1762, 1764, 1765, 1767, 1768, 1770, 1771,
+       1773, 1774, 1776, 1777, 1779, 1780, 1782, 1783, 1785, 1787,
+       1788, 1790, 1792, 1793, 1795, 1796, 1798, 1800, 1801, 1803,
+       1805, 1807, 1808, 1810, 1812, 1814, 1815, 1817, 1819, 1821,
+       1823, 1825, 1826, 1828, 1830, 1832, 1834, 1836, 1838, 1840,
+       1842, 1844, 1846, 1848, 1850, 1852, 1855, 1857, 1859, 1861,
+       1863, 1866, 1868, 1870, 1873, 1875, 1877, 1880, 1882, 1885,
+       1887, 1890, 1893, 1895, 1898, 1901, 1904, 1907, 1910, 1913,
+       1916, 1919, 1922, 1926, 1929, 1933, 1936, 1940, 1944, 1948,
+       1952, 1957, 1962, 1966, 1972, 1977, 1984, 1990, 1998, 2007,
+       2019, 2048,
+}; // END of _fastangle_asin_table_13[8192]
+
+static const double _fastangle_tan_table_13[8192] =
+{
+       0.000000000, 0.000766991, 0.001533982, 0.002300975, 0.003067971,
+       0.003834971, 0.004601975, 0.005368984, 0.006136000, 0.006903023,
+       0.007670054, 0.008437095, 0.009204145, 0.009971206, 0.010738278,
+       0.011505364, 0.012272462, 0.013039576, 0.013806704, 0.014573849,
+       0.015341011, 0.016108191, 0.016875390, 0.017642609, 0.018409849,
+       0.019177110, 0.019944394, 0.020711701, 0.021479033, 0.022246390,
+       0.023013773, 0.023781184, 0.024548622, 0.025316089, 0.026083586,
+       0.026851114, 0.027618673, 0.028386265, 0.029153891, 0.029921550,
+       0.030689245, 0.031456976, 0.032224744, 0.032992550, 0.033760395,
+       0.034528279, 0.035296205, 0.036064172, 0.036832181, 0.037600234,
+       0.038368331, 0.039136473, 0.039904661, 0.040672897, 0.041441180,
+       0.042209512, 0.042977894, 0.043746327, 0.044514811, 0.045283348,
+       0.046051938, 0.046820582, 0.047589281, 0.048358037, 0.049126850,
+       0.049895720, 0.050664650, 0.051433639, 0.052202689, 0.052971800,
+       0.053740974, 0.054510212, 0.055279514, 0.056048880, 0.056818314,
+       0.057587814, 0.058357382, 0.059127019, 0.059896726, 0.060666503,
+       0.061436353, 0.062206274, 0.062976270, 0.063746339, 0.064516484,
+       0.065286705, 0.066057004, 0.066827380, 0.067597835, 0.068368371,
+       0.069138987, 0.069909684, 0.070680465, 0.071451329, 0.072222277,
+       0.072993311, 0.073764432, 0.074535639, 0.075306935, 0.076078320,
+       0.076849794, 0.077621360, 0.078393018, 0.079164768, 0.079936612,
+       0.080708551, 0.081480586, 0.082252717, 0.083024945, 0.083797272,
+       0.084569698, 0.085342224, 0.086114851, 0.086887581, 0.087660413,
+       0.088433349, 0.089206391, 0.089979538, 0.090752791, 0.091526153,
+       0.092299623, 0.093073202, 0.093846892, 0.094620693, 0.095394607,
+       0.096168634, 0.096942775, 0.097717031, 0.098491403, 0.099265893,
+       0.100040500, 0.100815226, 0.101590072, 0.102365039, 0.103140127,
+       0.103915338, 0.104690673, 0.105466132, 0.106241716, 0.107017427,
+       0.107793266, 0.108569232, 0.109345328, 0.110121554, 0.110897912,
+       0.111674401, 0.112451023, 0.113227780, 0.114004671, 0.114781698,
+       0.115558862, 0.116336164, 0.117113604, 0.117891184, 0.118668905,
+       0.119446767, 0.120224772, 0.121002920, 0.121781213, 0.122559652,
+       0.123338236, 0.124116968, 0.124895848, 0.125674878, 0.126454057,
+       0.127233388, 0.128012871, 0.128792507, 0.129572297, 0.130352242,
+       0.131132343, 0.131912601, 0.132693017, 0.133473592, 0.134254326,
+       0.135035222, 0.135816279, 0.136597499, 0.137378882, 0.138160430,
+       0.138942144, 0.139724025, 0.140506073, 0.141288290, 0.142070676,
+       0.142853233, 0.143635961, 0.144418862, 0.145201936, 0.145985185,
+       0.146768609, 0.147552210, 0.148335988, 0.149119944, 0.149904079,
+       0.150688395, 0.151472893, 0.152257572, 0.153042435, 0.153827482,
+       0.154612715, 0.155398133, 0.156183739, 0.156969533, 0.157755517,
+       0.158541690, 0.159328055, 0.160114612, 0.160901362, 0.161688307,
+       0.162475447, 0.163262782, 0.164050316, 0.164838047, 0.165625977,
+       0.166414108, 0.167202440, 0.167990974, 0.168779712, 0.169568653,
+       0.170357800, 0.171147153, 0.171936714, 0.172726482, 0.173516460,
+       0.174306648, 0.175097048, 0.175887660, 0.176678485, 0.177469525,
+       0.178260779, 0.179052251, 0.179843940, 0.180635847, 0.181427973,
+       0.182220321, 0.183012889, 0.183805680, 0.184598695, 0.185391935,
+       0.186185400, 0.186979091, 0.187773010, 0.188567158, 0.189361536,
+       0.190156145, 0.190950985, 0.191746058, 0.192541365, 0.193336907,
+       0.194132685, 0.194928700, 0.195724954, 0.196521446, 0.197318178,
+       0.198115152, 0.198912367, 0.199709826, 0.200507530, 0.201305479,
+       0.202103674, 0.202902117, 0.203700808, 0.204499749, 0.205298940,
+       0.206098384, 0.206898080, 0.207698030, 0.208498234, 0.209298695,
+       0.210099413, 0.210900389, 0.211701624, 0.212503119, 0.213304876,
+       0.214106895, 0.214909178, 0.215711725, 0.216514537, 0.217317617,
+       0.218120964, 0.218924579, 0.219728465, 0.220532622, 0.221337051,
+       0.222141753, 0.222946729, 0.223751981, 0.224557509, 0.225363315,
+       0.226169399, 0.226975763, 0.227782408, 0.228589335, 0.229396544,
+       0.230204038, 0.231011817, 0.231819882, 0.232628235, 0.233436876,
+       0.234245807, 0.235055029, 0.235864542, 0.236674348, 0.237484449,
+       0.238294844, 0.239105536, 0.239916525, 0.240727813, 0.241539401,
+       0.242351289, 0.243163479, 0.243975972, 0.244788769, 0.245601872,
+       0.246415280, 0.247228997, 0.248043022, 0.248857357, 0.249672002,
+       0.250486960, 0.251302231, 0.252117817, 0.252933717, 0.253749935,
+       0.254566470, 0.255383324, 0.256200498, 0.257017994, 0.257835812,
+       0.258653953, 0.259472419, 0.260291211, 0.261110330, 0.261929777,
+       0.262749553, 0.263569660, 0.264390098, 0.265210870, 0.266031975,
+       0.266853415, 0.267675192, 0.268497306, 0.269319759, 0.270142552,
+       0.270965686, 0.271789161, 0.272612981, 0.273437145, 0.274261655,
+       0.275086511, 0.275911716, 0.276737270, 0.277563175, 0.278389431,
+       0.279216041, 0.280043004, 0.280870323, 0.281697998, 0.282526031,
+       0.283354423, 0.284183175, 0.285012289, 0.285841765, 0.286671605,
+       0.287501809, 0.288332380, 0.289163319, 0.289994626, 0.290826303,
+       0.291658351, 0.292490772, 0.293323566, 0.294156735, 0.294990280,
+       0.295824202, 0.296658503, 0.297493183, 0.298328244, 0.299163688,
+       0.299999515, 0.300835727, 0.301672325, 0.302509310, 0.303346684,
+       0.304184447, 0.305022601, 0.305861148, 0.306700088, 0.307539423,
+       0.308379154, 0.309219282, 0.310059809, 0.310900736, 0.311742064,
+       0.312583794, 0.313425928, 0.314268467, 0.315111412, 0.315954765,
+       0.316798527, 0.317642699, 0.318487282, 0.319332278, 0.320177688,
+       0.321023513, 0.321869755, 0.322716415, 0.323563494, 0.324410994,
+       0.325258916, 0.326107260, 0.326956029, 0.327805224, 0.328654846,
+       0.329504897, 0.330355377, 0.331206289, 0.332057633, 0.332909410,
+       0.333761623, 0.334614272, 0.335467359, 0.336320885, 0.337174851,
+       0.338029260, 0.338884111, 0.339739407, 0.340595149, 0.341451338,
+       0.342307975, 0.343165063, 0.344022602, 0.344880593, 0.345739039,
+       0.346597939, 0.347457297, 0.348317113, 0.349177388, 0.350038125,
+       0.350899323, 0.351760985, 0.352623113, 0.353485706, 0.354348768,
+       0.355212299, 0.356076301, 0.356940774, 0.357805721, 0.358671143,
+       0.359537042, 0.360403417, 0.361270272, 0.362137608, 0.363005426,
+       0.363873726, 0.364742512, 0.365611784, 0.366481544, 0.367351792,
+       0.368222532, 0.369093763, 0.369965487, 0.370837707, 0.371710423,
+       0.372583636, 0.373457349, 0.374331562, 0.375206278, 0.376081497,
+       0.376957221, 0.377833452, 0.378710191, 0.379587439, 0.380465198,
+       0.381343470, 0.382222255, 0.383101556, 0.383981374, 0.384861710,
+       0.385742566, 0.386623944, 0.387505844, 0.388388269, 0.389271219,
+       0.390154697, 0.391038704, 0.391923242, 0.392808311, 0.393693914,
+       0.394580051, 0.395466726, 0.396353938, 0.397241690, 0.398129983,
+       0.399018819, 0.399908199, 0.400798124, 0.401688597, 0.402579619,
+       0.403471191, 0.404363316, 0.405255993, 0.406149226, 0.407043016,
+       0.407937364, 0.408832271, 0.409727740, 0.410623772, 0.411520369,
+       0.412417532, 0.413315262, 0.414213562, 0.415112433, 0.416011877,
+       0.416911894, 0.417812488, 0.418713658, 0.419615408, 0.420517739,
+       0.421420651, 0.422324148, 0.423228230, 0.424132899, 0.425038157,
+       0.425944006, 0.426850446, 0.427757480, 0.428665110, 0.429573336,
+       0.430482162, 0.431391587, 0.432301615, 0.433212246, 0.434123483,
+       0.435035326, 0.435947779, 0.436860841, 0.437774516, 0.438688805,
+       0.439603709, 0.440519230, 0.441435370, 0.442352131, 0.443269514,
+       0.444187521, 0.445106154, 0.446025414, 0.446945303, 0.447865823,
+       0.448786976, 0.449708763, 0.450631187, 0.451554248, 0.452477949,
+       0.453402291, 0.454327276, 0.455252906, 0.456179183, 0.457106108,
+       0.458033683, 0.458961911, 0.459890792, 0.460820328, 0.461750522,
+       0.462681375, 0.463612889, 0.464545066, 0.465477907, 0.466411414,
+       0.467345590, 0.468280435, 0.469215952, 0.470152143, 0.471089010,
+       0.472026553, 0.472964776, 0.473903680, 0.474843266, 0.475783537,
+       0.476724495, 0.477666140, 0.478608477, 0.479551505, 0.480495227,
+       0.481439645, 0.482384761, 0.483330576, 0.484277093, 0.485224313,
+       0.486172239, 0.487120872, 0.488070214, 0.489020267, 0.489971033,
+       0.490922513, 0.491874711, 0.492827627, 0.493781264, 0.494735624,
+       0.495690708, 0.496646518, 0.497603058, 0.498560327, 0.499518329,
+       0.500477065, 0.501436538, 0.502396749, 0.503357700, 0.504319393,
+       0.505281831, 0.506245015, 0.507208947, 0.508173630, 0.509139064,
+       0.510105254, 0.511072199, 0.512039903, 0.513008367, 0.513977594,
+       0.514947585, 0.515918342, 0.516889869, 0.517862165, 0.518835235,
+       0.519809079, 0.520783700, 0.521759100, 0.522735281, 0.523712245,
+       0.524689995, 0.525668531, 0.526647857, 0.527627974, 0.528608885,
+       0.529590592, 0.530573097, 0.531556401, 0.532540508, 0.533525419,
+       0.534511136, 0.535497662, 0.536484998, 0.537473148, 0.538462112,
+       0.539451894, 0.540442495, 0.541433918, 0.542426164, 0.543419236,
+       0.544413137, 0.545407868, 0.546403431, 0.547399830, 0.548397065,
+       0.549395139, 0.550394056, 0.551393815, 0.552394421, 0.553395875,
+       0.554398180, 0.555401337, 0.556405349, 0.557410219, 0.558415948,
+       0.559422539, 0.560429994, 0.561438316, 0.562447507, 0.563457568,
+       0.564468503, 0.565480314, 0.566493003, 0.567506572, 0.568521024,
+       0.569536361, 0.570552585, 0.571569700, 0.572587706, 0.573606607,
+       0.574626405, 0.575647102, 0.576668701, 0.577691204, 0.578714614,
+       0.579738932, 0.580764162, 0.581790306, 0.582817365, 0.583845344,
+       0.584874243, 0.585904066, 0.586934815, 0.587966493, 0.588999101,
+       0.590032643, 0.591067120, 0.592102537, 0.593138893, 0.594176194,
+       0.595214440, 0.596253634, 0.597293780, 0.598334879, 0.599376934,
+       0.600419947, 0.601463922, 0.602508860, 0.603554764, 0.604601638,
+       0.605649482, 0.606698301, 0.607748096, 0.608798870, 0.609850626,
+       0.610903366, 0.611957094, 0.613011811, 0.614067520, 0.615124224,
+       0.616181926, 0.617240628, 0.618300333, 0.619361043, 0.620422762,
+       0.621485492, 0.622549235, 0.623613995, 0.624679773, 0.625746574,
+       0.626814399, 0.627883251, 0.628953133, 0.630024048, 0.631095998,
+       0.632168987, 0.633243016, 0.634318090, 0.635394210, 0.636471379,
+       0.637549600, 0.638628877, 0.639709211, 0.640790606, 0.641873065,
+       0.642956590, 0.644041184, 0.645126850, 0.646213591, 0.647301410,
+       0.648390309, 0.649480293, 0.650571362, 0.651663521, 0.652756772,
+       0.653851119, 0.654946564, 0.656043109, 0.657140759, 0.658239516,
+       0.659339383, 0.660440363, 0.661542459, 0.662645674, 0.663750011,
+       0.664855472, 0.665962062, 0.667069783, 0.668178638, 0.669288630,
+       0.670399762, 0.671512038, 0.672625460, 0.673740031, 0.674855755,
+       0.675972634, 0.677090672, 0.678209872, 0.679330237, 0.680451770,
+       0.681574474, 0.682698353, 0.683823409, 0.684949646, 0.686077068,
+       0.687205676, 0.688335474, 0.689466467, 0.690598655, 0.691732044,
+       0.692866637, 0.694002436, 0.695139444, 0.696277666, 0.697417104,
+       0.698557762, 0.699699642, 0.700842749, 0.701987086, 0.703132655,
+       0.704279461, 0.705427506, 0.706576795, 0.707727329, 0.708879114,
+       0.710032151, 0.711186445, 0.712341999, 0.713498817, 0.714656901,
+       0.715816256, 0.716976884, 0.718138789, 0.719301976, 0.720466446,
+       0.721632204, 0.722799253, 0.723967597, 0.725137239, 0.726308183,
+       0.727480432, 0.728653990, 0.729828860, 0.731005047, 0.732182553,
+       0.733361383, 0.734541539, 0.735723026, 0.736905847, 0.738090006,
+       0.739275506, 0.740462352, 0.741650546, 0.742840093, 0.744030996,
+       0.745223260, 0.746416886, 0.747611881, 0.748808246, 0.750005987,
+       0.751205106, 0.752405608, 0.753607497, 0.754810775, 0.756015448,
+       0.757221519, 0.758428991, 0.759637869, 0.760848156, 0.762059857,
+       0.763272975, 0.764487514, 0.765703478, 0.766920872, 0.768139698,
+       0.769359962, 0.770581666, 0.771804816, 0.773029414, 0.774255466,
+       0.775482974, 0.776711944, 0.777942378, 0.779174282, 0.780407660,
+       0.781642514, 0.782878850, 0.784116672, 0.785355984, 0.786596789,
+       0.787839093, 0.789082899, 0.790328211, 0.791575034, 0.792823372,
+       0.794073229, 0.795324609, 0.796577517, 0.797831957, 0.799087933,
+       0.800345449, 0.801604511, 0.802865121, 0.804127285, 0.805391007,
+       0.806656292, 0.807923142, 0.809191564, 0.810461561, 0.811733139,
+       0.813006300, 0.814281050, 0.815557394, 0.816835335, 0.818114879,
+       0.819396029, 0.820678791, 0.821963168, 0.823249167, 0.824536790,
+       0.825826042, 0.827116929, 0.828409455, 0.829703625, 0.830999443,
+       0.832296913, 0.833596041, 0.834896832, 0.836199289, 0.837503418,
+       0.838809224, 0.840116711, 0.841425884, 0.842736748, 0.844049308,
+       0.845363568, 0.846679533, 0.847997209, 0.849316600, 0.850637711,
+       0.851960547, 0.853285113, 0.854611414, 0.855939455, 0.857269241,
+       0.858600776, 0.859934067, 0.861269117, 0.862605932, 0.863944518,
+       0.865284878, 0.866627019, 0.867970945, 0.869316662, 0.870664175,
+       0.872013488, 0.873364608, 0.874717539, 0.876072286, 0.877428856,
+       0.878787252, 0.880147481, 0.881509547, 0.882873457, 0.884239215,
+       0.885606827, 0.886976298, 0.888347634, 0.889720839, 0.891095920,
+       0.892472882, 0.893851731, 0.895232471, 0.896615109, 0.897999649,
+       0.899386099, 0.900774462, 0.902164745, 0.903556954, 0.904951093,
+       0.906347169, 0.907745187, 0.909145154, 0.910547074, 0.911950954,
+       0.913356799, 0.914764615, 0.916174408, 0.917586184, 0.918999948,
+       0.920415707, 0.921833466, 0.923253231, 0.924675008, 0.926098804,
+       0.927524624, 0.928952473, 0.930382359, 0.931814287, 0.933248264,
+       0.934684294, 0.936122385, 0.937562543, 0.939004773, 0.940449083,
+       0.941895477, 0.943343963, 0.944794546, 0.946247233, 0.947702031,
+       0.949158944, 0.950617981, 0.952079147, 0.953542448, 0.955007891,
+       0.956475483, 0.957945229, 0.959417137, 0.960891213, 0.962367463,
+       0.963845894, 0.965326512, 0.966809325, 0.968294338, 0.969781559,
+       0.971270994, 0.972762649, 0.974256533, 0.975752650, 0.977251008,
+       0.978751615, 0.980254476, 0.981759598, 0.983266989, 0.984776655,
+       0.986288604, 0.987802841, 0.989319375, 0.990838213, 0.992359360,
+       0.993882825, 0.995408614, 0.996936735, 0.998467195, 1.000000000,
+       1.001535159, 1.003072677, 1.004612564, 1.006154825, 1.007699469,
+       1.009246502, 1.010795932, 1.012347766, 1.013902012, 1.015458678,
+       1.017017770, 1.018579296, 1.020143264, 1.021709681, 1.023278555,
+       1.024849894, 1.026423705, 1.027999996, 1.029578775, 1.031160049,
+       1.032743826, 1.034330115, 1.035918922, 1.037510256, 1.039104125,
+       1.040700536, 1.042299498, 1.043901018, 1.045505105, 1.047111766,
+       1.048721011, 1.050332846, 1.051947281, 1.053564322, 1.055183979,
+       1.056806260, 1.058431173, 1.060058727, 1.061688929, 1.063321788,
+       1.064957313, 1.066595511, 1.068236393, 1.069879965, 1.071526237,
+       1.073175217, 1.074826914, 1.076481336, 1.078138493, 1.079798393,
+       1.081461044, 1.083126456, 1.084794637, 1.086465597, 1.088139343,
+       1.089815886, 1.091495234, 1.093177396, 1.094862381, 1.096550199,
+       1.098240858, 1.099934368, 1.101630737, 1.103329976, 1.105032093,
+       1.106737097, 1.108444999, 1.110155807, 1.111869531, 1.113586181,
+       1.115305765, 1.117028294, 1.118753777, 1.120482224, 1.122213644,
+       1.123948047, 1.125685443, 1.127425842, 1.129169254, 1.130915687,
+       1.132665154, 1.134417662, 1.136173223, 1.137931846, 1.139693542,
+       1.141458320, 1.143226191, 1.144997165, 1.146771253, 1.148548463,
+       1.150328808, 1.152112298, 1.153898942, 1.155688751, 1.157481736,
+       1.159277907, 1.161077276, 1.162879852, 1.164685646, 1.166494670,
+       1.168306933, 1.170122448, 1.171941224, 1.173763272, 1.175588605,
+       1.177417231, 1.179249164, 1.181084413, 1.182922991, 1.184764908,
+       1.186610175, 1.188458804, 1.190310807, 1.192166194, 1.194024977,
+       1.195887168, 1.197752779, 1.199621820, 1.201494304, 1.203370242,
+       1.205249646, 1.207132528, 1.209018900, 1.210908773, 1.212802161,
+       1.214699074, 1.216599525, 1.218503526, 1.220411089, 1.222322226,
+       1.224236951, 1.226155274, 1.228077210, 1.230002769, 1.231931965,
+       1.233864809, 1.235801316, 1.237741497, 1.239685366, 1.241632935,
+       1.243584216, 1.245539224, 1.247497970, 1.249460468, 1.251426731,
+       1.253396773, 1.255370606, 1.257348243, 1.259329699, 1.261314986,
+       1.263304118, 1.265297109, 1.267293971, 1.269294719, 1.271299367,
+       1.273307928, 1.275320415, 1.277336844, 1.279357228, 1.281381580,
+       1.283409916, 1.285442248, 1.287478592, 1.289518962, 1.291563372,
+       1.293611836, 1.295664369, 1.297720986, 1.299781701, 1.301846529,
+       1.303915484, 1.305988582, 1.308065837, 1.310147264, 1.312232879,
+       1.314322696, 1.316416731, 1.318514999, 1.320617515, 1.322724294,
+       1.324835353, 1.326950706, 1.329070369, 1.331194359, 1.333322690,
+       1.335455378, 1.337592440, 1.339733891, 1.341879748, 1.344030027,
+       1.346184743, 1.348343913, 1.350507554, 1.352675682, 1.354848314,
+       1.357025465, 1.359207153, 1.361393395, 1.363584208, 1.365779607,
+       1.367979611, 1.370184237, 1.372393501, 1.374607421, 1.376826014,
+       1.379049298, 1.381277290, 1.383510008, 1.385747469, 1.387989692,
+       1.390236693, 1.392488492, 1.394745106, 1.397006553, 1.399272852,
+       1.401544020, 1.403820076, 1.406101039, 1.408386928, 1.410677760,
+       1.412973555, 1.415274331, 1.417580107, 1.419890903, 1.422206738,
+       1.424527631, 1.426853600, 1.429184667, 1.431520849, 1.433862167,
+       1.436208641, 1.438560289, 1.440917133, 1.443279193, 1.445646487,
+       1.448019037, 1.450396863, 1.452779985, 1.455168424, 1.457562200,
+       1.459961335, 1.462365848, 1.464775762, 1.467191096, 1.469611873,
+       1.472038113, 1.474469838, 1.476907069, 1.479349828, 1.481798137,
+       1.484252017, 1.486711491, 1.489176580, 1.491647307, 1.494123694,
+       1.496605763, 1.499093536, 1.501587038, 1.504086289, 1.506591313,
+       1.509102134, 1.511618773, 1.514141255, 1.516669602, 1.519203839,
+       1.521743989, 1.524290074, 1.526842121, 1.529400151, 1.531964190,
+       1.534534261, 1.537110390, 1.539692600, 1.542280915, 1.544875362,
+       1.547475964, 1.550082747, 1.552695736, 1.555314956, 1.557940432,
+       1.560572190, 1.563210256, 1.565854655, 1.568505414, 1.571162558,
+       1.573826115, 1.576496109, 1.579172568, 1.581855518, 1.584544987,
+       1.587241001, 1.589943587, 1.592652772, 1.595368585, 1.598091052,
+       1.600820201, 1.603556060, 1.606298657, 1.609048020, 1.611804178,
+       1.614567159, 1.617336991, 1.620113704, 1.622897326, 1.625687886,
+       1.628485414, 1.631289940, 1.634101492, 1.636920101, 1.639745796,
+       1.642578607, 1.645418566, 1.648265701, 1.651120045, 1.653981627,
+       1.656850478, 1.659726631, 1.662610115, 1.665500963, 1.668399206,
+       1.671304875, 1.674218004, 1.677138624, 1.680066768, 1.683002467,
+       1.685945756, 1.688896666, 1.691855232, 1.694821485, 1.697795460,
+       1.700777191, 1.703766711, 1.706764055, 1.709769257, 1.712782350,
+       1.715803371, 1.718832353, 1.721869333, 1.724914344, 1.727967424,
+       1.731028606, 1.734097928, 1.737175426, 1.740261136, 1.743355093,
+       1.746457337, 1.749567902, 1.752686826, 1.755814148, 1.758949903,
+       1.762094132, 1.765246870, 1.768408157, 1.771578032, 1.774756533,
+       1.777943698, 1.781139568, 1.784344182, 1.787557579, 1.790779800,
+       1.794010885, 1.797250873, 1.800499807, 1.803757726, 1.807024672,
+       1.810300687, 1.813585811, 1.816880088, 1.820183559, 1.823496266,
+       1.826818252, 1.830149561, 1.833490236, 1.836840319, 1.840199855,
+       1.843568888, 1.846947462, 1.850335622, 1.853733412, 1.857140878,
+       1.860558065, 1.863985019, 1.867421786, 1.870868412, 1.874324943,
+       1.877791427, 1.881267910, 1.884754441, 1.888251066, 1.891757834,
+       1.895274793, 1.898801992, 1.902339480, 1.905887306, 1.909445519,
+       1.913014170, 1.916593308, 1.920182985, 1.923783251, 1.927394157,
+       1.931015754, 1.934648096, 1.938291233, 1.941945218, 1.945610105,
+       1.949285946, 1.952972795, 1.956670705, 1.960379731, 1.964099928,
+       1.967831351, 1.971574054, 1.975328093, 1.979093525, 1.982870406,
+       1.986658792, 1.990458741, 1.994270311, 1.998093558, 2.001928542,
+       2.005775321, 2.009633954, 2.013504500, 2.017387020, 2.021281573,
+       2.025188221, 2.029107024, 2.033038044, 2.036981342, 2.040936981,
+       2.044905024, 2.048885533, 2.052878573, 2.056884206, 2.060902499,
+       2.064933515, 2.068977320, 2.073033979, 2.077103559, 2.081186126,
+       2.085281748, 2.089390491, 2.093512425, 2.097647617, 2.101796137,
+       2.105958054, 2.110133437, 2.114322358, 2.118524886, 2.122741095,
+       2.126971054, 2.131214838, 2.135472518, 2.139744168, 2.144029862,
+       2.148329675, 2.152643681, 2.156971956, 2.161314576, 2.165671617,
+       2.170043157, 2.174429273, 2.178830044, 2.183245548, 2.187675864,
+       2.192121073, 2.196581255, 2.201056491, 2.205546863, 2.210052453,
+       2.214573343, 2.219109617, 2.223661360, 2.228228655, 2.232811588,
+       2.237410245, 2.242024713, 2.246655078, 2.251301428, 2.255963852,
+       2.260642439, 2.265337278, 2.270048460, 2.274776076, 2.279520218,
+       2.284280978, 2.289058449, 2.293852725, 2.298663901, 2.303492071,
+       2.308337332, 2.313199780, 2.318079513, 2.322976628, 2.327891225,
+       2.332823403, 2.337773263, 2.342740905, 2.347726431, 2.352729945,
+       2.357751549, 2.362791348, 2.367849447, 2.372925951, 2.378020968,
+       2.383134604, 2.388266969, 2.393418171, 2.398588320, 2.403777527,
+       2.408985903, 2.414213562, 2.419460617, 2.424727182, 2.430013373,
+       2.435319305, 2.440645096, 2.445990863, 2.451356726, 2.456742804,
+       2.462149219, 2.467576091, 2.473023545, 2.478491703, 2.483980690,
+       2.489490633, 2.495021657, 2.500573891, 2.506147463, 2.511742504,
+       2.517359143, 2.522997514, 2.528657748, 2.534339981, 2.540044348,
+       2.545770984, 2.551520027, 2.557291616, 2.563085891, 2.568902992,
+       2.574743061, 2.580606242, 2.586492679, 2.592402518, 2.598335905,
+       2.604292988, 2.610273918, 2.616278844, 2.622307918, 2.628361293,
+       2.634439124, 2.640541566, 2.646668776, 2.652820913, 2.658998137,
+       2.665200608, 2.671428489, 2.677681944, 2.683961138, 2.690266237,
+       2.696597411, 2.702954827, 2.709338658, 2.715749076, 2.722186255,
+       2.728650371, 2.735141600, 2.741660121, 2.748206114, 2.754779762,
+       2.761381248, 2.768010756, 2.774668473, 2.781354588, 2.788069291,
+       2.794812772, 2.801585227, 2.808386849, 2.815217837, 2.822078387,
+       2.828968701, 2.835888982, 2.842839432, 2.849820259, 2.856831670,
+       2.863873875, 2.870947085, 2.878051514, 2.885187378, 2.892354894,
+       2.899554281, 2.906785762, 2.914049559, 2.921345899, 2.928675010,
+       2.936037121, 2.943432465, 2.950861275, 2.958323788, 2.965820244,
+       2.973350883, 2.980915947, 2.988515684, 2.996150340, 3.003820167,
+       3.011525416, 3.019266342, 3.027043204, 3.034856262, 3.042705777,
+       3.050592015, 3.058515244, 3.066475733, 3.074473757, 3.082509589,
+       3.090583510, 3.098695798, 3.106846740, 3.115036620, 3.123265728,
+       3.131534357, 3.139842802, 3.148191360, 3.156580334, 3.165010027,
+       3.173480746, 3.181992801, 3.190546507, 3.199142179, 3.207780138,
+       3.216460706, 3.225184209, 3.233950978, 3.242761346, 3.251615649,
+       3.260514226, 3.269457422, 3.278445584, 3.287479061, 3.296558209,
+       3.305683385, 3.314854951, 3.324073273, 3.333338720, 3.342651665,
+       3.352012486, 3.361421563, 3.370879282, 3.380386033, 3.389942208,
+       3.399548206, 3.409204429, 3.418911283, 3.428669179, 3.438478532,
+       3.448339762, 3.458253293, 3.468219554, 3.478238979, 3.488312006,
+       3.498439078, 3.508620644, 3.518857157, 3.529149074, 3.539496860,
+       3.549900982, 3.560361914, 3.570880135, 3.581456130, 3.592090388,
+       3.602783405, 3.613535681, 3.624347724, 3.635220047, 3.646153166,
+       3.657147608, 3.668203902, 3.679322584, 3.690504199, 3.701749293,
+       3.713058424, 3.724432153, 3.735871049, 3.747375686, 3.758946648,
+       3.770584522, 3.782289905, 3.794063400, 3.805905617, 3.817817173,
+       3.829798694, 3.841850812, 3.853974166, 3.866169405, 3.878437185,
+       3.890778170, 3.903193030, 3.915682447, 3.928247108, 3.940887711,
+       3.953604961, 3.966399573, 3.979272270, 3.992223784, 4.005254856,
+       4.018366238, 4.031558690, 4.044832981, 4.058189891, 4.071630211,
+       4.085154739, 4.098764285, 4.112459670, 4.126241726, 4.140111292,
+       4.154069223, 4.168116382, 4.182253644, 4.196481895, 4.210802034,
+       4.225214970, 4.239721626, 4.254322936, 4.269019847, 4.283813319,
+       4.298704322, 4.313693844, 4.328782883, 4.343972451, 4.359263574,
+       4.374657292, 4.390154660, 4.405756746, 4.421464634, 4.437279422,
+       4.453202224, 4.469234170, 4.485376405, 4.501630089, 4.517996401,
+       4.534476534, 4.551071699, 4.567783126, 4.584612059, 4.601559763,
+       4.618627520, 4.635816630, 4.653128412, 4.670564204, 4.688125366,
+       4.705813275, 4.723629328, 4.741574945, 4.759651566, 4.777860651,
+       4.796203685, 4.814682172, 4.833297640, 4.852051640, 4.870945747,
+       4.889981558, 4.909160698, 4.928484813, 4.947955576, 4.967574687,
+       4.987343871, 5.007264880, 5.027339492, 5.047569516, 5.067956788,
+       5.088503171, 5.109210562, 5.130080883, 5.151116092, 5.172318173,
+       5.193689147, 5.215231065, 5.236946012, 5.258836107, 5.280903504,
+       5.303150391, 5.325578994, 5.348191575, 5.370990435, 5.393977912,
+       5.417156383, 5.440528266, 5.464096021, 5.487862148, 5.511829190,
+       5.535999735, 5.560376414, 5.584961905, 5.609758932, 5.634770266,
+       5.659998726, 5.685447184, 5.711118559, 5.737015825, 5.763142005,
+       5.789500181, 5.816093488, 5.842925117, 5.869998319, 5.897316403,
+       5.924882740, 5.952700761, 5.980773963, 6.009105907, 6.037700220,
+       6.066560597, 6.095690804, 6.125094677, 6.154776127, 6.184739138,
+       6.214987771, 6.245526166, 6.276358543, 6.307489204, 6.338922536,
+       6.370663013, 6.402715195, 6.435083737, 6.467773382, 6.500788974,
+       6.534135449, 6.567817847, 6.601841311, 6.636211087, 6.670932532,
+       6.706011111, 6.741452405, 6.777262112, 6.813446049, 6.850010157,
+       6.886960501, 6.924303279, 6.962044820, 7.000191591, 7.038750200,
+       7.077727398, 7.117130085, 7.156965314, 7.197240293, 7.237962394,
+       7.279139153, 7.320778274, 7.362887641, 7.405475315, 7.448549542,
+       7.492118760, 7.536191604, 7.580776908, 7.625883716, 7.671521286,
+       7.717699097, 7.764426853, 7.811714494, 7.859572199, 7.908010397,
+       7.957039771, 8.006671270, 8.056916114, 8.107785804, 8.159292128,
+       8.211447175, 8.264263342, 8.317753342, 8.371930218, 8.426807351,
+       8.482398471, 8.538717671, 8.595779416, 8.653598556, 8.712190343,
+       8.771570437, 8.831754928, 8.892760343, 8.954603669, 9.017302360,
+       9.080874364, 9.145338129, 9.210712631, 9.277017384, 9.344272467,
+       9.412498540, 9.481716864, 9.551949328, 9.623218470, 9.695547497,
+       9.768960318, 9.843481565, 9.919136621, 9.995951652, 10.073953635,
+       10.153170388, 10.233630607, 10.315363898, 10.398400817, 10.482772902,
+       10.568512718, 10.655653899, 10.744231190, 10.834280493, 10.925838918,
+       11.018944833, 11.113637917, 11.209959219, 11.307951213, 11.407657866,
+       11.509124699, 11.612398861, 11.717529199, 11.824566335, 11.933562751,
+       12.044572872, 12.157653156, 12.272862193, 12.390260806, 12.509912155,
+       12.631881854, 12.756238090, 12.883051751, 13.012396559, 13.144349217,
+       13.278989557, 13.416400703, 13.556669242, 13.699885410, 13.846143279,
+       13.995540969, 14.148180865, 14.304169855, 14.463619573, 14.626646676,
+       14.793373118, 14.963926464, 15.138440211, 15.317054137, 15.499914679,
+       15.687175327, 15.878997063, 16.075548815, 16.277007960, 16.483560854,
+       16.695403411, 16.912741721, 17.135792724, 17.364784926, 17.599959188,
+       17.841569567, 18.089884234, 18.345186471, 18.607775743, 18.877968880,
+       19.156101346, 19.442528633, 19.737627780, 20.041799025, 20.355467625,
+       20.679085834, 21.013135085, 21.358128380, 21.714612923, 22.083173013,
+       22.464433249, 22.859062059, 23.267775617, 23.691342183, 24.130586924,
+       24.586397283, 25.059728971, 25.551612653, 26.063161449, 26.595579347,
+       27.150170666, 27.728350729, 28.331657935, 28.961767426, 29.620506631,
+       30.309872972, 31.032054101, 31.789451102, 32.584705165, 33.420728371,
+       34.300739338, 35.228304641, 36.207387142, 37.242402601, 38.338286278,
+       39.500571649, 40.735483872, 42.050051354, 43.452239619, 44.951112888,
+       46.557030268, 48.281885549, 50.139402336, 52.145500009, 54.318751180,
+       56.680958480, 59.257888652, 62.080216394, 65.184751341, 68.616052526,
+       72.428580989, 76.689612131, 81.483240207, 86.915984602, 93.124798814,
+       100.288775877, 108.646706506, 118.524214399, 130.377172737, 144.864065001,
+       162.972616414, 186.254966612, 217.298014987, 260.758180446, 325.948300803,
+       434.598330955, 651.898135598, 1303.797038226, -20973876782737.480468750, -1303.797038064,
+       -651.898135557, -434.598330937, -325.948300793, -260.758180440, -217.298014983,
+       -186.254966609, -162.972616412, -144.864064999, -130.377172735, -118.524214398,
+       -108.646706505, -100.288775876, -93.124798813, -86.915984601, -81.483240206,
+       -76.689612131, -72.428580988, -68.616052526, -65.184751341, -62.080216394,
+       -59.257888652, -56.680958479, -54.318751180, -52.145500009, -50.139402335,
+       -48.281885549, -46.557030267, -44.951112888, -43.452239619, -42.050051353,
+       -40.735483872, -39.500571649, -38.338286278, -37.242402600, -36.207387142,
+       -35.228304641, -34.300739338, -33.420728371, -32.584705165, -31.789451102,
+       -31.032054101, -30.309872972, -29.620506631, -28.961767426, -28.331657935,
+       -27.728350729, -27.150170666, -26.595579347, -26.063161449, -25.551612653,
+       -25.059728971, -24.586397283, -24.130586924, -23.691342183, -23.267775617,
+       -22.859062059, -22.464433249, -22.083173013, -21.714612923, -21.358128380,
+       -21.013135085, -20.679085834, -20.355467625, -20.041799025, -19.737627780,
+       -19.442528633, -19.156101346, -18.877968880, -18.607775743, -18.345186471,
+       -18.089884234, -17.841569567, -17.599959188, -17.364784926, -17.135792724,
+       -16.912741721, -16.695403411, -16.483560854, -16.277007960, -16.075548815,
+       -15.878997063, -15.687175327, -15.499914679, -15.317054137, -15.138440211,
+       -14.963926464, -14.793373118, -14.626646676, -14.463619573, -14.304169854,
+       -14.148180865, -13.995540969, -13.846143279, -13.699885410, -13.556669242,
+       -13.416400703, -13.278989557, -13.144349217, -13.012396559, -12.883051751,
+       -12.756238090, -12.631881854, -12.509912155, -12.390260806, -12.272862193,
+       -12.157653156, -12.044572872, -11.933562751, -11.824566335, -11.717529199,
+       -11.612398861, -11.509124699, -11.407657866, -11.307951213, -11.209959219,
+       -11.113637917, -11.018944833, -10.925838918, -10.834280493, -10.744231190,
+       -10.655653899, -10.568512718, -10.482772902, -10.398400817, -10.315363898,
+       -10.233630607, -10.153170388, -10.073953635, -9.995951652, -9.919136621,
+       -9.843481565, -9.768960318, -9.695547497, -9.623218470, -9.551949328,
+       -9.481716864, -9.412498540, -9.344272467, -9.277017384, -9.210712631,
+       -9.145338129, -9.080874364, -9.017302360, -8.954603669, -8.892760343,
+       -8.831754928, -8.771570437, -8.712190343, -8.653598556, -8.595779416,
+       -8.538717671, -8.482398471, -8.426807351, -8.371930218, -8.317753342,
+       -8.264263342, -8.211447175, -8.159292128, -8.107785804, -8.056916114,
+       -8.006671270, -7.957039771, -7.908010397, -7.859572199, -7.811714494,
+       -7.764426853, -7.717699097, -7.671521286, -7.625883716, -7.580776908,
+       -7.536191604, -7.492118760, -7.448549542, -7.405475315, -7.362887641,
+       -7.320778274, -7.279139153, -7.237962394, -7.197240293, -7.156965314,
+       -7.117130085, -7.077727398, -7.038750200, -7.000191591, -6.962044820,
+       -6.924303279, -6.886960501, -6.850010157, -6.813446049, -6.777262112,
+       -6.741452405, -6.706011111, -6.670932532, -6.636211087, -6.601841311,
+       -6.567817847, -6.534135449, -6.500788974, -6.467773382, -6.435083737,
+       -6.402715195, -6.370663013, -6.338922536, -6.307489204, -6.276358543,
+       -6.245526166, -6.214987771, -6.184739138, -6.154776127, -6.125094677,
+       -6.095690804, -6.066560597, -6.037700220, -6.009105907, -5.980773963,
+       -5.952700761, -5.924882740, -5.897316403, -5.869998319, -5.842925117,
+       -5.816093488, -5.789500181, -5.763142005, -5.737015825, -5.711118559,
+       -5.685447184, -5.659998726, -5.634770266, -5.609758932, -5.584961905,
+       -5.560376414, -5.535999735, -5.511829190, -5.487862148, -5.464096021,
+       -5.440528266, -5.417156383, -5.393977911, -5.370990435, -5.348191575,
+       -5.325578994, -5.303150391, -5.280903504, -5.258836107, -5.236946012,
+       -5.215231065, -5.193689147, -5.172318173, -5.151116092, -5.130080883,
+       -5.109210562, -5.088503171, -5.067956788, -5.047569516, -5.027339492,
+       -5.007264880, -4.987343871, -4.967574687, -4.947955576, -4.928484813,
+       -4.909160698, -4.889981558, -4.870945746, -4.852051640, -4.833297640,
+       -4.814682172, -4.796203685, -4.777860651, -4.759651566, -4.741574945,
+       -4.723629328, -4.705813275, -4.688125366, -4.670564204, -4.653128412,
+       -4.635816630, -4.618627520, -4.601559763, -4.584612059, -4.567783126,
+       -4.551071699, -4.534476534, -4.517996401, -4.501630089, -4.485376405,
+       -4.469234170, -4.453202224, -4.437279422, -4.421464634, -4.405756746,
+       -4.390154660, -4.374657292, -4.359263574, -4.343972451, -4.328782883,
+       -4.313693844, -4.298704322, -4.283813319, -4.269019847, -4.254322936,
+       -4.239721626, -4.225214970, -4.210802034, -4.196481895, -4.182253644,
+       -4.168116382, -4.154069223, -4.140111292, -4.126241726, -4.112459670,
+       -4.098764285, -4.085154739, -4.071630211, -4.058189891, -4.044832981,
+       -4.031558690, -4.018366238, -4.005254856, -3.992223784, -3.979272270,
+       -3.966399573, -3.953604961, -3.940887711, -3.928247108, -3.915682447,
+       -3.903193030, -3.890778170, -3.878437185, -3.866169405, -3.853974166,
+       -3.841850812, -3.829798694, -3.817817173, -3.805905617, -3.794063400,
+       -3.782289905, -3.770584522, -3.758946648, -3.747375686, -3.735871049,
+       -3.724432153, -3.713058424, -3.701749293, -3.690504199, -3.679322584,
+       -3.668203902, -3.657147608, -3.646153166, -3.635220047, -3.624347724,
+       -3.613535681, -3.602783405, -3.592090388, -3.581456130, -3.570880135,
+       -3.560361914, -3.549900982, -3.539496860, -3.529149074, -3.518857157,
+       -3.508620644, -3.498439078, -3.488312006, -3.478238979, -3.468219554,
+       -3.458253293, -3.448339762, -3.438478532, -3.428669179, -3.418911283,
+       -3.409204429, -3.399548206, -3.389942208, -3.380386033, -3.370879282,
+       -3.361421563, -3.352012486, -3.342651665, -3.333338720, -3.324073273,
+       -3.314854951, -3.305683385, -3.296558209, -3.287479061, -3.278445584,
+       -3.269457422, -3.260514226, -3.251615649, -3.242761346, -3.233950978,
+       -3.225184209, -3.216460706, -3.207780138, -3.199142179, -3.190546507,
+       -3.181992801, -3.173480746, -3.165010027, -3.156580334, -3.148191360,
+       -3.139842802, -3.131534357, -3.123265728, -3.115036620, -3.106846740,
+       -3.098695798, -3.090583510, -3.082509589, -3.074473757, -3.066475733,
+       -3.058515244, -3.050592015, -3.042705777, -3.034856262, -3.027043204,
+       -3.019266342, -3.011525416, -3.003820167, -2.996150340, -2.988515684,
+       -2.980915947, -2.973350883, -2.965820244, -2.958323788, -2.950861275,
+       -2.943432465, -2.936037121, -2.928675010, -2.921345899, -2.914049559,
+       -2.906785762, -2.899554281, -2.892354894, -2.885187378, -2.878051514,
+       -2.870947085, -2.863873875, -2.856831670, -2.849820259, -2.842839432,
+       -2.835888982, -2.828968701, -2.822078387, -2.815217837, -2.808386849,
+       -2.801585227, -2.794812772, -2.788069291, -2.781354588, -2.774668473,
+       -2.768010756, -2.761381248, -2.754779762, -2.748206114, -2.741660121,
+       -2.735141600, -2.728650371, -2.722186255, -2.715749076, -2.709338658,
+       -2.702954827, -2.696597411, -2.690266237, -2.683961138, -2.677681944,
+       -2.671428489, -2.665200608, -2.658998137, -2.652820913, -2.646668776,
+       -2.640541566, -2.634439124, -2.628361293, -2.622307918, -2.616278844,
+       -2.610273918, -2.604292988, -2.598335905, -2.592402518, -2.586492679,
+       -2.580606242, -2.574743061, -2.568902992, -2.563085891, -2.557291616,
+       -2.551520027, -2.545770984, -2.540044348, -2.534339981, -2.528657748,
+       -2.522997514, -2.517359143, -2.511742504, -2.506147463, -2.500573891,
+       -2.495021657, -2.489490633, -2.483980690, -2.478491703, -2.473023545,
+       -2.467576091, -2.462149219, -2.456742804, -2.451356726, -2.445990863,
+       -2.440645096, -2.435319305, -2.430013373, -2.424727182, -2.419460617,
+       -2.414213562, -2.408985903, -2.403777527, -2.398588320, -2.393418171,
+       -2.388266969, -2.383134604, -2.378020968, -2.372925951, -2.367849447,
+       -2.362791348, -2.357751549, -2.352729945, -2.347726431, -2.342740905,
+       -2.337773263, -2.332823403, -2.327891225, -2.322976628, -2.318079513,
+       -2.313199780, -2.308337332, -2.303492071, -2.298663901, -2.293852725,
+       -2.289058449, -2.284280978, -2.279520218, -2.274776076, -2.270048460,
+       -2.265337278, -2.260642439, -2.255963852, -2.251301428, -2.246655078,
+       -2.242024713, -2.237410245, -2.232811588, -2.228228655, -2.223661360,
+       -2.219109617, -2.214573343, -2.210052453, -2.205546863, -2.201056491,
+       -2.196581255, -2.192121073, -2.187675864, -2.183245548, -2.178830044,
+       -2.174429273, -2.170043157, -2.165671617, -2.161314576, -2.156971956,
+       -2.152643681, -2.148329675, -2.144029862, -2.139744168, -2.135472518,
+       -2.131214838, -2.126971054, -2.122741095, -2.118524886, -2.114322358,
+       -2.110133437, -2.105958054, -2.101796137, -2.097647617, -2.093512425,
+       -2.089390491, -2.085281748, -2.081186126, -2.077103559, -2.073033979,
+       -2.068977320, -2.064933515, -2.060902499, -2.056884206, -2.052878573,
+       -2.048885533, -2.044905024, -2.040936981, -2.036981342, -2.033038044,
+       -2.029107024, -2.025188221, -2.021281573, -2.017387020, -2.013504500,
+       -2.009633954, -2.005775321, -2.001928542, -1.998093558, -1.994270311,
+       -1.990458741, -1.986658792, -1.982870406, -1.979093525, -1.975328093,
+       -1.971574054, -1.967831351, -1.964099928, -1.960379731, -1.956670705,
+       -1.952972795, -1.949285946, -1.945610105, -1.941945218, -1.938291233,
+       -1.934648096, -1.931015754, -1.927394157, -1.923783251, -1.920182985,
+       -1.916593308, -1.913014170, -1.909445519, -1.905887306, -1.902339480,
+       -1.898801992, -1.895274793, -1.891757834, -1.888251066, -1.884754441,
+       -1.881267910, -1.877791427, -1.874324943, -1.870868412, -1.867421786,
+       -1.863985019, -1.860558065, -1.857140878, -1.853733412, -1.850335622,
+       -1.846947462, -1.843568888, -1.840199855, -1.836840319, -1.833490236,
+       -1.830149561, -1.826818252, -1.823496266, -1.820183559, -1.816880088,
+       -1.813585811, -1.810300687, -1.807024672, -1.803757726, -1.800499807,
+       -1.797250873, -1.794010885, -1.790779800, -1.787557579, -1.784344182,
+       -1.781139568, -1.777943698, -1.774756533, -1.771578032, -1.768408157,
+       -1.765246870, -1.762094132, -1.758949903, -1.755814148, -1.752686826,
+       -1.749567902, -1.746457337, -1.743355093, -1.740261136, -1.737175426,
+       -1.734097928, -1.731028606, -1.727967424, -1.724914344, -1.721869333,
+       -1.718832353, -1.715803371, -1.712782350, -1.709769257, -1.706764055,
+       -1.703766711, -1.700777191, -1.697795460, -1.694821485, -1.691855232,
+       -1.688896666, -1.685945756, -1.683002467, -1.680066768, -1.677138624,
+       -1.674218004, -1.671304875, -1.668399206, -1.665500963, -1.662610115,
+       -1.659726631, -1.656850478, -1.653981627, -1.651120045, -1.648265701,
+       -1.645418566, -1.642578607, -1.639745796, -1.636920101, -1.634101492,
+       -1.631289940, -1.628485414, -1.625687886, -1.622897326, -1.620113704,
+       -1.617336991, -1.614567159, -1.611804178, -1.609048020, -1.606298657,
+       -1.603556060, -1.600820201, -1.598091052, -1.595368585, -1.592652772,
+       -1.589943587, -1.587241001, -1.584544987, -1.581855518, -1.579172568,
+       -1.576496109, -1.573826115, -1.571162558, -1.568505414, -1.565854655,
+       -1.563210256, -1.560572190, -1.557940432, -1.555314956, -1.552695736,
+       -1.550082747, -1.547475964, -1.544875362, -1.542280915, -1.539692600,
+       -1.537110390, -1.534534261, -1.531964190, -1.529400151, -1.526842121,
+       -1.524290074, -1.521743989, -1.519203839, -1.516669602, -1.514141255,
+       -1.511618773, -1.509102134, -1.506591313, -1.504086289, -1.501587038,
+       -1.499093536, -1.496605763, -1.494123694, -1.491647307, -1.489176580,
+       -1.486711491, -1.484252017, -1.481798137, -1.479349828, -1.476907069,
+       -1.474469838, -1.472038113, -1.469611873, -1.467191096, -1.464775762,
+       -1.462365848, -1.459961335, -1.457562200, -1.455168424, -1.452779985,
+       -1.450396863, -1.448019037, -1.445646487, -1.443279193, -1.440917133,
+       -1.438560289, -1.436208641, -1.433862167, -1.431520849, -1.429184667,
+       -1.426853600, -1.424527631, -1.422206738, -1.419890903, -1.417580107,
+       -1.415274331, -1.412973555, -1.410677760, -1.408386928, -1.406101039,
+       -1.403820076, -1.401544020, -1.399272852, -1.397006553, -1.394745106,
+       -1.392488492, -1.390236693, -1.387989692, -1.385747469, -1.383510008,
+       -1.381277290, -1.379049298, -1.376826014, -1.374607421, -1.372393501,
+       -1.370184237, -1.367979611, -1.365779607, -1.363584208, -1.361393395,
+       -1.359207153, -1.357025465, -1.354848314, -1.352675682, -1.350507554,
+       -1.348343913, -1.346184743, -1.344030027, -1.341879748, -1.339733891,
+       -1.337592440, -1.335455378, -1.333322690, -1.331194359, -1.329070369,
+       -1.326950706, -1.324835353, -1.322724294, -1.320617515, -1.318514999,
+       -1.316416731, -1.314322696, -1.312232879, -1.310147264, -1.308065837,
+       -1.305988582, -1.303915484, -1.301846529, -1.299781701, -1.297720986,
+       -1.295664369, -1.293611836, -1.291563372, -1.289518962, -1.287478592,
+       -1.285442248, -1.283409916, -1.281381580, -1.279357228, -1.277336844,
+       -1.275320415, -1.273307928, -1.271299367, -1.269294719, -1.267293971,
+       -1.265297109, -1.263304118, -1.261314986, -1.259329699, -1.257348243,
+       -1.255370606, -1.253396773, -1.251426731, -1.249460468, -1.247497970,
+       -1.245539224, -1.243584216, -1.241632935, -1.239685366, -1.237741497,
+       -1.235801316, -1.233864809, -1.231931965, -1.230002769, -1.228077210,
+       -1.226155274, -1.224236951, -1.222322226, -1.220411089, -1.218503526,
+       -1.216599525, -1.214699074, -1.212802161, -1.210908773, -1.209018900,
+       -1.207132528, -1.205249646, -1.203370242, -1.201494304, -1.199621820,
+       -1.197752779, -1.195887168, -1.194024977, -1.192166194, -1.190310807,
+       -1.188458804, -1.186610175, -1.184764908, -1.182922991, -1.181084413,
+       -1.179249164, -1.177417231, -1.175588605, -1.173763272, -1.171941224,
+       -1.170122448, -1.168306933, -1.166494670, -1.164685646, -1.162879852,
+       -1.161077276, -1.159277907, -1.157481736, -1.155688751, -1.153898942,
+       -1.152112298, -1.150328808, -1.148548463, -1.146771253, -1.144997165,
+       -1.143226191, -1.141458320, -1.139693542, -1.137931846, -1.136173223,
+       -1.134417662, -1.132665154, -1.130915687, -1.129169254, -1.127425842,
+       -1.125685443, -1.123948047, -1.122213644, -1.120482224, -1.118753777,
+       -1.117028294, -1.115305765, -1.113586181, -1.111869531, -1.110155807,
+       -1.108444999, -1.106737097, -1.105032093, -1.103329976, -1.101630737,
+       -1.099934368, -1.098240858, -1.096550199, -1.094862381, -1.093177396,
+       -1.091495234, -1.089815886, -1.088139343, -1.086465597, -1.084794637,
+       -1.083126456, -1.081461044, -1.079798393, -1.078138493, -1.076481336,
+       -1.074826914, -1.073175217, -1.071526237, -1.069879965, -1.068236393,
+       -1.066595511, -1.064957313, -1.063321788, -1.061688929, -1.060058727,
+       -1.058431173, -1.056806260, -1.055183979, -1.053564322, -1.051947281,
+       -1.050332846, -1.048721011, -1.047111766, -1.045505105, -1.043901018,
+       -1.042299498, -1.040700536, -1.039104125, -1.037510256, -1.035918922,
+       -1.034330115, -1.032743826, -1.031160049, -1.029578775, -1.027999996,
+       -1.026423705, -1.024849894, -1.023278555, -1.021709681, -1.020143264,
+       -1.018579296, -1.017017770, -1.015458678, -1.013902012, -1.012347766,
+       -1.010795932, -1.009246502, -1.007699469, -1.006154825, -1.004612564,
+       -1.003072677, -1.001535159, -1.000000000, -0.998467195, -0.996936735,
+       -0.995408614, -0.993882825, -0.992359360, -0.990838213, -0.989319375,
+       -0.987802841, -0.986288604, -0.984776655, -0.983266989, -0.981759598,
+       -0.980254476, -0.978751615, -0.977251008, -0.975752650, -0.974256533,
+       -0.972762649, -0.971270994, -0.969781559, -0.968294338, -0.966809325,
+       -0.965326512, -0.963845894, -0.962367463, -0.960891213, -0.959417137,
+       -0.957945229, -0.956475483, -0.955007891, -0.953542448, -0.952079147,
+       -0.950617981, -0.949158944, -0.947702031, -0.946247233, -0.944794546,
+       -0.943343963, -0.941895477, -0.940449083, -0.939004773, -0.937562543,
+       -0.936122385, -0.934684294, -0.933248264, -0.931814287, -0.930382359,
+       -0.928952473, -0.927524624, -0.926098804, -0.924675008, -0.923253231,
+       -0.921833466, -0.920415707, -0.918999948, -0.917586184, -0.916174408,
+       -0.914764615, -0.913356799, -0.911950954, -0.910547074, -0.909145154,
+       -0.907745187, -0.906347169, -0.904951093, -0.903556954, -0.902164745,
+       -0.900774462, -0.899386099, -0.897999649, -0.896615109, -0.895232471,
+       -0.893851731, -0.892472882, -0.891095920, -0.889720839, -0.888347634,
+       -0.886976298, -0.885606827, -0.884239215, -0.882873457, -0.881509547,
+       -0.880147481, -0.878787252, -0.877428856, -0.876072286, -0.874717539,
+       -0.873364608, -0.872013488, -0.870664175, -0.869316662, -0.867970945,
+       -0.866627019, -0.865284878, -0.863944518, -0.862605932, -0.861269117,
+       -0.859934067, -0.858600776, -0.857269241, -0.855939455, -0.854611414,
+       -0.853285113, -0.851960547, -0.850637711, -0.849316600, -0.847997209,
+       -0.846679533, -0.845363568, -0.844049308, -0.842736748, -0.841425884,
+       -0.840116711, -0.838809224, -0.837503418, -0.836199289, -0.834896832,
+       -0.833596041, -0.832296913, -0.830999443, -0.829703625, -0.828409455,
+       -0.827116929, -0.825826042, -0.824536790, -0.823249167, -0.821963168,
+       -0.820678791, -0.819396029, -0.818114879, -0.816835335, -0.815557394,
+       -0.814281050, -0.813006300, -0.811733139, -0.810461561, -0.809191564,
+       -0.807923142, -0.806656292, -0.805391007, -0.804127285, -0.802865121,
+       -0.801604511, -0.800345449, -0.799087933, -0.797831957, -0.796577517,
+       -0.795324609, -0.794073229, -0.792823372, -0.791575034, -0.790328211,
+       -0.789082899, -0.787839093, -0.786596789, -0.785355984, -0.784116672,
+       -0.782878850, -0.781642514, -0.780407660, -0.779174282, -0.777942378,
+       -0.776711944, -0.775482974, -0.774255466, -0.773029414, -0.771804816,
+       -0.770581666, -0.769359962, -0.768139698, -0.766920872, -0.765703478,
+       -0.764487514, -0.763272975, -0.762059857, -0.760848156, -0.759637869,
+       -0.758428991, -0.757221519, -0.756015448, -0.754810775, -0.753607497,
+       -0.752405608, -0.751205106, -0.750005987, -0.748808246, -0.747611881,
+       -0.746416886, -0.745223260, -0.744030996, -0.742840093, -0.741650546,
+       -0.740462352, -0.739275506, -0.738090006, -0.736905847, -0.735723026,
+       -0.734541539, -0.733361383, -0.732182553, -0.731005047, -0.729828860,
+       -0.728653990, -0.727480432, -0.726308183, -0.725137239, -0.723967597,
+       -0.722799253, -0.721632204, -0.720466446, -0.719301976, -0.718138789,
+       -0.716976884, -0.715816256, -0.714656901, -0.713498817, -0.712341999,
+       -0.711186445, -0.710032151, -0.708879114, -0.707727329, -0.706576795,
+       -0.705427506, -0.704279461, -0.703132655, -0.701987086, -0.700842749,
+       -0.699699642, -0.698557762, -0.697417104, -0.696277666, -0.695139444,
+       -0.694002436, -0.692866637, -0.691732044, -0.690598655, -0.689466467,
+       -0.688335474, -0.687205676, -0.686077068, -0.684949646, -0.683823409,
+       -0.682698353, -0.681574474, -0.680451770, -0.679330237, -0.678209872,
+       -0.677090672, -0.675972634, -0.674855755, -0.673740031, -0.672625460,
+       -0.671512038, -0.670399762, -0.669288630, -0.668178638, -0.667069783,
+       -0.665962062, -0.664855472, -0.663750011, -0.662645674, -0.661542459,
+       -0.660440363, -0.659339383, -0.658239516, -0.657140759, -0.656043109,
+       -0.654946564, -0.653851119, -0.652756772, -0.651663521, -0.650571362,
+       -0.649480293, -0.648390309, -0.647301410, -0.646213591, -0.645126850,
+       -0.644041184, -0.642956590, -0.641873065, -0.640790606, -0.639709211,
+       -0.638628877, -0.637549600, -0.636471379, -0.635394210, -0.634318090,
+       -0.633243016, -0.632168987, -0.631095998, -0.630024048, -0.628953133,
+       -0.627883251, -0.626814399, -0.625746574, -0.624679773, -0.623613995,
+       -0.622549235, -0.621485492, -0.620422762, -0.619361043, -0.618300333,
+       -0.617240628, -0.616181926, -0.615124224, -0.614067520, -0.613011811,
+       -0.611957094, -0.610903366, -0.609850626, -0.608798870, -0.607748096,
+       -0.606698301, -0.605649482, -0.604601638, -0.603554764, -0.602508860,
+       -0.601463922, -0.600419947, -0.599376934, -0.598334879, -0.597293780,
+       -0.596253634, -0.595214440, -0.594176194, -0.593138893, -0.592102537,
+       -0.591067120, -0.590032643, -0.588999101, -0.587966493, -0.586934815,
+       -0.585904066, -0.584874243, -0.583845344, -0.582817365, -0.581790306,
+       -0.580764162, -0.579738932, -0.578714614, -0.577691204, -0.576668701,
+       -0.575647102, -0.574626405, -0.573606607, -0.572587706, -0.571569700,
+       -0.570552585, -0.569536361, -0.568521024, -0.567506572, -0.566493003,
+       -0.565480314, -0.564468503, -0.563457568, -0.562447507, -0.561438316,
+       -0.560429994, -0.559422539, -0.558415948, -0.557410219, -0.556405349,
+       -0.555401337, -0.554398180, -0.553395875, -0.552394421, -0.551393815,
+       -0.550394056, -0.549395139, -0.548397065, -0.547399830, -0.546403431,
+       -0.545407868, -0.544413137, -0.543419236, -0.542426164, -0.541433918,
+       -0.540442495, -0.539451894, -0.538462112, -0.537473148, -0.536484998,
+       -0.535497662, -0.534511136, -0.533525419, -0.532540508, -0.531556401,
+       -0.530573097, -0.529590592, -0.528608885, -0.527627974, -0.526647857,
+       -0.525668531, -0.524689995, -0.523712245, -0.522735281, -0.521759100,
+       -0.520783700, -0.519809079, -0.518835235, -0.517862165, -0.516889869,
+       -0.515918342, -0.514947585, -0.513977594, -0.513008367, -0.512039903,
+       -0.511072199, -0.510105254, -0.509139064, -0.508173630, -0.507208947,
+       -0.506245015, -0.505281831, -0.504319393, -0.503357700, -0.502396749,
+       -0.501436538, -0.500477065, -0.499518329, -0.498560327, -0.497603058,
+       -0.496646518, -0.495690708, -0.494735624, -0.493781264, -0.492827627,
+       -0.491874711, -0.490922513, -0.489971033, -0.489020267, -0.488070214,
+       -0.487120872, -0.486172239, -0.485224313, -0.484277093, -0.483330576,
+       -0.482384761, -0.481439645, -0.480495227, -0.479551505, -0.478608477,
+       -0.477666140, -0.476724495, -0.475783537, -0.474843266, -0.473903680,
+       -0.472964776, -0.472026553, -0.471089010, -0.470152143, -0.469215952,
+       -0.468280435, -0.467345590, -0.466411414, -0.465477907, -0.464545066,
+       -0.463612889, -0.462681375, -0.461750522, -0.460820328, -0.459890792,
+       -0.458961911, -0.458033683, -0.457106108, -0.456179183, -0.455252906,
+       -0.454327276, -0.453402291, -0.452477949, -0.451554248, -0.450631187,
+       -0.449708763, -0.448786976, -0.447865823, -0.446945303, -0.446025414,
+       -0.445106154, -0.444187521, -0.443269514, -0.442352131, -0.441435370,
+       -0.440519230, -0.439603709, -0.438688805, -0.437774516, -0.436860841,
+       -0.435947779, -0.435035326, -0.434123483, -0.433212246, -0.432301615,
+       -0.431391587, -0.430482162, -0.429573336, -0.428665110, -0.427757480,
+       -0.426850446, -0.425944006, -0.425038157, -0.424132899, -0.423228230,
+       -0.422324148, -0.421420651, -0.420517739, -0.419615408, -0.418713658,
+       -0.417812488, -0.416911894, -0.416011877, -0.415112433, -0.414213562,
+       -0.413315262, -0.412417532, -0.411520369, -0.410623772, -0.409727740,
+       -0.408832271, -0.407937364, -0.407043016, -0.406149226, -0.405255993,
+       -0.404363316, -0.403471191, -0.402579619, -0.401688597, -0.400798124,
+       -0.399908199, -0.399018819, -0.398129983, -0.397241690, -0.396353938,
+       -0.395466726, -0.394580051, -0.393693914, -0.392808311, -0.391923242,
+       -0.391038704, -0.390154697, -0.389271219, -0.388388269, -0.387505844,
+       -0.386623944, -0.385742566, -0.384861710, -0.383981374, -0.383101556,
+       -0.382222255, -0.381343470, -0.380465198, -0.379587439, -0.378710191,
+       -0.377833452, -0.376957221, -0.376081497, -0.375206278, -0.374331562,
+       -0.373457349, -0.372583636, -0.371710423, -0.370837707, -0.369965487,
+       -0.369093763, -0.368222532, -0.367351792, -0.366481544, -0.365611784,
+       -0.364742512, -0.363873726, -0.363005426, -0.362137608, -0.361270272,
+       -0.360403417, -0.359537042, -0.358671143, -0.357805721, -0.356940774,
+       -0.356076301, -0.355212299, -0.354348768, -0.353485706, -0.352623113,
+       -0.351760985, -0.350899323, -0.350038125, -0.349177388, -0.348317113,
+       -0.347457297, -0.346597939, -0.345739039, -0.344880593, -0.344022602,
+       -0.343165063, -0.342307975, -0.341451338, -0.340595149, -0.339739407,
+       -0.338884111, -0.338029260, -0.337174851, -0.336320885, -0.335467359,
+       -0.334614272, -0.333761623, -0.332909410, -0.332057633, -0.331206289,
+       -0.330355377, -0.329504897, -0.328654846, -0.327805224, -0.326956029,
+       -0.326107260, -0.325258916, -0.324410994, -0.323563494, -0.322716415,
+       -0.321869755, -0.321023513, -0.320177688, -0.319332278, -0.318487282,
+       -0.317642699, -0.316798527, -0.315954765, -0.315111412, -0.314268467,
+       -0.313425928, -0.312583794, -0.311742064, -0.310900736, -0.310059809,
+       -0.309219282, -0.308379154, -0.307539423, -0.306700088, -0.305861148,
+       -0.305022601, -0.304184447, -0.303346684, -0.302509310, -0.301672325,
+       -0.300835727, -0.299999515, -0.299163688, -0.298328244, -0.297493183,
+       -0.296658503, -0.295824202, -0.294990280, -0.294156735, -0.293323566,
+       -0.292490772, -0.291658351, -0.290826303, -0.289994626, -0.289163319,
+       -0.288332380, -0.287501809, -0.286671605, -0.285841765, -0.285012289,
+       -0.284183175, -0.283354423, -0.282526031, -0.281697998, -0.280870323,
+       -0.280043004, -0.279216041, -0.278389431, -0.277563175, -0.276737270,
+       -0.275911716, -0.275086511, -0.274261655, -0.273437145, -0.272612981,
+       -0.271789161, -0.270965686, -0.270142552, -0.269319759, -0.268497306,
+       -0.267675192, -0.266853415, -0.266031975, -0.265210870, -0.264390098,
+       -0.263569660, -0.262749553, -0.261929777, -0.261110330, -0.260291211,
+       -0.259472419, -0.258653953, -0.257835812, -0.257017994, -0.256200498,
+       -0.255383324, -0.254566470, -0.253749935, -0.252933717, -0.252117817,
+       -0.251302231, -0.250486960, -0.249672002, -0.248857357, -0.248043022,
+       -0.247228997, -0.246415280, -0.245601872, -0.244788769, -0.243975972,
+       -0.243163479, -0.242351289, -0.241539401, -0.240727813, -0.239916525,
+       -0.239105536, -0.238294844, -0.237484449, -0.236674348, -0.235864542,
+       -0.235055029, -0.234245807, -0.233436876, -0.232628235, -0.231819882,
+       -0.231011817, -0.230204038, -0.229396544, -0.228589335, -0.227782408,
+       -0.226975763, -0.226169399, -0.225363315, -0.224557509, -0.223751981,
+       -0.222946729, -0.222141753, -0.221337051, -0.220532622, -0.219728465,
+       -0.218924579, -0.218120964, -0.217317617, -0.216514537, -0.215711725,
+       -0.214909178, -0.214106895, -0.213304876, -0.212503119, -0.211701624,
+       -0.210900389, -0.210099413, -0.209298695, -0.208498234, -0.207698030,
+       -0.206898080, -0.206098384, -0.205298940, -0.204499749, -0.203700808,
+       -0.202902117, -0.202103674, -0.201305479, -0.200507530, -0.199709826,
+       -0.198912367, -0.198115152, -0.197318178, -0.196521446, -0.195724954,
+       -0.194928700, -0.194132685, -0.193336907, -0.192541365, -0.191746058,
+       -0.190950985, -0.190156145, -0.189361536, -0.188567158, -0.187773010,
+       -0.186979091, -0.186185400, -0.185391935, -0.184598695, -0.183805680,
+       -0.183012889, -0.182220321, -0.181427973, -0.180635847, -0.179843940,
+       -0.179052251, -0.178260779, -0.177469525, -0.176678485, -0.175887660,
+       -0.175097048, -0.174306648, -0.173516460, -0.172726482, -0.171936714,
+       -0.171147153, -0.170357800, -0.169568653, -0.168779712, -0.167990974,
+       -0.167202440, -0.166414108, -0.165625977, -0.164838047, -0.164050316,
+       -0.163262782, -0.162475447, -0.161688307, -0.160901362, -0.160114612,
+       -0.159328055, -0.158541690, -0.157755517, -0.156969533, -0.156183739,
+       -0.155398133, -0.154612715, -0.153827482, -0.153042435, -0.152257572,
+       -0.151472893, -0.150688395, -0.149904079, -0.149119944, -0.148335988,
+       -0.147552210, -0.146768609, -0.145985185, -0.145201936, -0.144418862,
+       -0.143635961, -0.142853233, -0.142070676, -0.141288290, -0.140506073,
+       -0.139724025, -0.138942144, -0.138160430, -0.137378882, -0.136597499,
+       -0.135816279, -0.135035222, -0.134254326, -0.133473592, -0.132693017,
+       -0.131912601, -0.131132343, -0.130352242, -0.129572297, -0.128792507,
+       -0.128012871, -0.127233388, -0.126454057, -0.125674878, -0.124895848,
+       -0.124116968, -0.123338236, -0.122559652, -0.121781213, -0.121002920,
+       -0.120224772, -0.119446767, -0.118668905, -0.117891184, -0.117113604,
+       -0.116336164, -0.115558862, -0.114781698, -0.114004671, -0.113227780,
+       -0.112451023, -0.111674401, -0.110897912, -0.110121554, -0.109345328,
+       -0.108569232, -0.107793266, -0.107017427, -0.106241716, -0.105466132,
+       -0.104690673, -0.103915338, -0.103140127, -0.102365039, -0.101590072,
+       -0.100815226, -0.100040500, -0.099265893, -0.098491403, -0.097717031,
+       -0.096942775, -0.096168634, -0.095394607, -0.094620693, -0.093846892,
+       -0.093073202, -0.092299623, -0.091526153, -0.090752791, -0.089979538,
+       -0.089206391, -0.088433349, -0.087660413, -0.086887581, -0.086114851,
+       -0.085342224, -0.084569698, -0.083797272, -0.083024945, -0.082252717,
+       -0.081480586, -0.080708551, -0.079936612, -0.079164768, -0.078393018,
+       -0.077621360, -0.076849794, -0.076078320, -0.075306935, -0.074535639,
+       -0.073764432, -0.072993311, -0.072222277, -0.071451329, -0.070680465,
+       -0.069909684, -0.069138987, -0.068368371, -0.067597835, -0.066827380,
+       -0.066057004, -0.065286705, -0.064516484, -0.063746339, -0.062976270,
+       -0.062206274, -0.061436353, -0.060666503, -0.059896726, -0.059127019,
+       -0.058357382, -0.057587814, -0.056818314, -0.056048880, -0.055279514,
+       -0.054510212, -0.053740974, -0.052971800, -0.052202689, -0.051433639,
+       -0.050664650, -0.049895720, -0.049126850, -0.048358037, -0.047589281,
+       -0.046820582, -0.046051938, -0.045283348, -0.044514811, -0.043746327,
+       -0.042977894, -0.042209512, -0.041441180, -0.040672897, -0.039904661,
+       -0.039136473, -0.038368331, -0.037600234, -0.036832181, -0.036064172,
+       -0.035296205, -0.034528279, -0.033760395, -0.032992550, -0.032224744,
+       -0.031456976, -0.030689245, -0.029921550, -0.029153891, -0.028386265,
+       -0.027618673, -0.026851114, -0.026083586, -0.025316089, -0.024548622,
+       -0.023781184, -0.023013773, -0.022246390, -0.021479033, -0.020711701,
+       -0.019944394, -0.019177110, -0.018409849, -0.017642609, -0.016875390,
+       -0.016108191, -0.015341011, -0.014573849, -0.013806704, -0.013039576,
+       -0.012272462, -0.011505364, -0.010738278, -0.009971206, -0.009204145,
+       -0.008437095, -0.007670054, -0.006903023, -0.006136000, -0.005368984,
+       -0.004601975, -0.003834971, -0.003067971, -0.002300975, -0.001533982,
+       -0.000766991, 0.000000000, 0.000766991, 0.001533982, 0.002300975,
+       0.003067971, 0.003834971, 0.004601975, 0.005368984, 0.006136000,
+       0.006903023, 0.007670054, 0.008437095, 0.009204145, 0.009971206,
+       0.010738278, 0.011505364, 0.012272462, 0.013039576, 0.013806704,
+       0.014573849, 0.015341011, 0.016108191, 0.016875390, 0.017642609,
+       0.018409849, 0.019177110, 0.019944394, 0.020711701, 0.021479033,
+       0.022246390, 0.023013773, 0.023781184, 0.024548622, 0.025316089,
+       0.026083586, 0.026851114, 0.027618673, 0.028386265, 0.029153891,
+       0.029921550, 0.030689245, 0.031456976, 0.032224744, 0.032992550,
+       0.033760395, 0.034528279, 0.035296205, 0.036064172, 0.036832181,
+       0.037600234, 0.038368331, 0.039136473, 0.039904661, 0.040672897,
+       0.041441180, 0.042209512, 0.042977894, 0.043746327, 0.044514811,
+       0.045283348, 0.046051938, 0.046820582, 0.047589281, 0.048358037,
+       0.049126850, 0.049895720, 0.050664650, 0.051433639, 0.052202689,
+       0.052971800, 0.053740974, 0.054510212, 0.055279514, 0.056048880,
+       0.056818314, 0.057587814, 0.058357382, 0.059127019, 0.059896726,
+       0.060666503, 0.061436353, 0.062206274, 0.062976270, 0.063746339,
+       0.064516484, 0.065286705, 0.066057004, 0.066827380, 0.067597835,
+       0.068368371, 0.069138987, 0.069909684, 0.070680465, 0.071451329,
+       0.072222277, 0.072993311, 0.073764432, 0.074535639, 0.075306935,
+       0.076078320, 0.076849794, 0.077621360, 0.078393018, 0.079164768,
+       0.079936612, 0.080708551, 0.081480586, 0.082252717, 0.083024945,
+       0.083797272, 0.084569698, 0.085342224, 0.086114851, 0.086887581,
+       0.087660413, 0.088433349, 0.089206391, 0.089979538, 0.090752791,
+       0.091526153, 0.092299623, 0.093073202, 0.093846892, 0.094620693,
+       0.095394607, 0.096168634, 0.096942775, 0.097717031, 0.098491403,
+       0.099265893, 0.100040500, 0.100815226, 0.101590072, 0.102365039,
+       0.103140127, 0.103915338, 0.104690673, 0.105466132, 0.106241716,
+       0.107017427, 0.107793266, 0.108569232, 0.109345328, 0.110121554,
+       0.110897912, 0.111674401, 0.112451023, 0.113227780, 0.114004671,
+       0.114781698, 0.115558862, 0.116336164, 0.117113604, 0.117891184,
+       0.118668905, 0.119446767, 0.120224772, 0.121002920, 0.121781213,
+       0.122559652, 0.123338236, 0.124116968, 0.124895848, 0.125674878,
+       0.126454057, 0.127233388, 0.128012871, 0.128792507, 0.129572297,
+       0.130352242, 0.131132343, 0.131912601, 0.132693017, 0.133473592,
+       0.134254326, 0.135035222, 0.135816279, 0.136597499, 0.137378882,
+       0.138160430, 0.138942144, 0.139724025, 0.140506073, 0.141288290,
+       0.142070676, 0.142853233, 0.143635961, 0.144418862, 0.145201936,
+       0.145985185, 0.146768609, 0.147552210, 0.148335988, 0.149119944,
+       0.149904079, 0.150688395, 0.151472893, 0.152257572, 0.153042435,
+       0.153827482, 0.154612715, 0.155398133, 0.156183739, 0.156969533,
+       0.157755517, 0.158541690, 0.159328055, 0.160114612, 0.160901362,
+       0.161688307, 0.162475447, 0.163262782, 0.164050316, 0.164838047,
+       0.165625977, 0.166414108, 0.167202440, 0.167990974, 0.168779712,
+       0.169568653, 0.170357800, 0.171147153, 0.171936714, 0.172726482,
+       0.173516460, 0.174306648, 0.175097048, 0.175887660, 0.176678485,
+       0.177469525, 0.178260779, 0.179052251, 0.179843940, 0.180635847,
+       0.181427973, 0.182220321, 0.183012889, 0.183805680, 0.184598695,
+       0.185391935, 0.186185400, 0.186979091, 0.187773010, 0.188567158,
+       0.189361536, 0.190156145, 0.190950985, 0.191746058, 0.192541365,
+       0.193336907, 0.194132685, 0.194928700, 0.195724954, 0.196521446,
+       0.197318178, 0.198115152, 0.198912367, 0.199709826, 0.200507530,
+       0.201305479, 0.202103674, 0.202902117, 0.203700808, 0.204499749,
+       0.205298940, 0.206098384, 0.206898080, 0.207698030, 0.208498234,
+       0.209298695, 0.210099413, 0.210900389, 0.211701624, 0.212503119,
+       0.213304876, 0.214106895, 0.214909178, 0.215711725, 0.216514537,
+       0.217317617, 0.218120964, 0.218924579, 0.219728465, 0.220532622,
+       0.221337051, 0.222141753, 0.222946729, 0.223751981, 0.224557509,
+       0.225363315, 0.226169399, 0.226975763, 0.227782408, 0.228589335,
+       0.229396544, 0.230204038, 0.231011817, 0.231819882, 0.232628235,
+       0.233436876, 0.234245807, 0.235055029, 0.235864542, 0.236674348,
+       0.237484449, 0.238294844, 0.239105536, 0.239916525, 0.240727813,
+       0.241539401, 0.242351289, 0.243163479, 0.243975972, 0.244788769,
+       0.245601872, 0.246415280, 0.247228997, 0.248043022, 0.248857357,
+       0.249672002, 0.250486960, 0.251302231, 0.252117817, 0.252933717,
+       0.253749935, 0.254566470, 0.255383324, 0.256200498, 0.257017994,
+       0.257835812, 0.258653953, 0.259472419, 0.260291211, 0.261110330,
+       0.261929777, 0.262749553, 0.263569660, 0.264390098, 0.265210870,
+       0.266031975, 0.266853415, 0.267675192, 0.268497306, 0.269319759,
+       0.270142552, 0.270965686, 0.271789161, 0.272612981, 0.273437145,
+       0.274261655, 0.275086511, 0.275911716, 0.276737270, 0.277563175,
+       0.278389431, 0.279216041, 0.280043004, 0.280870323, 0.281697998,
+       0.282526031, 0.283354423, 0.284183175, 0.285012289, 0.285841765,
+       0.286671605, 0.287501809, 0.288332380, 0.289163319, 0.289994626,
+       0.290826303, 0.291658351, 0.292490772, 0.293323566, 0.294156735,
+       0.294990280, 0.295824202, 0.296658503, 0.297493183, 0.298328244,
+       0.299163688, 0.299999515, 0.300835727, 0.301672325, 0.302509310,
+       0.303346684, 0.304184447, 0.305022601, 0.305861148, 0.306700088,
+       0.307539423, 0.308379154, 0.309219282, 0.310059809, 0.310900736,
+       0.311742064, 0.312583794, 0.313425928, 0.314268467, 0.315111412,
+       0.315954765, 0.316798527, 0.317642699, 0.318487282, 0.319332278,
+       0.320177688, 0.321023513, 0.321869755, 0.322716415, 0.323563494,
+       0.324410994, 0.325258916, 0.326107260, 0.326956029, 0.327805224,
+       0.328654846, 0.329504897, 0.330355377, 0.331206289, 0.332057633,
+       0.332909410, 0.333761623, 0.334614272, 0.335467359, 0.336320885,
+       0.337174851, 0.338029260, 0.338884111, 0.339739407, 0.340595149,
+       0.341451338, 0.342307975, 0.343165063, 0.344022602, 0.344880593,
+       0.345739039, 0.346597939, 0.347457297, 0.348317113, 0.349177388,
+       0.350038125, 0.350899323, 0.351760985, 0.352623113, 0.353485706,
+       0.354348768, 0.355212299, 0.356076301, 0.356940774, 0.357805721,
+       0.358671143, 0.359537042, 0.360403417, 0.361270272, 0.362137608,
+       0.363005426, 0.363873726, 0.364742512, 0.365611784, 0.366481544,
+       0.367351792, 0.368222532, 0.369093763, 0.369965487, 0.370837707,
+       0.371710423, 0.372583636, 0.373457349, 0.374331562, 0.375206278,
+       0.376081497, 0.376957221, 0.377833452, 0.378710191, 0.379587439,
+       0.380465198, 0.381343470, 0.382222255, 0.383101556, 0.383981374,
+       0.384861710, 0.385742566, 0.386623944, 0.387505844, 0.388388269,
+       0.389271219, 0.390154697, 0.391038704, 0.391923242, 0.392808311,
+       0.393693914, 0.394580051, 0.395466726, 0.396353938, 0.397241690,
+       0.398129983, 0.399018819, 0.399908199, 0.400798124, 0.401688597,
+       0.402579619, 0.403471191, 0.404363316, 0.405255993, 0.406149226,
+       0.407043016, 0.407937364, 0.408832271, 0.409727740, 0.410623772,
+       0.411520369, 0.412417532, 0.413315262, 0.414213562, 0.415112433,
+       0.416011877, 0.416911894, 0.417812488, 0.418713658, 0.419615408,
+       0.420517739, 0.421420651, 0.422324148, 0.423228230, 0.424132899,
+       0.425038157, 0.425944006, 0.426850446, 0.427757480, 0.428665110,
+       0.429573336, 0.430482162, 0.431391587, 0.432301615, 0.433212246,
+       0.434123483, 0.435035326, 0.435947779, 0.436860841, 0.437774516,
+       0.438688805, 0.439603709, 0.440519230, 0.441435370, 0.442352131,
+       0.443269514, 0.444187521, 0.445106154, 0.446025414, 0.446945303,
+       0.447865823, 0.448786976, 0.449708763, 0.450631187, 0.451554248,
+       0.452477949, 0.453402291, 0.454327276, 0.455252906, 0.456179183,
+       0.457106108, 0.458033683, 0.458961911, 0.459890792, 0.460820328,
+       0.461750522, 0.462681375, 0.463612889, 0.464545066, 0.465477907,
+       0.466411414, 0.467345590, 0.468280435, 0.469215952, 0.470152143,
+       0.471089010, 0.472026553, 0.472964776, 0.473903680, 0.474843266,
+       0.475783537, 0.476724495, 0.477666140, 0.478608477, 0.479551505,
+       0.480495227, 0.481439645, 0.482384761, 0.483330576, 0.484277093,
+       0.485224313, 0.486172239, 0.487120872, 0.488070214, 0.489020267,
+       0.489971033, 0.490922513, 0.491874711, 0.492827627, 0.493781264,
+       0.494735624, 0.495690708, 0.496646518, 0.497603058, 0.498560327,
+       0.499518329, 0.500477065, 0.501436538, 0.502396749, 0.503357700,
+       0.504319393, 0.505281831, 0.506245015, 0.507208947, 0.508173630,
+       0.509139064, 0.510105254, 0.511072199, 0.512039903, 0.513008367,
+       0.513977594, 0.514947585, 0.515918342, 0.516889869, 0.517862165,
+       0.518835235, 0.519809079, 0.520783700, 0.521759100, 0.522735281,
+       0.523712245, 0.524689995, 0.525668531, 0.526647857, 0.527627974,
+       0.528608885, 0.529590592, 0.530573097, 0.531556401, 0.532540508,
+       0.533525419, 0.534511136, 0.535497662, 0.536484998, 0.537473148,
+       0.538462112, 0.539451894, 0.540442495, 0.541433918, 0.542426164,
+       0.543419236, 0.544413137, 0.545407868, 0.546403431, 0.547399830,
+       0.548397065, 0.549395139, 0.550394056, 0.551393815, 0.552394421,
+       0.553395875, 0.554398180, 0.555401337, 0.556405349, 0.557410219,
+       0.558415948, 0.559422539, 0.560429994, 0.561438316, 0.562447507,
+       0.563457568, 0.564468503, 0.565480314, 0.566493003, 0.567506572,
+       0.568521024, 0.569536361, 0.570552585, 0.571569700, 0.572587706,
+       0.573606607, 0.574626405, 0.575647102, 0.576668701, 0.577691204,
+       0.578714614, 0.579738932, 0.580764162, 0.581790306, 0.582817365,
+       0.583845344, 0.584874243, 0.585904066, 0.586934815, 0.587966493,
+       0.588999101, 0.590032643, 0.591067120, 0.592102537, 0.593138893,
+       0.594176194, 0.595214440, 0.596253634, 0.597293780, 0.598334879,
+       0.599376934, 0.600419947, 0.601463922, 0.602508860, 0.603554764,
+       0.604601638, 0.605649482, 0.606698301, 0.607748096, 0.608798870,
+       0.609850626, 0.610903366, 0.611957094, 0.613011811, 0.614067520,
+       0.615124224, 0.616181926, 0.617240628, 0.618300333, 0.619361043,
+       0.620422762, 0.621485492, 0.622549235, 0.623613995, 0.624679773,
+       0.625746574, 0.626814399, 0.627883251, 0.628953133, 0.630024048,
+       0.631095998, 0.632168987, 0.633243016, 0.634318090, 0.635394210,
+       0.636471379, 0.637549600, 0.638628877, 0.639709211, 0.640790606,
+       0.641873065, 0.642956590, 0.644041184, 0.645126850, 0.646213591,
+       0.647301410, 0.648390309, 0.649480293, 0.650571362, 0.651663521,
+       0.652756772, 0.653851119, 0.654946564, 0.656043109, 0.657140759,
+       0.658239516, 0.659339383, 0.660440363, 0.661542459, 0.662645674,
+       0.663750011, 0.664855472, 0.665962062, 0.667069783, 0.668178638,
+       0.669288630, 0.670399762, 0.671512038, 0.672625460, 0.673740031,
+       0.674855755, 0.675972634, 0.677090672, 0.678209872, 0.679330237,
+       0.680451770, 0.681574474, 0.682698353, 0.683823409, 0.684949646,
+       0.686077068, 0.687205676, 0.688335474, 0.689466467, 0.690598655,
+       0.691732044, 0.692866637, 0.694002436, 0.695139444, 0.696277666,
+       0.697417104, 0.698557762, 0.699699642, 0.700842749, 0.701987086,
+       0.703132655, 0.704279461, 0.705427506, 0.706576795, 0.707727329,
+       0.708879114, 0.710032151, 0.711186445, 0.712341999, 0.713498817,
+       0.714656901, 0.715816256, 0.716976884, 0.718138789, 0.719301976,
+       0.720466446, 0.721632204, 0.722799253, 0.723967597, 0.725137239,
+       0.726308183, 0.727480432, 0.728653990, 0.729828860, 0.731005047,
+       0.732182553, 0.733361383, 0.734541539, 0.735723026, 0.736905847,
+       0.738090006, 0.739275506, 0.740462352, 0.741650546, 0.742840093,
+       0.744030996, 0.745223260, 0.746416886, 0.747611881, 0.748808246,
+       0.750005987, 0.751205106, 0.752405608, 0.753607497, 0.754810775,
+       0.756015448, 0.757221519, 0.758428991, 0.759637869, 0.760848156,
+       0.762059857, 0.763272975, 0.764487514, 0.765703478, 0.766920872,
+       0.768139698, 0.769359962, 0.770581666, 0.771804816, 0.773029414,
+       0.774255466, 0.775482974, 0.776711944, 0.777942378, 0.779174282,
+       0.780407660, 0.781642514, 0.782878850, 0.784116672, 0.785355984,
+       0.786596789, 0.787839093, 0.789082899, 0.790328211, 0.791575034,
+       0.792823372, 0.794073229, 0.795324609, 0.796577517, 0.797831957,
+       0.799087933, 0.800345449, 0.801604511, 0.802865121, 0.804127286,
+       0.805391007, 0.806656292, 0.807923142, 0.809191564, 0.810461561,
+       0.811733139, 0.813006300, 0.814281050, 0.815557394, 0.816835335,
+       0.818114879, 0.819396029, 0.820678791, 0.821963168, 0.823249167,
+       0.824536790, 0.825826042, 0.827116929, 0.828409455, 0.829703625,
+       0.830999443, 0.832296913, 0.833596041, 0.834896832, 0.836199289,
+       0.837503418, 0.838809224, 0.840116711, 0.841425884, 0.842736748,
+       0.844049308, 0.845363568, 0.846679533, 0.847997209, 0.849316600,
+       0.850637711, 0.851960547, 0.853285113, 0.854611414, 0.855939455,
+       0.857269241, 0.858600776, 0.859934067, 0.861269117, 0.862605932,
+       0.863944518, 0.865284878, 0.866627019, 0.867970945, 0.869316662,
+       0.870664175, 0.872013488, 0.873364608, 0.874717539, 0.876072286,
+       0.877428856, 0.878787252, 0.880147481, 0.881509547, 0.882873457,
+       0.884239215, 0.885606827, 0.886976298, 0.888347634, 0.889720839,
+       0.891095920, 0.892472882, 0.893851731, 0.895232471, 0.896615109,
+       0.897999649, 0.899386099, 0.900774462, 0.902164745, 0.903556954,
+       0.904951093, 0.906347169, 0.907745187, 0.909145154, 0.910547074,
+       0.911950954, 0.913356799, 0.914764615, 0.916174408, 0.917586184,
+       0.918999948, 0.920415707, 0.921833466, 0.923253231, 0.924675008,
+       0.926098804, 0.927524624, 0.928952473, 0.930382359, 0.931814287,
+       0.933248264, 0.934684294, 0.936122385, 0.937562543, 0.939004773,
+       0.940449083, 0.941895477, 0.943343963, 0.944794546, 0.946247233,
+       0.947702031, 0.949158944, 0.950617981, 0.952079147, 0.953542448,
+       0.955007891, 0.956475483, 0.957945229, 0.959417137, 0.960891213,
+       0.962367463, 0.963845894, 0.965326512, 0.966809325, 0.968294338,
+       0.969781559, 0.971270994, 0.972762649, 0.974256533, 0.975752650,
+       0.977251008, 0.978751615, 0.980254476, 0.981759598, 0.983266989,
+       0.984776655, 0.986288604, 0.987802841, 0.989319375, 0.990838213,
+       0.992359360, 0.993882825, 0.995408614, 0.996936735, 0.998467195,
+       1.000000000, 1.001535159, 1.003072677, 1.004612564, 1.006154825,
+       1.007699469, 1.009246502, 1.010795932, 1.012347766, 1.013902012,
+       1.015458678, 1.017017770, 1.018579296, 1.020143264, 1.021709681,
+       1.023278555, 1.024849894, 1.026423705, 1.027999996, 1.029578775,
+       1.031160049, 1.032743826, 1.034330115, 1.035918922, 1.037510256,
+       1.039104125, 1.040700536, 1.042299498, 1.043901018, 1.045505105,
+       1.047111766, 1.048721011, 1.050332846, 1.051947281, 1.053564322,
+       1.055183979, 1.056806260, 1.058431173, 1.060058727, 1.061688929,
+       1.063321788, 1.064957313, 1.066595511, 1.068236393, 1.069879965,
+       1.071526237, 1.073175217, 1.074826914, 1.076481336, 1.078138493,
+       1.079798393, 1.081461044, 1.083126456, 1.084794637, 1.086465597,
+       1.088139343, 1.089815886, 1.091495234, 1.093177396, 1.094862381,
+       1.096550199, 1.098240858, 1.099934368, 1.101630737, 1.103329976,
+       1.105032093, 1.106737097, 1.108444999, 1.110155807, 1.111869531,
+       1.113586181, 1.115305765, 1.117028294, 1.118753777, 1.120482224,
+       1.122213644, 1.123948047, 1.125685443, 1.127425842, 1.129169254,
+       1.130915687, 1.132665154, 1.134417662, 1.136173223, 1.137931846,
+       1.139693542, 1.141458320, 1.143226191, 1.144997165, 1.146771253,
+       1.148548463, 1.150328808, 1.152112298, 1.153898942, 1.155688751,
+       1.157481736, 1.159277907, 1.161077276, 1.162879852, 1.164685646,
+       1.166494670, 1.168306933, 1.170122448, 1.171941224, 1.173763272,
+       1.175588605, 1.177417231, 1.179249164, 1.181084413, 1.182922991,
+       1.184764908, 1.186610175, 1.188458804, 1.190310807, 1.192166194,
+       1.194024977, 1.195887168, 1.197752779, 1.199621820, 1.201494304,
+       1.203370242, 1.205249646, 1.207132528, 1.209018900, 1.210908773,
+       1.212802161, 1.214699074, 1.216599525, 1.218503526, 1.220411089,
+       1.222322226, 1.224236951, 1.226155274, 1.228077210, 1.230002769,
+       1.231931965, 1.233864809, 1.235801316, 1.237741497, 1.239685366,
+       1.241632935, 1.243584216, 1.245539224, 1.247497970, 1.249460468,
+       1.251426731, 1.253396773, 1.255370606, 1.257348243, 1.259329699,
+       1.261314986, 1.263304118, 1.265297109, 1.267293971, 1.269294719,
+       1.271299367, 1.273307928, 1.275320415, 1.277336844, 1.279357228,
+       1.281381580, 1.283409916, 1.285442248, 1.287478592, 1.289518962,
+       1.291563372, 1.293611836, 1.295664369, 1.297720986, 1.299781701,
+       1.301846529, 1.303915484, 1.305988582, 1.308065837, 1.310147264,
+       1.312232879, 1.314322696, 1.316416731, 1.318514999, 1.320617515,
+       1.322724294, 1.324835353, 1.326950706, 1.329070369, 1.331194359,
+       1.333322690, 1.335455378, 1.337592440, 1.339733891, 1.341879748,
+       1.344030027, 1.346184743, 1.348343913, 1.350507554, 1.352675682,
+       1.354848314, 1.357025465, 1.359207153, 1.361393395, 1.363584208,
+       1.365779607, 1.367979611, 1.370184237, 1.372393501, 1.374607421,
+       1.376826014, 1.379049298, 1.381277290, 1.383510008, 1.385747469,
+       1.387989692, 1.390236693, 1.392488492, 1.394745106, 1.397006553,
+       1.399272852, 1.401544020, 1.403820076, 1.406101039, 1.408386928,
+       1.410677760, 1.412973555, 1.415274331, 1.417580107, 1.419890903,
+       1.422206738, 1.424527631, 1.426853600, 1.429184667, 1.431520849,
+       1.433862167, 1.436208641, 1.438560289, 1.440917133, 1.443279193,
+       1.445646487, 1.448019037, 1.450396863, 1.452779985, 1.455168424,
+       1.457562200, 1.459961335, 1.462365848, 1.464775762, 1.467191096,
+       1.469611873, 1.472038113, 1.474469838, 1.476907069, 1.479349828,
+       1.481798137, 1.484252017, 1.486711491, 1.489176580, 1.491647307,
+       1.494123694, 1.496605763, 1.499093536, 1.501587038, 1.504086289,
+       1.506591313, 1.509102134, 1.511618773, 1.514141255, 1.516669602,
+       1.519203839, 1.521743989, 1.524290074, 1.526842121, 1.529400151,
+       1.531964190, 1.534534261, 1.537110390, 1.539692600, 1.542280915,
+       1.544875362, 1.547475964, 1.550082747, 1.552695736, 1.555314956,
+       1.557940432, 1.560572190, 1.563210256, 1.565854655, 1.568505414,
+       1.571162558, 1.573826115, 1.576496109, 1.579172568, 1.581855518,
+       1.584544987, 1.587241001, 1.589943587, 1.592652772, 1.595368585,
+       1.598091052, 1.600820201, 1.603556060, 1.606298657, 1.609048020,
+       1.611804178, 1.614567159, 1.617336991, 1.620113704, 1.622897326,
+       1.625687886, 1.628485414, 1.631289940, 1.634101492, 1.636920101,
+       1.639745796, 1.642578607, 1.645418566, 1.648265701, 1.651120045,
+       1.653981627, 1.656850478, 1.659726631, 1.662610115, 1.665500963,
+       1.668399206, 1.671304875, 1.674218004, 1.677138624, 1.680066768,
+       1.683002467, 1.685945756, 1.688896666, 1.691855232, 1.694821485,
+       1.697795460, 1.700777191, 1.703766711, 1.706764055, 1.709769257,
+       1.712782350, 1.715803371, 1.718832353, 1.721869333, 1.724914344,
+       1.727967424, 1.731028606, 1.734097928, 1.737175426, 1.740261136,
+       1.743355093, 1.746457337, 1.749567902, 1.752686826, 1.755814148,
+       1.758949903, 1.762094132, 1.765246870, 1.768408157, 1.771578032,
+       1.774756533, 1.777943698, 1.781139568, 1.784344182, 1.787557579,
+       1.790779800, 1.794010885, 1.797250873, 1.800499807, 1.803757726,
+       1.807024672, 1.810300687, 1.813585811, 1.816880088, 1.820183559,
+       1.823496266, 1.826818252, 1.830149561, 1.833490236, 1.836840319,
+       1.840199855, 1.843568888, 1.846947462, 1.850335622, 1.853733412,
+       1.857140878, 1.860558065, 1.863985019, 1.867421786, 1.870868412,
+       1.874324943, 1.877791427, 1.881267910, 1.884754441, 1.888251066,
+       1.891757834, 1.895274793, 1.898801992, 1.902339480, 1.905887306,
+       1.909445519, 1.913014170, 1.916593308, 1.920182985, 1.923783251,
+       1.927394157, 1.931015754, 1.934648096, 1.938291233, 1.941945218,
+       1.945610105, 1.949285946, 1.952972795, 1.956670705, 1.960379731,
+       1.964099928, 1.967831351, 1.971574054, 1.975328093, 1.979093525,
+       1.982870406, 1.986658792, 1.990458741, 1.994270311, 1.998093558,
+       2.001928542, 2.005775321, 2.009633954, 2.013504500, 2.017387020,
+       2.021281573, 2.025188221, 2.029107024, 2.033038044, 2.036981342,
+       2.040936981, 2.044905024, 2.048885533, 2.052878573, 2.056884206,
+       2.060902499, 2.064933515, 2.068977320, 2.073033979, 2.077103559,
+       2.081186126, 2.085281748, 2.089390491, 2.093512425, 2.097647617,
+       2.101796137, 2.105958054, 2.110133437, 2.114322358, 2.118524886,
+       2.122741095, 2.126971054, 2.131214838, 2.135472518, 2.139744168,
+       2.144029862, 2.148329675, 2.152643681, 2.156971956, 2.161314576,
+       2.165671617, 2.170043157, 2.174429273, 2.178830044, 2.183245548,
+       2.187675864, 2.192121073, 2.196581255, 2.201056491, 2.205546863,
+       2.210052453, 2.214573343, 2.219109617, 2.223661360, 2.228228655,
+       2.232811588, 2.237410245, 2.242024713, 2.246655078, 2.251301428,
+       2.255963852, 2.260642439, 2.265337278, 2.270048460, 2.274776076,
+       2.279520218, 2.284280978, 2.289058449, 2.293852725, 2.298663901,
+       2.303492071, 2.308337332, 2.313199780, 2.318079513, 2.322976628,
+       2.327891225, 2.332823403, 2.337773263, 2.342740905, 2.347726431,
+       2.352729945, 2.357751549, 2.362791348, 2.367849447, 2.372925951,
+       2.378020968, 2.383134604, 2.388266969, 2.393418171, 2.398588320,
+       2.403777527, 2.408985903, 2.414213562, 2.419460617, 2.424727182,
+       2.430013373, 2.435319305, 2.440645096, 2.445990863, 2.451356726,
+       2.456742804, 2.462149219, 2.467576091, 2.473023545, 2.478491703,
+       2.483980690, 2.489490633, 2.495021657, 2.500573891, 2.506147463,
+       2.511742504, 2.517359143, 2.522997514, 2.528657748, 2.534339981,
+       2.540044348, 2.545770984, 2.551520027, 2.557291616, 2.563085891,
+       2.568902992, 2.574743061, 2.580606242, 2.586492679, 2.592402518,
+       2.598335905, 2.604292988, 2.610273918, 2.616278844, 2.622307918,
+       2.628361293, 2.634439124, 2.640541566, 2.646668776, 2.652820913,
+       2.658998137, 2.665200608, 2.671428489, 2.677681944, 2.683961138,
+       2.690266237, 2.696597411, 2.702954827, 2.709338658, 2.715749076,
+       2.722186255, 2.728650371, 2.735141600, 2.741660121, 2.748206114,
+       2.754779762, 2.761381248, 2.768010756, 2.774668473, 2.781354588,
+       2.788069291, 2.794812772, 2.801585227, 2.808386849, 2.815217837,
+       2.822078387, 2.828968701, 2.835888982, 2.842839432, 2.849820259,
+       2.856831670, 2.863873875, 2.870947085, 2.878051514, 2.885187378,
+       2.892354894, 2.899554281, 2.906785762, 2.914049559, 2.921345899,
+       2.928675010, 2.936037121, 2.943432465, 2.950861275, 2.958323788,
+       2.965820244, 2.973350883, 2.980915947, 2.988515684, 2.996150340,
+       3.003820167, 3.011525416, 3.019266342, 3.027043204, 3.034856262,
+       3.042705777, 3.050592015, 3.058515244, 3.066475733, 3.074473757,
+       3.082509589, 3.090583510, 3.098695798, 3.106846740, 3.115036620,
+       3.123265728, 3.131534357, 3.139842802, 3.148191360, 3.156580334,
+       3.165010027, 3.173480746, 3.181992801, 3.190546507, 3.199142179,
+       3.207780138, 3.216460706, 3.225184209, 3.233950978, 3.242761346,
+       3.251615649, 3.260514226, 3.269457422, 3.278445584, 3.287479061,
+       3.296558209, 3.305683385, 3.314854951, 3.324073273, 3.333338720,
+       3.342651665, 3.352012486, 3.361421563, 3.370879282, 3.380386033,
+       3.389942208, 3.399548206, 3.409204429, 3.418911283, 3.428669179,
+       3.438478532, 3.448339762, 3.458253293, 3.468219554, 3.478238979,
+       3.488312006, 3.498439078, 3.508620644, 3.518857157, 3.529149074,
+       3.539496860, 3.549900982, 3.560361914, 3.570880135, 3.581456130,
+       3.592090388, 3.602783405, 3.613535681, 3.624347724, 3.635220047,
+       3.646153166, 3.657147608, 3.668203902, 3.679322584, 3.690504199,
+       3.701749293, 3.713058424, 3.724432153, 3.735871049, 3.747375686,
+       3.758946648, 3.770584522, 3.782289905, 3.794063400, 3.805905617,
+       3.817817173, 3.829798694, 3.841850812, 3.853974166, 3.866169405,
+       3.878437185, 3.890778170, 3.903193030, 3.915682447, 3.928247108,
+       3.940887711, 3.953604961, 3.966399573, 3.979272270, 3.992223784,
+       4.005254856, 4.018366238, 4.031558690, 4.044832981, 4.058189891,
+       4.071630211, 4.085154739, 4.098764285, 4.112459670, 4.126241726,
+       4.140111292, 4.154069223, 4.168116382, 4.182253644, 4.196481895,
+       4.210802034, 4.225214970, 4.239721626, 4.254322936, 4.269019847,
+       4.283813319, 4.298704322, 4.313693844, 4.328782883, 4.343972451,
+       4.359263574, 4.374657292, 4.390154660, 4.405756746, 4.421464634,
+       4.437279422, 4.453202224, 4.469234170, 4.485376405, 4.501630089,
+       4.517996401, 4.534476534, 4.551071699, 4.567783126, 4.584612059,
+       4.601559763, 4.618627520, 4.635816630, 4.653128412, 4.670564204,
+       4.688125366, 4.705813275, 4.723629328, 4.741574945, 4.759651566,
+       4.777860651, 4.796203685, 4.814682172, 4.833297640, 4.852051640,
+       4.870945747, 4.889981558, 4.909160698, 4.928484813, 4.947955576,
+       4.967574687, 4.987343871, 5.007264880, 5.027339492, 5.047569516,
+       5.067956788, 5.088503171, 5.109210562, 5.130080883, 5.151116092,
+       5.172318173, 5.193689147, 5.215231065, 5.236946012, 5.258836107,
+       5.280903504, 5.303150391, 5.325578994, 5.348191575, 5.370990435,
+       5.393977912, 5.417156383, 5.440528266, 5.464096021, 5.487862148,
+       5.511829190, 5.535999735, 5.560376414, 5.584961905, 5.609758932,
+       5.634770266, 5.659998726, 5.685447184, 5.711118559, 5.737015825,
+       5.763142005, 5.789500181, 5.816093488, 5.842925117, 5.869998319,
+       5.897316403, 5.924882740, 5.952700761, 5.980773963, 6.009105907,
+       6.037700220, 6.066560597, 6.095690804, 6.125094677, 6.154776127,
+       6.184739138, 6.214987771, 6.245526166, 6.276358543, 6.307489204,
+       6.338922536, 6.370663013, 6.402715195, 6.435083737, 6.467773382,
+       6.500788974, 6.534135449, 6.567817847, 6.601841311, 6.636211087,
+       6.670932532, 6.706011111, 6.741452405, 6.777262112, 6.813446049,
+       6.850010157, 6.886960501, 6.924303279, 6.962044820, 7.000191591,
+       7.038750200, 7.077727398, 7.117130085, 7.156965314, 7.197240293,
+       7.237962394, 7.279139153, 7.320778274, 7.362887641, 7.405475315,
+       7.448549542, 7.492118760, 7.536191604, 7.580776908, 7.625883716,
+       7.671521286, 7.717699097, 7.764426853, 7.811714494, 7.859572199,
+       7.908010397, 7.957039771, 8.006671270, 8.056916114, 8.107785804,
+       8.159292128, 8.211447175, 8.264263342, 8.317753342, 8.371930218,
+       8.426807351, 8.482398471, 8.538717671, 8.595779416, 8.653598556,
+       8.712190343, 8.771570437, 8.831754928, 8.892760343, 8.954603669,
+       9.017302360, 9.080874364, 9.145338129, 9.210712631, 9.277017384,
+       9.344272467, 9.412498540, 9.481716864, 9.551949328, 9.623218470,
+       9.695547497, 9.768960318, 9.843481565, 9.919136621, 9.995951652,
+       10.073953635, 10.153170388, 10.233630607, 10.315363898, 10.398400817,
+       10.482772902, 10.568512718, 10.655653899, 10.744231190, 10.834280493,
+       10.925838918, 11.018944833, 11.113637917, 11.209959219, 11.307951213,
+       11.407657866, 11.509124699, 11.612398861, 11.717529199, 11.824566335,
+       11.933562751, 12.044572872, 12.157653156, 12.272862193, 12.390260806,
+       12.509912155, 12.631881854, 12.756238090, 12.883051751, 13.012396559,
+       13.144349217, 13.278989557, 13.416400703, 13.556669242, 13.699885410,
+       13.846143279, 13.995540969, 14.148180865, 14.304169855, 14.463619573,
+       14.626646676, 14.793373118, 14.963926464, 15.138440211, 15.317054137,
+       15.499914679, 15.687175327, 15.878997063, 16.075548815, 16.277007960,
+       16.483560854, 16.695403411, 16.912741721, 17.135792724, 17.364784926,
+       17.599959188, 17.841569567, 18.089884234, 18.345186471, 18.607775743,
+       18.877968880, 19.156101346, 19.442528633, 19.737627780, 20.041799025,
+       20.355467625, 20.679085834, 21.013135085, 21.358128380, 21.714612923,
+       22.083173013, 22.464433249, 22.859062059, 23.267775617, 23.691342183,
+       24.130586924, 24.586397283, 25.059728971, 25.551612653, 26.063161449,
+       26.595579347, 27.150170666, 27.728350729, 28.331657935, 28.961767426,
+       29.620506631, 30.309872972, 31.032054101, 31.789451102, 32.584705165,
+       33.420728371, 34.300739338, 35.228304641, 36.207387142, 37.242402600,
+       38.338286278, 39.500571649, 40.735483872, 42.050051353, 43.452239619,
+       44.951112888, 46.557030267, 48.281885549, 50.139402335, 52.145500009,
+       54.318751180, 56.680958479, 59.257888652, 62.080216394, 65.184751341,
+       68.616052526, 72.428580988, 76.689612131, 81.483240206, 86.915984601,
+       93.124798813, 100.288775876, 108.646706505, 118.524214398, 130.377172736,
+       144.864065000, 162.972616412, 186.254966610, 217.298014984, 260.758180441,
+       325.948300794, 434.598330939, 651.898135563, 1303.797038087, 28716936972575.640625000,
+       -1303.797038205, -651.898135593, -434.598330952, -325.948300802, -260.758180446,
+       -217.298014987, -186.254966612, -162.972616414, -144.864065001, -130.377172737,
+       -118.524214399, -108.646706506, -100.288775877, -93.124798814, -86.915984602,
+       -81.483240207, -76.689612131, -72.428580989, -68.616052526, -65.184751341,
+       -62.080216394, -59.257888652, -56.680958480, -54.318751180, -52.145500009,
+       -50.139402336, -48.281885549, -46.557030268, -44.951112888, -43.452239619,
+       -42.050051354, -40.735483872, -39.500571649, -38.338286278, -37.242402601,
+       -36.207387142, -35.228304641, -34.300739338, -33.420728371, -32.584705165,
+       -31.789451102, -31.032054101, -30.309872972, -29.620506631, -28.961767426,
+       -28.331657935, -27.728350729, -27.150170666, -26.595579347, -26.063161449,
+       -25.551612653, -25.059728971, -24.586397283, -24.130586924, -23.691342183,
+       -23.267775617, -22.859062059, -22.464433249, -22.083173013, -21.714612923,
+       -21.358128380, -21.013135085, -20.679085834, -20.355467625, -20.041799025,
+       -19.737627780, -19.442528633, -19.156101346, -18.877968880, -18.607775743,
+       -18.345186471, -18.089884234, -17.841569567, -17.599959188, -17.364784926,
+       -17.135792724, -16.912741721, -16.695403411, -16.483560854, -16.277007960,
+       -16.075548815, -15.878997063, -15.687175327, -15.499914679, -15.317054137,
+       -15.138440211, -14.963926464, -14.793373118, -14.626646676, -14.463619573,
+       -14.304169855, -14.148180865, -13.995540969, -13.846143279, -13.699885410,
+       -13.556669242, -13.416400703, -13.278989557, -13.144349217, -13.012396559,
+       -12.883051751, -12.756238090, -12.631881854, -12.509912155, -12.390260806,
+       -12.272862193, -12.157653156, -12.044572872, -11.933562751, -11.824566335,
+       -11.717529199, -11.612398861, -11.509124699, -11.407657866, -11.307951213,
+       -11.209959219, -11.113637917, -11.018944833, -10.925838918, -10.834280493,
+       -10.744231190, -10.655653899, -10.568512718, -10.482772902, -10.398400817,
+       -10.315363898, -10.233630607, -10.153170388, -10.073953635, -9.995951652,
+       -9.919136621, -9.843481565, -9.768960318, -9.695547497, -9.623218470,
+       -9.551949328, -9.481716864, -9.412498540, -9.344272467, -9.277017384,
+       -9.210712631, -9.145338129, -9.080874364, -9.017302360, -8.954603669,
+       -8.892760343, -8.831754928, -8.771570437, -8.712190343, -8.653598556,
+       -8.595779416, -8.538717671, -8.482398471, -8.426807351, -8.371930218,
+       -8.317753342, -8.264263342, -8.211447175, -8.159292128, -8.107785804,
+       -8.056916114, -8.006671271, -7.957039771, -7.908010397, -7.859572199,
+       -7.811714494, -7.764426853, -7.717699097, -7.671521286, -7.625883716,
+       -7.580776908, -7.536191604, -7.492118760, -7.448549542, -7.405475315,
+       -7.362887641, -7.320778274, -7.279139153, -7.237962394, -7.197240293,
+       -7.156965314, -7.117130085, -7.077727398, -7.038750200, -7.000191591,
+       -6.962044820, -6.924303279, -6.886960501, -6.850010157, -6.813446049,
+       -6.777262112, -6.741452405, -6.706011111, -6.670932532, -6.636211087,
+       -6.601841311, -6.567817847, -6.534135449, -6.500788974, -6.467773382,
+       -6.435083737, -6.402715195, -6.370663013, -6.338922536, -6.307489204,
+       -6.276358543, -6.245526166, -6.214987771, -6.184739138, -6.154776127,
+       -6.125094677, -6.095690804, -6.066560597, -6.037700220, -6.009105907,
+       -5.980773963, -5.952700761, -5.924882740, -5.897316403, -5.869998319,
+       -5.842925117, -5.816093488, -5.789500181, -5.763142005, -5.737015825,
+       -5.711118559, -5.685447184, -5.659998726, -5.634770266, -5.609758932,
+       -5.584961905, -5.560376414, -5.535999735, -5.511829190, -5.487862148,
+       -5.464096021, -5.440528266, -5.417156383, -5.393977912, -5.370990435,
+       -5.348191575, -5.325578994, -5.303150391, -5.280903504, -5.258836107,
+       -5.236946012, -5.215231065, -5.193689147, -5.172318173, -5.151116092,
+       -5.130080883, -5.109210562, -5.088503171, -5.067956788, -5.047569516,
+       -5.027339492, -5.007264880, -4.987343871, -4.967574687, -4.947955576,
+       -4.928484813, -4.909160698, -4.889981558, -4.870945747, -4.852051640,
+       -4.833297640, -4.814682172, -4.796203685, -4.777860651, -4.759651566,
+       -4.741574945, -4.723629328, -4.705813275, -4.688125366, -4.670564205,
+       -4.653128412, -4.635816630, -4.618627520, -4.601559763, -4.584612059,
+       -4.567783126, -4.551071699, -4.534476534, -4.517996401, -4.501630089,
+       -4.485376405, -4.469234170, -4.453202224, -4.437279422, -4.421464634,
+       -4.405756746, -4.390154660, -4.374657292, -4.359263574, -4.343972451,
+       -4.328782883, -4.313693844, -4.298704322, -4.283813319, -4.269019847,
+       -4.254322936, -4.239721626, -4.225214970, -4.210802034, -4.196481895,
+       -4.182253644, -4.168116382, -4.154069223, -4.140111292, -4.126241726,
+       -4.112459670, -4.098764285, -4.085154739, -4.071630211, -4.058189891,
+       -4.044832981, -4.031558690, -4.018366238, -4.005254856, -3.992223784,
+       -3.979272270, -3.966399573, -3.953604961, -3.940887711, -3.928247108,
+       -3.915682447, -3.903193030, -3.890778170, -3.878437185, -3.866169405,
+       -3.853974166, -3.841850812, -3.829798694, -3.817817173, -3.805905617,
+       -3.794063400, -3.782289905, -3.770584522, -3.758946648, -3.747375686,
+       -3.735871049, -3.724432153, -3.713058424, -3.701749293, -3.690504199,
+       -3.679322584, -3.668203902, -3.657147608, -3.646153166, -3.635220047,
+       -3.624347724, -3.613535681, -3.602783405, -3.592090388, -3.581456130,
+       -3.570880135, -3.560361914, -3.549900982, -3.539496860, -3.529149074,
+       -3.518857157, -3.508620644, -3.498439078, -3.488312006, -3.478238979,
+       -3.468219554, -3.458253293, -3.448339762, -3.438478532, -3.428669179,
+       -3.418911283, -3.409204429, -3.399548206, -3.389942208, -3.380386033,
+       -3.370879282, -3.361421563, -3.352012486, -3.342651665, -3.333338720,
+       -3.324073273, -3.314854951, -3.305683385, -3.296558209, -3.287479061,
+       -3.278445584, -3.269457422, -3.260514226, -3.251615649, -3.242761346,
+       -3.233950978, -3.225184209, -3.216460706, -3.207780138, -3.199142179,
+       -3.190546507, -3.181992801, -3.173480746, -3.165010027, -3.156580334,
+       -3.148191360, -3.139842802, -3.131534357, -3.123265728, -3.115036620,
+       -3.106846740, -3.098695798, -3.090583510, -3.082509589, -3.074473757,
+       -3.066475733, -3.058515244, -3.050592015, -3.042705777, -3.034856262,
+       -3.027043204, -3.019266342, -3.011525416, -3.003820167, -2.996150340,
+       -2.988515684, -2.980915947, -2.973350883, -2.965820244, -2.958323788,
+       -2.950861275, -2.943432465, -2.936037121, -2.928675010, -2.921345899,
+       -2.914049559, -2.906785762, -2.899554281, -2.892354894, -2.885187378,
+       -2.878051514, -2.870947085, -2.863873875, -2.856831670, -2.849820259,
+       -2.842839432, -2.835888982, -2.828968701, -2.822078387, -2.815217837,
+       -2.808386849, -2.801585227, -2.794812772, -2.788069291, -2.781354588,
+       -2.774668473, -2.768010756, -2.761381248, -2.754779762, -2.748206114,
+       -2.741660121, -2.735141600, -2.728650371, -2.722186255, -2.715749076,
+       -2.709338658, -2.702954827, -2.696597411, -2.690266237, -2.683961138,
+       -2.677681944, -2.671428489, -2.665200608, -2.658998137, -2.652820913,
+       -2.646668776, -2.640541566, -2.634439124, -2.628361293, -2.622307918,
+       -2.616278844, -2.610273918, -2.604292988, -2.598335905, -2.592402518,
+       -2.586492679, -2.580606242, -2.574743061, -2.568902992, -2.563085891,
+       -2.557291616, -2.551520027, -2.545770984, -2.540044348, -2.534339981,
+       -2.528657748, -2.522997514, -2.517359143, -2.511742504, -2.506147463,
+       -2.500573891, -2.495021657, -2.489490633, -2.483980690, -2.478491703,
+       -2.473023545, -2.467576091, -2.462149219, -2.456742804, -2.451356726,
+       -2.445990863, -2.440645096, -2.435319305, -2.430013373, -2.424727182,
+       -2.419460617, -2.414213562, -2.408985903, -2.403777527, -2.398588320,
+       -2.393418171, -2.388266969, -2.383134604, -2.378020968, -2.372925951,
+       -2.367849447, -2.362791348, -2.357751549, -2.352729945, -2.347726431,
+       -2.342740905, -2.337773263, -2.332823403, -2.327891225, -2.322976628,
+       -2.318079513, -2.313199780, -2.308337332, -2.303492071, -2.298663901,
+       -2.293852725, -2.289058449, -2.284280978, -2.279520218, -2.274776076,
+       -2.270048460, -2.265337278, -2.260642439, -2.255963852, -2.251301428,
+       -2.246655078, -2.242024713, -2.237410245, -2.232811588, -2.228228655,
+       -2.223661360, -2.219109617, -2.214573343, -2.210052453, -2.205546863,
+       -2.201056491, -2.196581255, -2.192121073, -2.187675864, -2.183245548,
+       -2.178830044, -2.174429273, -2.170043157, -2.165671617, -2.161314576,
+       -2.156971956, -2.152643681, -2.148329675, -2.144029862, -2.139744168,
+       -2.135472518, -2.131214838, -2.126971054, -2.122741095, -2.118524886,
+       -2.114322358, -2.110133437, -2.105958054, -2.101796137, -2.097647617,
+       -2.093512425, -2.089390491, -2.085281748, -2.081186126, -2.077103559,
+       -2.073033979, -2.068977320, -2.064933515, -2.060902499, -2.056884206,
+       -2.052878573, -2.048885533, -2.044905024, -2.040936981, -2.036981342,
+       -2.033038044, -2.029107024, -2.025188221, -2.021281573, -2.017387020,
+       -2.013504500, -2.009633954, -2.005775321, -2.001928542, -1.998093558,
+       -1.994270311, -1.990458741, -1.986658792, -1.982870406, -1.979093525,
+       -1.975328093, -1.971574054, -1.967831351, -1.964099928, -1.960379731,
+       -1.956670705, -1.952972795, -1.949285946, -1.945610105, -1.941945218,
+       -1.938291233, -1.934648096, -1.931015754, -1.927394157, -1.923783251,
+       -1.920182985, -1.916593308, -1.913014170, -1.909445519, -1.905887306,
+       -1.902339480, -1.898801992, -1.895274793, -1.891757834, -1.888251066,
+       -1.884754441, -1.881267910, -1.877791427, -1.874324943, -1.870868412,
+       -1.867421786, -1.863985019, -1.860558065, -1.857140878, -1.853733412,
+       -1.850335622, -1.846947462, -1.843568888, -1.840199855, -1.836840319,
+       -1.833490236, -1.830149561, -1.826818252, -1.823496266, -1.820183559,
+       -1.816880088, -1.813585811, -1.810300687, -1.807024672, -1.803757726,
+       -1.800499807, -1.797250873, -1.794010885, -1.790779800, -1.787557579,
+       -1.784344182, -1.781139568, -1.777943698, -1.774756533, -1.771578032,
+       -1.768408157, -1.765246870, -1.762094132, -1.758949903, -1.755814148,
+       -1.752686826, -1.749567902, -1.746457337, -1.743355093, -1.740261136,
+       -1.737175426, -1.734097928, -1.731028606, -1.727967424, -1.724914344,
+       -1.721869333, -1.718832353, -1.715803371, -1.712782350, -1.709769257,
+       -1.706764055, -1.703766711, -1.700777191, -1.697795460, -1.694821485,
+       -1.691855232, -1.688896666, -1.685945756, -1.683002467, -1.680066768,
+       -1.677138624, -1.674218004, -1.671304875, -1.668399206, -1.665500963,
+       -1.662610115, -1.659726631, -1.656850478, -1.653981627, -1.651120045,
+       -1.648265701, -1.645418566, -1.642578607, -1.639745796, -1.636920101,
+       -1.634101492, -1.631289940, -1.628485414, -1.625687886, -1.622897326,
+       -1.620113704, -1.617336991, -1.614567159, -1.611804178, -1.609048020,
+       -1.606298657, -1.603556060, -1.600820201, -1.598091052, -1.595368585,
+       -1.592652772, -1.589943587, -1.587241001, -1.584544987, -1.581855518,
+       -1.579172568, -1.576496109, -1.573826115, -1.571162558, -1.568505414,
+       -1.565854655, -1.563210256, -1.560572190, -1.557940432, -1.555314956,
+       -1.552695736, -1.550082747, -1.547475964, -1.544875362, -1.542280915,
+       -1.539692600, -1.537110390, -1.534534261, -1.531964190, -1.529400151,
+       -1.526842121, -1.524290074, -1.521743989, -1.519203839, -1.516669602,
+       -1.514141255, -1.511618773, -1.509102134, -1.506591313, -1.504086289,
+       -1.501587038, -1.499093536, -1.496605763, -1.494123694, -1.491647307,
+       -1.489176580, -1.486711491, -1.484252017, -1.481798137, -1.479349828,
+       -1.476907069, -1.474469838, -1.472038113, -1.469611873, -1.467191096,
+       -1.464775762, -1.462365848, -1.459961335, -1.457562200, -1.455168424,
+       -1.452779985, -1.450396863, -1.448019037, -1.445646487, -1.443279193,
+       -1.440917133, -1.438560289, -1.436208641, -1.433862167, -1.431520849,
+       -1.429184667, -1.426853600, -1.424527631, -1.422206738, -1.419890903,
+       -1.417580107, -1.415274331, -1.412973555, -1.410677760, -1.408386928,
+       -1.406101039, -1.403820076, -1.401544020, -1.399272852, -1.397006553,
+       -1.394745106, -1.392488492, -1.390236693, -1.387989692, -1.385747469,
+       -1.383510008, -1.381277290, -1.379049298, -1.376826014, -1.374607421,
+       -1.372393501, -1.370184237, -1.367979611, -1.365779607, -1.363584208,
+       -1.361393395, -1.359207153, -1.357025465, -1.354848314, -1.352675682,
+       -1.350507554, -1.348343913, -1.346184743, -1.344030027, -1.341879748,
+       -1.339733891, -1.337592440, -1.335455378, -1.333322690, -1.331194359,
+       -1.329070369, -1.326950706, -1.324835353, -1.322724294, -1.320617515,
+       -1.318514999, -1.316416731, -1.314322696, -1.312232879, -1.310147264,
+       -1.308065837, -1.305988582, -1.303915484, -1.301846529, -1.299781701,
+       -1.297720986, -1.295664369, -1.293611836, -1.291563372, -1.289518962,
+       -1.287478592, -1.285442248, -1.283409916, -1.281381580, -1.279357228,
+       -1.277336844, -1.275320415, -1.273307928, -1.271299367, -1.269294719,
+       -1.267293971, -1.265297109, -1.263304118, -1.261314986, -1.259329699,
+       -1.257348243, -1.255370606, -1.253396773, -1.251426731, -1.249460468,
+       -1.247497970, -1.245539224, -1.243584216, -1.241632935, -1.239685366,
+       -1.237741497, -1.235801316, -1.233864809, -1.231931965, -1.230002769,
+       -1.228077210, -1.226155274, -1.224236951, -1.222322226, -1.220411089,
+       -1.218503526, -1.216599525, -1.214699074, -1.212802161, -1.210908773,
+       -1.209018900, -1.207132528, -1.205249646, -1.203370242, -1.201494304,
+       -1.199621820, -1.197752779, -1.195887168, -1.194024977, -1.192166194,
+       -1.190310807, -1.188458804, -1.186610175, -1.184764908, -1.182922991,
+       -1.181084413, -1.179249164, -1.177417231, -1.175588605, -1.173763272,
+       -1.171941224, -1.170122448, -1.168306933, -1.166494670, -1.164685646,
+       -1.162879852, -1.161077276, -1.159277907, -1.157481736, -1.155688751,
+       -1.153898942, -1.152112298, -1.150328808, -1.148548463, -1.146771253,
+       -1.144997165, -1.143226191, -1.141458320, -1.139693542, -1.137931846,
+       -1.136173223, -1.134417662, -1.132665154, -1.130915687, -1.129169254,
+       -1.127425842, -1.125685443, -1.123948047, -1.122213644, -1.120482224,
+       -1.118753777, -1.117028294, -1.115305765, -1.113586181, -1.111869531,
+       -1.110155807, -1.108444999, -1.106737097, -1.105032093, -1.103329976,
+       -1.101630737, -1.099934368, -1.098240858, -1.096550199, -1.094862381,
+       -1.093177396, -1.091495234, -1.089815886, -1.088139343, -1.086465597,
+       -1.084794637, -1.083126456, -1.081461044, -1.079798393, -1.078138493,
+       -1.076481336, -1.074826914, -1.073175217, -1.071526237, -1.069879965,
+       -1.068236393, -1.066595511, -1.064957313, -1.063321788, -1.061688929,
+       -1.060058727, -1.058431173, -1.056806260, -1.055183979, -1.053564322,
+       -1.051947281, -1.050332846, -1.048721011, -1.047111766, -1.045505105,
+       -1.043901018, -1.042299498, -1.040700536, -1.039104125, -1.037510256,
+       -1.035918922, -1.034330115, -1.032743826, -1.031160049, -1.029578775,
+       -1.027999996, -1.026423705, -1.024849894, -1.023278555, -1.021709681,
+       -1.020143264, -1.018579296, -1.017017770, -1.015458678, -1.013902012,
+       -1.012347766, -1.010795932, -1.009246502, -1.007699469, -1.006154825,
+       -1.004612564, -1.003072677, -1.001535159, -1.000000000, -0.998467195,
+       -0.996936735, -0.995408614, -0.993882825, -0.992359360, -0.990838213,
+       -0.989319375, -0.987802841, -0.986288604, -0.984776655, -0.983266989,
+       -0.981759598, -0.980254476, -0.978751615, -0.977251008, -0.975752650,
+       -0.974256533, -0.972762649, -0.971270994, -0.969781559, -0.968294338,
+       -0.966809325, -0.965326512, -0.963845894, -0.962367463, -0.960891213,
+       -0.959417137, -0.957945229, -0.956475483, -0.955007891, -0.953542448,
+       -0.952079147, -0.950617981, -0.949158944, -0.947702031, -0.946247233,
+       -0.944794546, -0.943343963, -0.941895477, -0.940449083, -0.939004773,
+       -0.937562543, -0.936122385, -0.934684294, -0.933248264, -0.931814287,
+       -0.930382359, -0.928952473, -0.927524624, -0.926098804, -0.924675008,
+       -0.923253231, -0.921833466, -0.920415707, -0.918999948, -0.917586184,
+       -0.916174408, -0.914764615, -0.913356799, -0.911950954, -0.910547074,
+       -0.909145154, -0.907745187, -0.906347169, -0.904951093, -0.903556954,
+       -0.902164745, -0.900774462, -0.899386099, -0.897999649, -0.896615109,
+       -0.895232471, -0.893851731, -0.892472882, -0.891095920, -0.889720839,
+       -0.888347634, -0.886976298, -0.885606827, -0.884239215, -0.882873457,
+       -0.881509547, -0.880147481, -0.878787252, -0.877428856, -0.876072286,
+       -0.874717539, -0.873364608, -0.872013488, -0.870664175, -0.869316662,
+       -0.867970945, -0.866627019, -0.865284878, -0.863944518, -0.862605932,
+       -0.861269117, -0.859934067, -0.858600776, -0.857269241, -0.855939455,
+       -0.854611414, -0.853285113, -0.851960547, -0.850637711, -0.849316600,
+       -0.847997209, -0.846679533, -0.845363568, -0.844049308, -0.842736748,
+       -0.841425884, -0.840116711, -0.838809224, -0.837503418, -0.836199289,
+       -0.834896832, -0.833596041, -0.832296913, -0.830999443, -0.829703625,
+       -0.828409455, -0.827116929, -0.825826042, -0.824536790, -0.823249167,
+       -0.821963168, -0.820678791, -0.819396029, -0.818114879, -0.816835335,
+       -0.815557394, -0.814281050, -0.813006300, -0.811733139, -0.810461561,
+       -0.809191564, -0.807923142, -0.806656292, -0.805391007, -0.804127286,
+       -0.802865121, -0.801604511, -0.800345450, -0.799087933, -0.797831957,
+       -0.796577517, -0.795324609, -0.794073229, -0.792823372, -0.791575034,
+       -0.790328211, -0.789082899, -0.787839093, -0.786596789, -0.785355984,
+       -0.784116672, -0.782878850, -0.781642514, -0.780407660, -0.779174282,
+       -0.777942378, -0.776711944, -0.775482974, -0.774255466, -0.773029414,
+       -0.771804816, -0.770581666, -0.769359962, -0.768139698, -0.766920872,
+       -0.765703478, -0.764487514, -0.763272975, -0.762059857, -0.760848156,
+       -0.759637869, -0.758428991, -0.757221519, -0.756015448, -0.754810775,
+       -0.753607497, -0.752405608, -0.751205106, -0.750005987, -0.748808246,
+       -0.747611881, -0.746416886, -0.745223260, -0.744030996, -0.742840093,
+       -0.741650546, -0.740462352, -0.739275506, -0.738090006, -0.736905847,
+       -0.735723026, -0.734541539, -0.733361383, -0.732182553, -0.731005047,
+       -0.729828860, -0.728653990, -0.727480432, -0.726308183, -0.725137239,
+       -0.723967597, -0.722799253, -0.721632204, -0.720466446, -0.719301976,
+       -0.718138789, -0.716976884, -0.715816256, -0.714656901, -0.713498817,
+       -0.712341999, -0.711186445, -0.710032151, -0.708879114, -0.707727329,
+       -0.706576795, -0.705427506, -0.704279461, -0.703132655, -0.701987086,
+       -0.700842749, -0.699699642, -0.698557762, -0.697417104, -0.696277666,
+       -0.695139444, -0.694002436, -0.692866637, -0.691732044, -0.690598655,
+       -0.689466467, -0.688335474, -0.687205676, -0.686077068, -0.684949646,
+       -0.683823409, -0.682698353, -0.681574474, -0.680451770, -0.679330237,
+       -0.678209872, -0.677090672, -0.675972634, -0.674855755, -0.673740031,
+       -0.672625460, -0.671512038, -0.670399762, -0.669288630, -0.668178638,
+       -0.667069783, -0.665962062, -0.664855472, -0.663750011, -0.662645674,
+       -0.661542459, -0.660440363, -0.659339383, -0.658239516, -0.657140759,
+       -0.656043109, -0.654946564, -0.653851119, -0.652756772, -0.651663521,
+       -0.650571362, -0.649480293, -0.648390309, -0.647301410, -0.646213591,
+       -0.645126850, -0.644041184, -0.642956590, -0.641873065, -0.640790606,
+       -0.639709211, -0.638628877, -0.637549600, -0.636471379, -0.635394210,
+       -0.634318090, -0.633243016, -0.632168987, -0.631095998, -0.630024048,
+       -0.628953133, -0.627883251, -0.626814399, -0.625746574, -0.624679773,
+       -0.623613995, -0.622549235, -0.621485492, -0.620422762, -0.619361043,
+       -0.618300333, -0.617240628, -0.616181926, -0.615124224, -0.614067520,
+       -0.613011811, -0.611957094, -0.610903366, -0.609850626, -0.608798870,
+       -0.607748096, -0.606698301, -0.605649482, -0.604601638, -0.603554764,
+       -0.602508860, -0.601463922, -0.600419947, -0.599376934, -0.598334879,
+       -0.597293780, -0.596253634, -0.595214440, -0.594176194, -0.593138893,
+       -0.592102537, -0.591067120, -0.590032643, -0.588999101, -0.587966493,
+       -0.586934815, -0.585904066, -0.584874243, -0.583845344, -0.582817365,
+       -0.581790306, -0.580764162, -0.579738932, -0.578714614, -0.577691204,
+       -0.576668701, -0.575647102, -0.574626405, -0.573606607, -0.572587706,
+       -0.571569700, -0.570552585, -0.569536361, -0.568521024, -0.567506572,
+       -0.566493003, -0.565480314, -0.564468503, -0.563457568, -0.562447507,
+       -0.561438316, -0.560429994, -0.559422539, -0.558415948, -0.557410219,
+       -0.556405349, -0.555401337, -0.554398180, -0.553395875, -0.552394421,
+       -0.551393815, -0.550394056, -0.549395139, -0.548397065, -0.547399830,
+       -0.546403431, -0.545407868, -0.544413137, -0.543419236, -0.542426164,
+       -0.541433918, -0.540442495, -0.539451894, -0.538462112, -0.537473148,
+       -0.536484998, -0.535497662, -0.534511136, -0.533525419, -0.532540508,
+       -0.531556401, -0.530573097, -0.529590592, -0.528608885, -0.527627974,
+       -0.526647857, -0.525668531, -0.524689995, -0.523712245, -0.522735281,
+       -0.521759100, -0.520783700, -0.519809079, -0.518835235, -0.517862165,
+       -0.516889869, -0.515918342, -0.514947585, -0.513977594, -0.513008367,
+       -0.512039903, -0.511072199, -0.510105254, -0.509139064, -0.508173630,
+       -0.507208947, -0.506245015, -0.505281831, -0.504319393, -0.503357700,
+       -0.502396749, -0.501436538, -0.500477065, -0.499518329, -0.498560327,
+       -0.497603058, -0.496646518, -0.495690708, -0.494735624, -0.493781264,
+       -0.492827627, -0.491874711, -0.490922513, -0.489971033, -0.489020267,
+       -0.488070214, -0.487120872, -0.486172239, -0.485224313, -0.484277093,
+       -0.483330576, -0.482384761, -0.481439645, -0.480495227, -0.479551505,
+       -0.478608477, -0.477666140, -0.476724495, -0.475783537, -0.474843266,
+       -0.473903680, -0.472964776, -0.472026553, -0.471089010, -0.470152143,
+       -0.469215952, -0.468280435, -0.467345590, -0.466411414, -0.465477907,
+       -0.464545066, -0.463612889, -0.462681375, -0.461750522, -0.460820328,
+       -0.459890792, -0.458961911, -0.458033683, -0.457106108, -0.456179183,
+       -0.455252906, -0.454327276, -0.453402291, -0.452477949, -0.451554248,
+       -0.450631187, -0.449708763, -0.448786976, -0.447865823, -0.446945303,
+       -0.446025414, -0.445106154, -0.444187521, -0.443269514, -0.442352131,
+       -0.441435370, -0.440519230, -0.439603709, -0.438688805, -0.437774516,
+       -0.436860841, -0.435947779, -0.435035326, -0.434123483, -0.433212246,
+       -0.432301615, -0.431391587, -0.430482162, -0.429573336, -0.428665110,
+       -0.427757480, -0.426850446, -0.425944006, -0.425038157, -0.424132899,
+       -0.423228230, -0.422324148, -0.421420651, -0.420517739, -0.419615408,
+       -0.418713658, -0.417812488, -0.416911894, -0.416011877, -0.415112433,
+       -0.414213562, -0.413315262, -0.412417532, -0.411520369, -0.410623772,
+       -0.409727740, -0.408832271, -0.407937364, -0.407043016, -0.406149226,
+       -0.405255993, -0.404363316, -0.403471191, -0.402579619, -0.401688597,
+       -0.400798124, -0.399908199, -0.399018819, -0.398129983, -0.397241690,
+       -0.396353938, -0.395466726, -0.394580051, -0.393693914, -0.392808311,
+       -0.391923242, -0.391038704, -0.390154697, -0.389271219, -0.388388269,
+       -0.387505844, -0.386623944, -0.385742566, -0.384861710, -0.383981374,
+       -0.383101556, -0.382222255, -0.381343470, -0.380465198, -0.379587439,
+       -0.378710191, -0.377833452, -0.376957221, -0.376081497, -0.375206278,
+       -0.374331562, -0.373457349, -0.372583636, -0.371710423, -0.370837707,
+       -0.369965487, -0.369093763, -0.368222532, -0.367351792, -0.366481544,
+       -0.365611784, -0.364742512, -0.363873726, -0.363005426, -0.362137608,
+       -0.361270272, -0.360403417, -0.359537042, -0.358671143, -0.357805721,
+       -0.356940774, -0.356076301, -0.355212299, -0.354348768, -0.353485706,
+       -0.352623113, -0.351760985, -0.350899323, -0.350038125, -0.349177388,
+       -0.348317113, -0.347457297, -0.346597939, -0.345739039, -0.344880593,
+       -0.344022602, -0.343165063, -0.342307975, -0.341451338, -0.340595149,
+       -0.339739407, -0.338884111, -0.338029260, -0.337174851, -0.336320885,
+       -0.335467359, -0.334614272, -0.333761623, -0.332909410, -0.332057633,
+       -0.331206289, -0.330355377, -0.329504897, -0.328654846, -0.327805224,
+       -0.326956029, -0.326107260, -0.325258916, -0.324410994, -0.323563494,
+       -0.322716415, -0.321869755, -0.321023513, -0.320177688, -0.319332278,
+       -0.318487282, -0.317642699, -0.316798527, -0.315954765, -0.315111412,
+       -0.314268467, -0.313425928, -0.312583794, -0.311742064, -0.310900736,
+       -0.310059809, -0.309219282, -0.308379154, -0.307539423, -0.306700088,
+       -0.305861148, -0.305022601, -0.304184447, -0.303346684, -0.302509310,
+       -0.301672325, -0.300835727, -0.299999515, -0.299163688, -0.298328244,
+       -0.297493183, -0.296658503, -0.295824202, -0.294990280, -0.294156735,
+       -0.293323566, -0.292490772, -0.291658351, -0.290826303, -0.289994626,
+       -0.289163319, -0.288332380, -0.287501809, -0.286671605, -0.285841765,
+       -0.285012289, -0.284183175, -0.283354423, -0.282526031, -0.281697998,
+       -0.280870323, -0.280043004, -0.279216041, -0.278389431, -0.277563175,
+       -0.276737270, -0.275911716, -0.275086511, -0.274261655, -0.273437145,
+       -0.272612981, -0.271789161, -0.270965686, -0.270142552, -0.269319759,
+       -0.268497306, -0.267675192, -0.266853415, -0.266031975, -0.265210870,
+       -0.264390098, -0.263569660, -0.262749553, -0.261929777, -0.261110330,
+       -0.260291211, -0.259472419, -0.258653953, -0.257835812, -0.257017994,
+       -0.256200498, -0.255383324, -0.254566470, -0.253749935, -0.252933717,
+       -0.252117817, -0.251302231, -0.250486960, -0.249672002, -0.248857357,
+       -0.248043022, -0.247228997, -0.246415280, -0.245601872, -0.244788769,
+       -0.243975972, -0.243163479, -0.242351289, -0.241539401, -0.240727813,
+       -0.239916525, -0.239105536, -0.238294844, -0.237484449, -0.236674348,
+       -0.235864542, -0.235055029, -0.234245807, -0.233436876, -0.232628235,
+       -0.231819882, -0.231011817, -0.230204038, -0.229396544, -0.228589335,
+       -0.227782408, -0.226975763, -0.226169399, -0.225363315, -0.224557509,
+       -0.223751981, -0.222946729, -0.222141753, -0.221337051, -0.220532622,
+       -0.219728465, -0.218924579, -0.218120964, -0.217317617, -0.216514537,
+       -0.215711725, -0.214909178, -0.214106895, -0.213304876, -0.212503119,
+       -0.211701624, -0.210900389, -0.210099413, -0.209298695, -0.208498234,
+       -0.207698030, -0.206898080, -0.206098384, -0.205298940, -0.204499749,
+       -0.203700808, -0.202902117, -0.202103674, -0.201305479, -0.200507530,
+       -0.199709826, -0.198912367, -0.198115152, -0.197318178, -0.196521446,
+       -0.195724954, -0.194928700, -0.194132685, -0.193336907, -0.192541365,
+       -0.191746058, -0.190950985, -0.190156145, -0.189361536, -0.188567158,
+       -0.187773010, -0.186979091, -0.186185400, -0.185391935, -0.184598695,
+       -0.183805680, -0.183012889, -0.182220321, -0.181427973, -0.180635847,
+       -0.179843940, -0.179052251, -0.178260779, -0.177469525, -0.176678485,
+       -0.175887660, -0.175097048, -0.174306648, -0.173516460, -0.172726482,
+       -0.171936714, -0.171147153, -0.170357800, -0.169568653, -0.168779712,
+       -0.167990974, -0.167202440, -0.166414108, -0.165625977, -0.164838047,
+       -0.164050316, -0.163262782, -0.162475447, -0.161688307, -0.160901362,
+       -0.160114612, -0.159328055, -0.158541690, -0.157755517, -0.156969533,
+       -0.156183739, -0.155398133, -0.154612715, -0.153827482, -0.153042435,
+       -0.152257572, -0.151472893, -0.150688395, -0.149904079, -0.149119944,
+       -0.148335988, -0.147552210, -0.146768609, -0.145985185, -0.145201936,
+       -0.144418862, -0.143635961, -0.142853233, -0.142070676, -0.141288290,
+       -0.140506073, -0.139724025, -0.138942144, -0.138160430, -0.137378882,
+       -0.136597499, -0.135816279, -0.135035222, -0.134254326, -0.133473592,
+       -0.132693017, -0.131912601, -0.131132343, -0.130352242, -0.129572297,
+       -0.128792507, -0.128012871, -0.127233388, -0.126454057, -0.125674878,
+       -0.124895848, -0.124116968, -0.123338236, -0.122559652, -0.121781213,
+       -0.121002920, -0.120224772, -0.119446767, -0.118668905, -0.117891184,
+       -0.117113604, -0.116336164, -0.115558862, -0.114781698, -0.114004671,
+       -0.113227780, -0.112451023, -0.111674401, -0.110897912, -0.110121554,
+       -0.109345328, -0.108569232, -0.107793266, -0.107017427, -0.106241716,
+       -0.105466132, -0.104690673, -0.103915338, -0.103140127, -0.102365039,
+       -0.101590072, -0.100815226, -0.100040500, -0.099265893, -0.098491403,
+       -0.097717031, -0.096942775, -0.096168634, -0.095394607, -0.094620693,
+       -0.093846892, -0.093073202, -0.092299623, -0.091526153, -0.090752791,
+       -0.089979538, -0.089206391, -0.088433349, -0.087660413, -0.086887581,
+       -0.086114851, -0.085342224, -0.084569698, -0.083797272, -0.083024945,
+       -0.082252717, -0.081480586, -0.080708551, -0.079936612, -0.079164768,
+       -0.078393018, -0.077621360, -0.076849794, -0.076078320, -0.075306935,
+       -0.074535639, -0.073764432, -0.072993311, -0.072222277, -0.071451329,
+       -0.070680465, -0.069909684, -0.069138987, -0.068368371, -0.067597835,
+       -0.066827380, -0.066057004, -0.065286705, -0.064516484, -0.063746339,
+       -0.062976270, -0.062206274, -0.061436353, -0.060666503, -0.059896726,
+       -0.059127019, -0.058357382, -0.057587814, -0.056818314, -0.056048880,
+       -0.055279514, -0.054510212, -0.053740974, -0.052971800, -0.052202689,
+       -0.051433639, -0.050664650, -0.049895720, -0.049126850, -0.048358037,
+       -0.047589281, -0.046820582, -0.046051938, -0.045283348, -0.044514811,
+       -0.043746327, -0.042977894, -0.042209512, -0.041441180, -0.040672897,
+       -0.039904661, -0.039136473, -0.038368331, -0.037600234, -0.036832181,
+       -0.036064172, -0.035296205, -0.034528279, -0.033760395, -0.032992550,
+       -0.032224744, -0.031456976, -0.030689245, -0.029921550, -0.029153891,
+       -0.028386265, -0.027618673, -0.026851114, -0.026083586, -0.025316089,
+       -0.024548622, -0.023781184, -0.023013773, -0.022246390, -0.021479033,
+       -0.020711701, -0.019944394, -0.019177110, -0.018409849, -0.017642609,
+       -0.016875390, -0.016108191, -0.015341011, -0.014573849, -0.013806704,
+       -0.013039576, -0.012272462, -0.011505364, -0.010738278, -0.009971206,
+       -0.009204145, -0.008437095, -0.007670054, -0.006903023, -0.006136000,
+       -0.005368984, -0.004601975, -0.003834971, -0.003067971, -0.002300975,
+       -0.001533982, -0.000766991,
+}; // END of _fastangle_tan_table_13[8192]
+
+static const int _fastangle_atan_table_13[8192] =
+{
+       -1023, -1023, -1023, -1023, -1022, -1022, -1022, -1022, -1022, -1022,
+       -1021, -1021, -1021, -1021, -1021, -1021, -1020, -1020, -1020, -1020,
+       -1020, -1020, -1019, -1019, -1019, -1019, -1019, -1019, -1019, -1018,
+       -1018, -1018, -1018, -1018, -1018, -1017, -1017, -1017, -1017, -1017,
+       -1017, -1016, -1016, -1016, -1016, -1016, -1016, -1015, -1015, -1015,
+       -1015, -1015, -1015, -1015, -1014, -1014, -1014, -1014, -1014, -1014,
+       -1013, -1013, -1013, -1013, -1013, -1013, -1012, -1012, -1012, -1012,
+       -1012, -1012, -1011, -1011, -1011, -1011, -1011, -1011, -1010, -1010,
+       -1010, -1010, -1010, -1010, -1009, -1009, -1009, -1009, -1009, -1009,
+       -1009, -1008, -1008, -1008, -1008, -1008, -1008, -1007, -1007, -1007,
+       -1007, -1007, -1007, -1006, -1006, -1006, -1006, -1006, -1006, -1005,
+       -1005, -1005, -1005, -1005, -1005, -1004, -1004, -1004, -1004, -1004,
+       -1004, -1003, -1003, -1003, -1003, -1003, -1003, -1002, -1002, -1002,
+       -1002, -1002, -1002, -1001, -1001, -1001, -1001, -1001, -1001, -1000,
+       -1000, -1000, -1000, -1000, -1000, -1000, -999, -999, -999, -999,
+       -999, -999, -998, -998, -998, -998, -998, -998, -997, -997,
+       -997, -997, -997, -997, -996, -996, -996, -996, -996, -996,
+       -995, -995, -995, -995, -995, -995, -994, -994, -994, -994,
+       -994, -994, -993, -993, -993, -993, -993, -993, -992, -992,
+       -992, -992, -992, -992, -991, -991, -991, -991, -991, -991,
+       -990, -990, -990, -990, -990, -990, -989, -989, -989, -989,
+       -989, -989, -988, -988, -988, -988, -988, -988, -987, -987,
+       -987, -987, -987, -987, -986, -986, -986, -986, -986, -986,
+       -985, -985, -985, -985, -985, -985, -984, -984, -984, -984,
+       -984, -983, -983, -983, -983, -983, -983, -982, -982, -982,
+       -982, -982, -982, -981, -981, -981, -981, -981, -981, -980,
+       -980, -980, -980, -980, -980, -979, -979, -979, -979, -979,
+       -979, -978, -978, -978, -978, -978, -978, -977, -977, -977,
+       -977, -977, -977, -976, -976, -976, -976, -976, -976, -975,
+       -975, -975, -975, -975, -974, -974, -974, -974, -974, -974,
+       -973, -973, -973, -973, -973, -973, -972, -972, -972, -972,
+       -972, -972, -971, -971, -971, -971, -971, -971, -970, -970,
+       -970, -970, -970, -970, -969, -969, -969, -969, -969, -968,
+       -968, -968, -968, -968, -968, -967, -967, -967, -967, -967,
+       -967, -966, -966, -966, -966, -966, -966, -965, -965, -965,
+       -965, -965, -964, -964, -964, -964, -964, -964, -963, -963,
+       -963, -963, -963, -963, -962, -962, -962, -962, -962, -962,
+       -961, -961, -961, -961, -961, -960, -960, -960, -960, -960,
+       -960, -959, -959, -959, -959, -959, -959, -958, -958, -958,
+       -958, -958, -958, -957, -957, -957, -957, -957, -956, -956,
+       -956, -956, -956, -956, -955, -955, -955, -955, -955, -955,
+       -954, -954, -954, -954, -954, -953, -953, -953, -953, -953,
+       -953, -952, -952, -952, -952, -952, -952, -951, -951, -951,
+       -951, -951, -950, -950, -950, -950, -950, -950, -949, -949,
+       -949, -949, -949, -949, -948, -948, -948, -948, -948, -947,
+       -947, -947, -947, -947, -947, -946, -946, -946, -946, -946,
+       -946, -945, -945, -945, -945, -945, -944, -944, -944, -944,
+       -944, -944, -943, -943, -943, -943, -943, -942, -942, -942,
+       -942, -942, -942, -941, -941, -941, -941, -941, -941, -940,
+       -940, -940, -940, -940, -939, -939, -939, -939, -939, -939,
+       -938, -938, -938, -938, -938, -937, -937, -937, -937, -937,
+       -937, -936, -936, -936, -936, -936, -935, -935, -935, -935,
+       -935, -935, -934, -934, -934, -934, -934, -933, -933, -933,
+       -933, -933, -933, -932, -932, -932, -932, -932, -931, -931,
+       -931, -931, -931, -931, -930, -930, -930, -930, -930, -929,
+       -929, -929, -929, -929, -929, -928, -928, -928, -928, -928,
+       -927, -927, -927, -927, -927, -927, -926, -926, -926, -926,
+       -926, -925, -925, -925, -925, -925, -925, -924, -924, -924,
+       -924, -924, -923, -923, -923, -923, -923, -923, -922, -922,
+       -922, -922, -922, -921, -921, -921, -921, -921, -921, -920,
+       -920, -920, -920, -920, -919, -919, -919, -919, -919, -919,
+       -918, -918, -918, -918, -918, -917, -917, -917, -917, -917,
+       -916, -916, -916, -916, -916, -916, -915, -915, -915, -915,
+       -915, -914, -914, -914, -914, -914, -914, -913, -913, -913,
+       -913, -913, -912, -912, -912, -912, -912, -911, -911, -911,
+       -911, -911, -911, -910, -910, -910, -910, -910, -909, -909,
+       -909, -909, -909, -908, -908, -908, -908, -908, -908, -907,
+       -907, -907, -907, -907, -906, -906, -906, -906, -906, -905,
+       -905, -905, -905, -905, -905, -904, -904, -904, -904, -904,
+       -903, -903, -903, -903, -903, -902, -902, -902, -902, -902,
+       -902, -901, -901, -901, -901, -901, -900, -900, -900, -900,
+       -900, -899, -899, -899, -899, -899, -898, -898, -898, -898,
+       -898, -898, -897, -897, -897, -897, -897, -896, -896, -896,
+       -896, -896, -895, -895, -895, -895, -895, -895, -894, -894,
+       -894, -894, -894, -893, -893, -893, -893, -893, -892, -892,
+       -892, -892, -892, -891, -891, -891, -891, -891, -890, -890,
+       -890, -890, -890, -890, -889, -889, -889, -889, -889, -888,
+       -888, -888, -888, -888, -887, -887, -887, -887, -887, -886,
+       -886, -886, -886, -886, -886, -885, -885, -885, -885, -885,
+       -884, -884, -884, -884, -884, -883, -883, -883, -883, -883,
+       -882, -882, -882, -882, -882, -881, -881, -881, -881, -881,
+       -880, -880, -880, -880, -880, -880, -879, -879, -879, -879,
+       -879, -878, -878, -878, -878, -878, -877, -877, -877, -877,
+       -877, -876, -876, -876, -876, -876, -875, -875, -875, -875,
+       -875, -874, -874, -874, -874, -874, -873, -873, -873, -873,
+       -873, -873, -872, -872, -872, -872, -872, -871, -871, -871,
+       -871, -871, -870, -870, -870, -870, -870, -869, -869, -869,
+       -869, -869, -868, -868, -868, -868, -868, -867, -867, -867,
+       -867, -867, -866, -866, -866, -866, -866, -865, -865, -865,
+       -865, -865, -864, -864, -864, -864, -864, -863, -863, -863,
+       -863, -863, -862, -862, -862, -862, -862, -861, -861, -861,
+       -861, -861, -860, -860, -860, -860, -860, -859, -859, -859,
+       -859, -859, -859, -858, -858, -858, -858, -858, -857, -857,
+       -857, -857, -857, -856, -856, -856, -856, -856, -855, -855,
+       -855, -855, -855, -854, -854, -854, -854, -854, -853, -853,
+       -853, -853, -853, -852, -852, -852, -852, -852, -851, -851,
+       -851, -851, -851, -850, -850, -850, -850, -850, -849, -849,
+       -849, -849, -849, -848, -848, -848, -848, -847, -847, -847,
+       -847, -847, -846, -846, -846, -846, -846, -845, -845, -845,
+       -845, -845, -844, -844, -844, -844, -844, -843, -843, -843,
+       -843, -843, -842, -842, -842, -842, -842, -841, -841, -841,
+       -841, -841, -840, -840, -840, -840, -840, -839, -839, -839,
+       -839, -839, -838, -838, -838, -838, -838, -837, -837, -837,
+       -837, -837, -836, -836, -836, -836, -836, -835, -835, -835,
+       -835, -834, -834, -834, -834, -834, -833, -833, -833, -833,
+       -833, -832, -832, -832, -832, -832, -831, -831, -831, -831,
+       -831, -830, -830, -830, -830, -830, -829, -829, -829, -829,
+       -829, -828, -828, -828, -828, -828, -827, -827, -827, -827,
+       -826, -826, -826, -826, -826, -825, -825, -825, -825, -825,
+       -824, -824, -824, -824, -824, -823, -823, -823, -823, -823,
+       -822, -822, -822, -822, -822, -821, -821, -821, -821, -820,
+       -820, -820, -820, -820, -819, -819, -819, -819, -819, -818,
+       -818, -818, -818, -818, -817, -817, -817, -817, -817, -816,
+       -816, -816, -816, -815, -815, -815, -815, -815, -814, -814,
+       -814, -814, -814, -813, -813, -813, -813, -813, -812, -812,
+       -812, -812, -811, -811, -811, -811, -811, -810, -810, -810,
+       -810, -810, -809, -809, -809, -809, -809, -808, -808, -808,
+       -808, -807, -807, -807, -807, -807, -806, -806, -806, -806,
+       -806, -805, -805, -805, -805, -805, -804, -804, -804, -804,
+       -803, -803, -803, -803, -803, -802, -802, -802, -802, -802,
+       -801, -801, -801, -801, -801, -800, -800, -800, -800, -799,
+       -799, -799, -799, -799, -798, -798, -798, -798, -798, -797,
+       -797, -797, -797, -796, -796, -796, -796, -796, -795, -795,
+       -795, -795, -795, -794, -794, -794, -794, -793, -793, -793,
+       -793, -793, -792, -792, -792, -792, -792, -791, -791, -791,
+       -791, -790, -790, -790, -790, -790, -789, -789, -789, -789,
+       -789, -788, -788, -788, -788, -787, -787, -787, -787, -787,
+       -786, -786, -786, -786, -786, -785, -785, -785, -785, -784,
+       -784, -784, -784, -784, -783, -783, -783, -783, -782, -782,
+       -782, -782, -782, -781, -781, -781, -781, -781, -780, -780,
+       -780, -780, -779, -779, -779, -779, -779, -778, -778, -778,
+       -778, -778, -777, -777, -777, -777, -776, -776, -776, -776,
+       -776, -775, -775, -775, -775, -774, -774, -774, -774, -774,
+       -773, -773, -773, -773, -772, -772, -772, -772, -772, -771,
+       -771, -771, -771, -771, -770, -770, -770, -770, -769, -769,
+       -769, -769, -769, -768, -768, -768, -768, -767, -767, -767,
+       -767, -767, -766, -766, -766, -766, -765, -765, -765, -765,
+       -765, -764, -764, -764, -764, -763, -763, -763, -763, -763,
+       -762, -762, -762, -762, -761, -761, -761, -761, -761, -760,
+       -760, -760, -760, -759, -759, -759, -759, -759, -758, -758,
+       -758, -758, -757, -757, -757, -757, -757, -756, -756, -756,
+       -756, -755, -755, -755, -755, -755, -754, -754, -754, -754,
+       -753, -753, -753, -753, -753, -752, -752, -752, -752, -751,
+       -751, -751, -751, -751, -750, -750, -750, -750, -749, -749,
+       -749, -749, -749, -748, -748, -748, -748, -747, -747, -747,
+       -747, -747, -746, -746, -746, -746, -745, -745, -745, -745,
+       -745, -744, -744, -744, -744, -743, -743, -743, -743, -742,
+       -742, -742, -742, -742, -741, -741, -741, -741, -740, -740,
+       -740, -740, -740, -739, -739, -739, -739, -738, -738, -738,
+       -738, -738, -737, -737, -737, -737, -736, -736, -736, -736,
+       -735, -735, -735, -735, -735, -734, -734, -734, -734, -733,
+       -733, -733, -733, -733, -732, -732, -732, -732, -731, -731,
+       -731, -731, -730, -730, -730, -730, -730, -729, -729, -729,
+       -729, -728, -728, -728, -728, -727, -727, -727, -727, -727,
+       -726, -726, -726, -726, -725, -725, -725, -725, -725, -724,
+       -724, -724, -724, -723, -723, -723, -723, -722, -722, -722,
+       -722, -722, -721, -721, -721, -721, -720, -720, -720, -720,
+       -719, -719, -719, -719, -719, -718, -718, -718, -718, -717,
+       -717, -717, -717, -716, -716, -716, -716, -716, -715, -715,
+       -715, -715, -714, -714, -714, -714, -713, -713, -713, -713,
+       -713, -712, -712, -712, -712, -711, -711, -711, -711, -710,
+       -710, -710, -710, -709, -709, -709, -709, -709, -708, -708,
+       -708, -708, -707, -707, -707, -707, -706, -706, -706, -706,
+       -706, -705, -705, -705, -705, -704, -704, -704, -704, -703,
+       -703, -703, -703, -702, -702, -702, -702, -702, -701, -701,
+       -701, -701, -700, -700, -700, -700, -699, -699, -699, -699,
+       -698, -698, -698, -698, -698, -697, -697, -697, -697, -696,
+       -696, -696, -696, -695, -695, -695, -695, -694, -694, -694,
+       -694, -694, -693, -693, -693, -693, -692, -692, -692, -692,
+       -691, -691, -691, -691, -690, -690, -690, -690, -690, -689,
+       -689, -689, -689, -688, -688, -688, -688, -687, -687, -687,
+       -687, -686, -686, -686, -686, -685, -685, -685, -685, -685,
+       -684, -684, -684, -684, -683, -683, -683, -683, -682, -682,
+       -682, -682, -681, -681, -681, -681, -680, -680, -680, -680,
+       -680, -679, -679, -679, -679, -678, -678, -678, -678, -677,
+       -677, -677, -677, -676, -676, -676, -676, -675, -675, -675,
+       -675, -674, -674, -674, -674, -674, -673, -673, -673, -673,
+       -672, -672, -672, -672, -671, -671, -671, -671, -670, -670,
+       -670, -670, -669, -669, -669, -669, -668, -668, -668, -668,
+       -667, -667, -667, -667, -667, -666, -666, -666, -666, -665,
+       -665, -665, -665, -664, -664, -664, -664, -663, -663, -663,
+       -663, -662, -662, -662, -662, -661, -661, -661, -661, -660,
+       -660, -660, -660, -659, -659, -659, -659, -659, -658, -658,
+       -658, -658, -657, -657, -657, -657, -656, -656, -656, -656,
+       -655, -655, -655, -655, -654, -654, -654, -654, -653, -653,
+       -653, -653, -652, -652, -652, -652, -651, -651, -651, -651,
+       -650, -650, -650, -650, -649, -649, -649, -649, -648, -648,
+       -648, -648, -647, -647, -647, -647, -647, -646, -646, -646,
+       -646, -645, -645, -645, -645, -644, -644, -644, -644, -643,
+       -643, -643, -643, -642, -642, -642, -642, -641, -641, -641,
+       -641, -640, -640, -640, -640, -639, -639, -639, -639, -638,
+       -638, -638, -638, -637, -637, -637, -637, -636, -636, -636,
+       -636, -635, -635, -635, -635, -634, -634, -634, -634, -633,
+       -633, -633, -633, -632, -632, -632, -632, -631, -631, -631,
+       -631, -630, -630, -630, -630, -629, -629, -629, -629, -628,
+       -628, -628, -628, -627, -627, -627, -627, -626, -626, -626,
+       -626, -625, -625, -625, -625, -624, -624, -624, -624, -623,
+       -623, -623, -623, -622, -622, -622, -622, -621, -621, -621,
+       -621, -620, -620, -620, -620, -619, -619, -619, -619, -618,
+       -618, -618, -618, -617, -617, -617, -617, -616, -616, -616,
+       -616, -615, -615, -615, -615, -614, -614, -614, -614, -613,
+       -613, -613, -613, -612, -612, -612, -612, -611, -611, -611,
+       -611, -610, -610, -610, -610, -609, -609, -609, -609, -608,
+       -608, -608, -608, -607, -607, -607, -606, -606, -606, -606,
+       -605, -605, -605, -605, -604, -604, -604, -604, -603, -603,
+       -603, -603, -602, -602, -602, -602, -601, -601, -601, -601,
+       -600, -600, -600, -600, -599, -599, -599, -599, -598, -598,
+       -598, -598, -597, -597, -597, -597, -596, -596, -596, -596,
+       -595, -595, -595, -594, -594, -594, -594, -593, -593, -593,
+       -593, -592, -592, -592, -592, -591, -591, -591, -591, -590,
+       -590, -590, -590, -589, -589, -589, -589, -588, -588, -588,
+       -588, -587, -587, -587, -587, -586, -586, -586, -585, -585,
+       -585, -585, -584, -584, -584, -584, -583, -583, -583, -583,
+       -582, -582, -582, -582, -581, -581, -581, -581, -580, -580,
+       -580, -580, -579, -579, -579, -579, -578, -578, -578, -577,
+       -577, -577, -577, -576, -576, -576, -576, -575, -575, -575,
+       -575, -574, -574, -574, -574, -573, -573, -573, -573, -572,
+       -572, -572, -571, -571, -571, -571, -570, -570, -570, -570,
+       -569, -569, -569, -569, -568, -568, -568, -568, -567, -567,
+       -567, -567, -566, -566, -566, -565, -565, -565, -565, -564,
+       -564, -564, -564, -563, -563, -563, -563, -562, -562, -562,
+       -562, -561, -561, -561, -560, -560, -560, -560, -559, -559,
+       -559, -559, -558, -558, -558, -558, -557, -557, -557, -557,
+       -556, -556, -556, -555, -555, -555, -555, -554, -554, -554,
+       -554, -553, -553, -553, -553, -552, -552, -552, -552, -551,
+       -551, -551, -550, -550, -550, -550, -549, -549, -549, -549,
+       -548, -548, -548, -548, -547, -547, -547, -546, -546, -546,
+       -546, -545, -545, -545, -545, -544, -544, -544, -544, -543,
+       -543, -543, -542, -542, -542, -542, -541, -541, -541, -541,
+       -540, -540, -540, -540, -539, -539, -539, -538, -538, -538,
+       -538, -537, -537, -537, -537, -536, -536, -536, -536, -535,
+       -535, -535, -534, -534, -534, -534, -533, -533, -533, -533,
+       -532, -532, -532, -532, -531, -531, -531, -530, -530, -530,
+       -530, -529, -529, -529, -529, -528, -528, -528, -528, -527,
+       -527, -527, -526, -526, -526, -526, -525, -525, -525, -525,
+       -524, -524, -524, -523, -523, -523, -523, -522, -522, -522,
+       -522, -521, -521, -521, -521, -520, -520, -520, -519, -519,
+       -519, -519, -518, -518, -518, -518, -517, -517, -517, -516,
+       -516, -516, -516, -515, -515, -515, -515, -514, -514, -514,
+       -513, -513, -513, -513, -512, -512, -512, -512, -511, -511,
+       -511, -510, -510, -510, -510, -509, -509, -509, -509, -508,
+       -508, -508, -507, -507, -507, -507, -506, -506, -506, -506,
+       -505, -505, -505, -504, -504, -504, -504, -503, -503, -503,
+       -503, -502, -502, -502, -501, -501, -501, -501, -500, -500,
+       -500, -500, -499, -499, -499, -498, -498, -498, -498, -497,
+       -497, -497, -497, -496, -496, -496, -495, -495, -495, -495,
+       -494, -494, -494, -494, -493, -493, -493, -492, -492, -492,
+       -492, -491, -491, -491, -491, -490, -490, -490, -489, -489,
+       -489, -489, -488, -488, -488, -487, -487, -487, -487, -486,
+       -486, -486, -486, -485, -485, -485, -484, -484, -484, -484,
+       -483, -483, -483, -483, -482, -482, -482, -481, -481, -481,
+       -481, -480, -480, -480, -479, -479, -479, -479, -478, -478,
+       -478, -478, -477, -477, -477, -476, -476, -476, -476, -475,
+       -475, -475, -474, -474, -474, -474, -473, -473, -473, -473,
+       -472, -472, -472, -471, -471, -471, -471, -470, -470, -470,
+       -469, -469, -469, -469, -468, -468, -468, -468, -467, -467,
+       -467, -466, -466, -466, -466, -465, -465, -465, -464, -464,
+       -464, -464, -463, -463, -463, -462, -462, -462, -462, -461,
+       -461, -461, -461, -460, -460, -460, -459, -459, -459, -459,
+       -458, -458, -458, -457, -457, -457, -457, -456, -456, -456,
+       -455, -455, -455, -455, -454, -454, -454, -454, -453, -453,
+       -453, -452, -452, -452, -452, -451, -451, -451, -450, -450,
+       -450, -450, -449, -449, -449, -448, -448, -448, -448, -447,
+       -447, -447, -446, -446, -446, -446, -445, -445, -445, -444,
+       -444, -444, -444, -443, -443, -443, -443, -442, -442, -442,
+       -441, -441, -441, -441, -440, -440, -440, -439, -439, -439,
+       -439, -438, -438, -438, -437, -437, -437, -437, -436, -436,
+       -436, -435, -435, -435, -435, -434, -434, -434, -433, -433,
+       -433, -433, -432, -432, -432, -431, -431, -431, -431, -430,
+       -430, -430, -429, -429, -429, -429, -428, -428, -428, -427,
+       -427, -427, -427, -426, -426, -426, -425, -425, -425, -425,
+       -424, -424, -424, -423, -423, -423, -423, -422, -422, -422,
+       -421, -421, -421, -421, -420, -420, -420, -419, -419, -419,
+       -419, -418, -418, -418, -417, -417, -417, -417, -416, -416,
+       -416, -415, -415, -415, -415, -414, -414, -414, -413, -413,
+       -413, -413, -412, -412, -412, -411, -411, -411, -411, -410,
+       -410, -410, -409, -409, -409, -409, -408, -408, -408, -407,
+       -407, -407, -407, -406, -406, -406, -405, -405, -405, -405,
+       -404, -404, -404, -403, -403, -403, -402, -402, -402, -402,
+       -401, -401, -401, -400, -400, -400, -400, -399, -399, -399,
+       -398, -398, -398, -398, -397, -397, -397, -396, -396, -396,
+       -396, -395, -395, -395, -394, -394, -394, -394, -393, -393,
+       -393, -392, -392, -392, -391, -391, -391, -391, -390, -390,
+       -390, -389, -389, -389, -389, -388, -388, -388, -387, -387,
+       -387, -387, -386, -386, -386, -385, -385, -385, -384, -384,
+       -384, -384, -383, -383, -383, -382, -382, -382, -382, -381,
+       -381, -381, -380, -380, -380, -380, -379, -379, -379, -378,
+       -378, -378, -377, -377, -377, -377, -376, -376, -376, -375,
+       -375, -375, -375, -374, -374, -374, -373, -373, -373, -373,
+       -372, -372, -372, -371, -371, -371, -370, -370, -370, -370,
+       -369, -369, -369, -368, -368, -368, -368, -367, -367, -367,
+       -366, -366, -366, -365, -365, -365, -365, -364, -364, -364,
+       -363, -363, -363, -363, -362, -362, -362, -361, -361, -361,
+       -360, -360, -360, -360, -359, -359, -359, -358, -358, -358,
+       -358, -357, -357, -357, -356, -356, -356, -355, -355, -355,
+       -355, -354, -354, -354, -353, -353, -353, -353, -352, -352,
+       -352, -351, -351, -351, -350, -350, -350, -350, -349, -349,
+       -349, -348, -348, -348, -347, -347, -347, -347, -346, -346,
+       -346, -345, -345, -345, -345, -344, -344, -344, -343, -343,
+       -343, -342, -342, -342, -342, -341, -341, -341, -340, -340,
+       -340, -339, -339, -339, -339, -338, -338, -338, -337, -337,
+       -337, -337, -336, -336, -336, -335, -335, -335, -334, -334,
+       -334, -334, -333, -333, -333, -332, -332, -332, -331, -331,
+       -331, -331, -330, -330, -330, -329, -329, -329, -328, -328,
+       -328, -328, -327, -327, -327, -326, -326, -326, -325, -325,
+       -325, -325, -324, -324, -324, -323, -323, -323, -322, -322,
+       -322, -322, -321, -321, -321, -320, -320, -320, -319, -319,
+       -319, -319, -318, -318, -318, -317, -317, -317, -316, -316,
+       -316, -316, -315, -315, -315, -314, -314, -314, -313, -313,
+       -313, -313, -312, -312, -312, -311, -311, -311, -310, -310,
+       -310, -310, -309, -309, -309, -308, -308, -308, -307, -307,
+       -307, -307, -306, -306, -306, -305, -305, -305, -304, -304,
+       -304, -304, -303, -303, -303, -302, -302, -302, -301, -301,
+       -301, -301, -300, -300, -300, -299, -299, -299, -298, -298,
+       -298, -298, -297, -297, -297, -296, -296, -296, -295, -295,
+       -295, -295, -294, -294, -294, -293, -293, -293, -292, -292,
+       -292, -291, -291, -291, -291, -290, -290, -290, -289, -289,
+       -289, -288, -288, -288, -288, -287, -287, -287, -286, -286,
+       -286, -285, -285, -285, -285, -284, -284, -284, -283, -283,
+       -283, -282, -282, -282, -281, -281, -281, -281, -280, -280,
+       -280, -279, -279, -279, -278, -278, -278, -278, -277, -277,
+       -277, -276, -276, -276, -275, -275, -275, -274, -274, -274,
+       -274, -273, -273, -273, -272, -272, -272, -271, -271, -271,
+       -271, -270, -270, -270, -269, -269, -269, -268, -268, -268,
+       -267, -267, -267, -267, -266, -266, -266, -265, -265, -265,
+       -264, -264, -264, -264, -263, -263, -263, -262, -262, -262,
+       -261, -261, -261, -260, -260, -260, -260, -259, -259, -259,
+       -258, -258, -258, -257, -257, -257, -256, -256, -256, -256,
+       -255, -255, -255, -254, -254, -254, -253, -253, -253, -253,
+       -252, -252, -252, -251, -251, -251, -250, -250, -250, -249,
+       -249, -249, -249, -248, -248, -248, -247, -247, -247, -246,
+       -246, -246, -245, -245, -245, -245, -244, -244, -244, -243,
+       -243, -243, -242, -242, -242, -241, -241, -241, -241, -240,
+       -240, -240, -239, -239, -239, -238, -238, -238, -237, -237,
+       -237, -237, -236, -236, -236, -235, -235, -235, -234, -234,
+       -234, -233, -233, -233, -233, -232, -232, -232, -231, -231,
+       -231, -230, -230, -230, -229, -229, -229, -229, -228, -228,
+       -228, -227, -227, -227, -226, -226, -226, -225, -225, -225,
+       -225, -224, -224, -224, -223, -223, -223, -222, -222, -222,
+       -221, -221, -221, -220, -220, -220, -220, -219, -219, -219,
+       -218, -218, -218, -217, -217, -217, -216, -216, -216, -216,
+       -215, -215, -215, -214, -214, -214, -213, -213, -213, -212,
+       -212, -212, -212, -211, -211, -211, -210, -210, -210, -209,
+       -209, -209, -208, -208, -208, -207, -207, -207, -207, -206,
+       -206, -206, -205, -205, -205, -204, -204, -204, -203, -203,
+       -203, -203, -202, -202, -202, -201, -201, -201, -200, -200,
+       -200, -199, -199, -199, -198, -198, -198, -198, -197, -197,
+       -197, -196, -196, -196, -195, -195, -195, -194, -194, -194,
+       -193, -193, -193, -193, -192, -192, -192, -191, -191, -191,
+       -190, -190, -190, -189, -189, -189, -189, -188, -188, -188,
+       -187, -187, -187, -186, -186, -186, -185, -185, -185, -184,
+       -184, -184, -184, -183, -183, -183, -182, -182, -182, -181,
+       -181, -181, -180, -180, -180, -179, -179, -179, -179, -178,
+       -178, -178, -177, -177, -177, -176, -176, -176, -175, -175,
+       -175, -174, -174, -174, -174, -173, -173, -173, -172, -172,
+       -172, -171, -171, -171, -170, -170, -170, -169, -169, -169,
+       -169, -168, -168, -168, -167, -167, -167, -166, -166, -166,
+       -165, -165, -165, -164, -164, -164, -164, -163, -163, -163,
+       -162, -162, -162, -161, -161, -161, -160, -160, -160, -159,
+       -159, -159, -158, -158, -158, -158, -157, -157, -157, -156,
+       -156, -156, -155, -155, -155, -154, -154, -154, -153, -153,
+       -153, -153, -152, -152, -152, -151, -151, -151, -150, -150,
+       -150, -149, -149, -149, -148, -148, -148, -148, -147, -147,
+       -147, -146, -146, -146, -145, -145, -145, -144, -144, -144,
+       -143, -143, -143, -142, -142, -142, -142, -141, -141, -141,
+       -140, -140, -140, -139, -139, -139, -138, -138, -138, -137,
+       -137, -137, -136, -136, -136, -136, -135, -135, -135, -134,
+       -134, -134, -133, -133, -133, -132, -132, -132, -131, -131,
+       -131, -131, -130, -130, -130, -129, -129, -129, -128, -128,
+       -128, -127, -127, -127, -126, -126, -126, -125, -125, -125,
+       -125, -124, -124, -124, -123, -123, -123, -122, -122, -122,
+       -121, -121, -121, -120, -120, -120, -119, -119, -119, -119,
+       -118, -118, -118, -117, -117, -117, -116, -116, -116, -115,
+       -115, -115, -114, -114, -114, -113, -113, -113, -113, -112,
+       -112, -112, -111, -111, -111, -110, -110, -110, -109, -109,
+       -109, -108, -108, -108, -107, -107, -107, -107, -106, -106,
+       -106, -105, -105, -105, -104, -104, -104, -103, -103, -103,
+       -102, -102, -102, -101, -101, -101, -101, -100, -100, -100,
+       -99, -99, -99, -98, -98, -98, -97, -97, -97, -96,
+       -96, -96, -95, -95, -95, -94, -94, -94, -94, -93,
+       -93, -93, -92, -92, -92, -91, -91, -91, -90, -90,
+       -90, -89, -89, -89, -88, -88, -88, -88, -87, -87,
+       -87, -86, -86, -86, -85, -85, -85, -84, -84, -84,
+       -83, -83, -83, -82, -82, -82, -82, -81, -81, -81,
+       -80, -80, -80, -79, -79, -79, -78, -78, -78, -77,
+       -77, -77, -76, -76, -76, -75, -75, -75, -75, -74,
+       -74, -74, -73, -73, -73, -72, -72, -72, -71, -71,
+       -71, -70, -70, -70, -69, -69, -69, -68, -68, -68,
+       -68, -67, -67, -67, -66, -66, -66, -65, -65, -65,
+       -64, -64, -64, -63, -63, -63, -62, -62, -62, -62,
+       -61, -61, -61, -60, -60, -60, -59, -59, -59, -58,
+       -58, -58, -57, -57, -57, -56, -56, -56, -55, -55,
+       -55, -55, -54, -54, -54, -53, -53, -53, -52, -52,
+       -52, -51, -51, -51, -50, -50, -50, -49, -49, -49,
+       -48, -48, -48, -48, -47, -47, -47, -46, -46, -46,
+       -45, -45, -45, -44, -44, -44, -43, -43, -43, -42,
+       -42, -42, -41, -41, -41, -41, -40, -40, -40, -39,
+       -39, -39, -38, -38, -38, -37, -37, -37, -36, -36,
+       -36, -35, -35, -35, -34, -34, -34, -34, -33, -33,
+       -33, -32, -32, -32, -31, -31, -31, -30, -30, -30,
+       -29, -29, -29, -28, -28, -28, -27, -27, -27, -27,
+       -26, -26, -26, -25, -25, -25, -24, -24, -24, -23,
+       -23, -23, -22, -22, -22, -21, -21, -21, -20, -20,
+       -20, -20, -19, -19, -19, -18, -18, -18, -17, -17,
+       -17, -16, -16, -16, -15, -15, -15, -14, -14, -14,
+       -13, -13, -13, -13, -12, -12, -12, -11, -11, -11,
+       -10, -10, -10, -9, -9, -9, -8, -8, -8, -7,
+       -7, -7, -6, -6, -6, -6, -5, -5, -5, -4,
+       -4, -4, -3, -3, -3, -2, -2, -2, -1, -1,
+       -1, 0, 0, 0, 0, 0, 0, 0, 1, 1,
+       1, 2, 2, 2, 3, 3, 3, 4, 4, 4,
+       5, 5, 5, 6, 6, 6, 7, 7, 7, 7,
+       8, 8, 8, 9, 9, 9, 10, 10, 10, 11,
+       11, 11, 12, 12, 12, 13, 13, 13, 14, 14,
+       14, 14, 15, 15, 15, 16, 16, 16, 17, 17,
+       17, 18, 18, 18, 19, 19, 19, 20, 20, 20,
+       21, 21, 21, 21, 22, 22, 22, 23, 23, 23,
+       24, 24, 24, 25, 25, 25, 26, 26, 26, 27,
+       27, 27, 28, 28, 28, 28, 29, 29, 29, 30,
+       30, 30, 31, 31, 31, 32, 32, 32, 33, 33,
+       33, 34, 34, 34, 35, 35, 35, 35, 36, 36,
+       36, 37, 37, 37, 38, 38, 38, 39, 39, 39,
+       40, 40, 40, 41, 41, 41, 42, 42, 42, 42,
+       43, 43, 43, 44, 44, 44, 45, 45, 45, 46,
+       46, 46, 47, 47, 47, 48, 48, 48, 49, 49,
+       49, 49, 50, 50, 50, 51, 51, 51, 52, 52,
+       52, 53, 53, 53, 54, 54, 54, 55, 55, 55,
+       56, 56, 56, 56, 57, 57, 57, 58, 58, 58,
+       59, 59, 59, 60, 60, 60, 61, 61, 61, 62,
+       62, 62, 63, 63, 63, 63, 64, 64, 64, 65,
+       65, 65, 66, 66, 66, 67, 67, 67, 68, 68,
+       68, 69, 69, 69, 69, 70, 70, 70, 71, 71,
+       71, 72, 72, 72, 73, 73, 73, 74, 74, 74,
+       75, 75, 75, 76, 76, 76, 76, 77, 77, 77,
+       78, 78, 78, 79, 79, 79, 80, 80, 80, 81,
+       81, 81, 82, 82, 82, 83, 83, 83, 83, 84,
+       84, 84, 85, 85, 85, 86, 86, 86, 87, 87,
+       87, 88, 88, 88, 89, 89, 89, 89, 90, 90,
+       90, 91, 91, 91, 92, 92, 92, 93, 93, 93,
+       94, 94, 94, 95, 95, 95, 95, 96, 96, 96,
+       97, 97, 97, 98, 98, 98, 99, 99, 99, 100,
+       100, 100, 101, 101, 101, 102, 102, 102, 102, 103,
+       103, 103, 104, 104, 104, 105, 105, 105, 106, 106,
+       106, 107, 107, 107, 108, 108, 108, 108, 109, 109,
+       109, 110, 110, 110, 111, 111, 111, 112, 112, 112,
+       113, 113, 113, 114, 114, 114, 114, 115, 115, 115,
+       116, 116, 116, 117, 117, 117, 118, 118, 118, 119,
+       119, 119, 120, 120, 120, 120, 121, 121, 121, 122,
+       122, 122, 123, 123, 123, 124, 124, 124, 125, 125,
+       125, 126, 126, 126, 126, 127, 127, 127, 128, 128,
+       128, 129, 129, 129, 130, 130, 130, 131, 131, 131,
+       132, 132, 132, 132, 133, 133, 133, 134, 134, 134,
+       135, 135, 135, 136, 136, 136, 137, 137, 137, 137,
+       138, 138, 138, 139, 139, 139, 140, 140, 140, 141,
+       141, 141, 142, 142, 142, 143, 143, 143, 143, 144,
+       144, 144, 145, 145, 145, 146, 146, 146, 147, 147,
+       147, 148, 148, 148, 149, 149, 149, 149, 150, 150,
+       150, 151, 151, 151, 152, 152, 152, 153, 153, 153,
+       154, 154, 154, 154, 155, 155, 155, 156, 156, 156,
+       157, 157, 157, 158, 158, 158, 159, 159, 159, 159,
+       160, 160, 160, 161, 161, 161, 162, 162, 162, 163,
+       163, 163, 164, 164, 164, 165, 165, 165, 165, 166,
+       166, 166, 167, 167, 167, 168, 168, 168, 169, 169,
+       169, 170, 170, 170, 170, 171, 171, 171, 172, 172,
+       172, 173, 173, 173, 174, 174, 174, 175, 175, 175,
+       175, 176, 176, 176, 177, 177, 177, 178, 178, 178,
+       179, 179, 179, 180, 180, 180, 180, 181, 181, 181,
+       182, 182, 182, 183, 183, 183, 184, 184, 184, 185,
+       185, 185, 185, 186, 186, 186, 187, 187, 187, 188,
+       188, 188, 189, 189, 189, 190, 190, 190, 190, 191,
+       191, 191, 192, 192, 192, 193, 193, 193, 194, 194,
+       194, 194, 195, 195, 195, 196, 196, 196, 197, 197,
+       197, 198, 198, 198, 199, 199, 199, 199, 200, 200,
+       200, 201, 201, 201, 202, 202, 202, 203, 203, 203,
+       204, 204, 204, 204, 205, 205, 205, 206, 206, 206,
+       207, 207, 207, 208, 208, 208, 208, 209, 209, 209,
+       210, 210, 210, 211, 211, 211, 212, 212, 212, 213,
+       213, 213, 213, 214, 214, 214, 215, 215, 215, 216,
+       216, 216, 217, 217, 217, 217, 218, 218, 218, 219,
+       219, 219, 220, 220, 220, 221, 221, 221, 221, 222,
+       222, 222, 223, 223, 223, 224, 224, 224, 225, 225,
+       225, 226, 226, 226, 226, 227, 227, 227, 228, 228,
+       228, 229, 229, 229, 230, 230, 230, 230, 231, 231,
+       231, 232, 232, 232, 233, 233, 233, 234, 234, 234,
+       234, 235, 235, 235, 236, 236, 236, 237, 237, 237,
+       238, 238, 238, 238, 239, 239, 239, 240, 240, 240,
+       241, 241, 241, 242, 242, 242, 242, 243, 243, 243,
+       244, 244, 244, 245, 245, 245, 246, 246, 246, 246,
+       247, 247, 247, 248, 248, 248, 249, 249, 249, 250,
+       250, 250, 250, 251, 251, 251, 252, 252, 252, 253,
+       253, 253, 254, 254, 254, 254, 255, 255, 255, 256,
+       256, 256, 257, 257, 257, 257, 258, 258, 258, 259,
+       259, 259, 260, 260, 260, 261, 261, 261, 261, 262,
+       262, 262, 263, 263, 263, 264, 264, 264, 265, 265,
+       265, 265, 266, 266, 266, 267, 267, 267, 268, 268,
+       268, 268, 269, 269, 269, 270, 270, 270, 271, 271,
+       271, 272, 272, 272, 272, 273, 273, 273, 274, 274,
+       274, 275, 275, 275, 275, 276, 276, 276, 277, 277,
+       277, 278, 278, 278, 279, 279, 279, 279, 280, 280,
+       280, 281, 281, 281, 282, 282, 282, 282, 283, 283,
+       283, 284, 284, 284, 285, 285, 285, 286, 286, 286,
+       286, 287, 287, 287, 288, 288, 288, 289, 289, 289,
+       289, 290, 290, 290, 291, 291, 291, 292, 292, 292,
+       292, 293, 293, 293, 294, 294, 294, 295, 295, 295,
+       296, 296, 296, 296, 297, 297, 297, 298, 298, 298,
+       299, 299, 299, 299, 300, 300, 300, 301, 301, 301,
+       302, 302, 302, 302, 303, 303, 303, 304, 304, 304,
+       305, 305, 305, 305, 306, 306, 306, 307, 307, 307,
+       308, 308, 308, 308, 309, 309, 309, 310, 310, 310,
+       311, 311, 311, 311, 312, 312, 312, 313, 313, 313,
+       314, 314, 314, 314, 315, 315, 315, 316, 316, 316,
+       317, 317, 317, 317, 318, 318, 318, 319, 319, 319,
+       320, 320, 320, 320, 321, 321, 321, 322, 322, 322,
+       323, 323, 323, 323, 324, 324, 324, 325, 325, 325,
+       326, 326, 326, 326, 327, 327, 327, 328, 328, 328,
+       329, 329, 329, 329, 330, 330, 330, 331, 331, 331,
+       332, 332, 332, 332, 333, 333, 333, 334, 334, 334,
+       335, 335, 335, 335, 336, 336, 336, 337, 337, 337,
+       338, 338, 338, 338, 339, 339, 339, 340, 340, 340,
+       340, 341, 341, 341, 342, 342, 342, 343, 343, 343,
+       343, 344, 344, 344, 345, 345, 345, 346, 346, 346,
+       346, 347, 347, 347, 348, 348, 348, 348, 349, 349,
+       349, 350, 350, 350, 351, 351, 351, 351, 352, 352,
+       352, 353, 353, 353, 354, 354, 354, 354, 355, 355,
+       355, 356, 356, 356, 356, 357, 357, 357, 358, 358,
+       358, 359, 359, 359, 359, 360, 360, 360, 361, 361,
+       361, 361, 362, 362, 362, 363, 363, 363, 364, 364,
+       364, 364, 365, 365, 365, 366, 366, 366, 366, 367,
+       367, 367, 368, 368, 368, 369, 369, 369, 369, 370,
+       370, 370, 371, 371, 371, 371, 372, 372, 372, 373,
+       373, 373, 374, 374, 374, 374, 375, 375, 375, 376,
+       376, 376, 376, 377, 377, 377, 378, 378, 378, 378,
+       379, 379, 379, 380, 380, 380, 381, 381, 381, 381,
+       382, 382, 382, 383, 383, 383, 383, 384, 384, 384,
+       385, 385, 385, 385, 386, 386, 386, 387, 387, 387,
+       388, 388, 388, 388, 389, 389, 389, 390, 390, 390,
+       390, 391, 391, 391, 392, 392, 392, 392, 393, 393,
+       393, 394, 394, 394, 395, 395, 395, 395, 396, 396,
+       396, 397, 397, 397, 397, 398, 398, 398, 399, 399,
+       399, 399, 400, 400, 400, 401, 401, 401, 401, 402,
+       402, 402, 403, 403, 403, 403, 404, 404, 404, 405,
+       405, 405, 406, 406, 406, 406, 407, 407, 407, 408,
+       408, 408, 408, 409, 409, 409, 410, 410, 410, 410,
+       411, 411, 411, 412, 412, 412, 412, 413, 413, 413,
+       414, 414, 414, 414, 415, 415, 415, 416, 416, 416,
+       416, 417, 417, 417, 418, 418, 418, 418, 419, 419,
+       419, 420, 420, 420, 420, 421, 421, 421, 422, 422,
+       422, 422, 423, 423, 423, 424, 424, 424, 424, 425,
+       425, 425, 426, 426, 426, 426, 427, 427, 427, 428,
+       428, 428, 428, 429, 429, 429, 430, 430, 430, 430,
+       431, 431, 431, 432, 432, 432, 432, 433, 433, 433,
+       434, 434, 434, 434, 435, 435, 435, 436, 436, 436,
+       436, 437, 437, 437, 438, 438, 438, 438, 439, 439,
+       439, 440, 440, 440, 440, 441, 441, 441, 442, 442,
+       442, 442, 443, 443, 443, 444, 444, 444, 444, 445,
+       445, 445, 445, 446, 446, 446, 447, 447, 447, 447,
+       448, 448, 448, 449, 449, 449, 449, 450, 450, 450,
+       451, 451, 451, 451, 452, 452, 452, 453, 453, 453,
+       453, 454, 454, 454, 455, 455, 455, 455, 456, 456,
+       456, 456, 457, 457, 457, 458, 458, 458, 458, 459,
+       459, 459, 460, 460, 460, 460, 461, 461, 461, 462,
+       462, 462, 462, 463, 463, 463, 463, 464, 464, 464,
+       465, 465, 465, 465, 466, 466, 466, 467, 467, 467,
+       467, 468, 468, 468, 469, 469, 469, 469, 470, 470,
+       470, 470, 471, 471, 471, 472, 472, 472, 472, 473,
+       473, 473, 474, 474, 474, 474, 475, 475, 475, 475,
+       476, 476, 476, 477, 477, 477, 477, 478, 478, 478,
+       479, 479, 479, 479, 480, 480, 480, 480, 481, 481,
+       481, 482, 482, 482, 482, 483, 483, 483, 484, 484,
+       484, 484, 485, 485, 485, 485, 486, 486, 486, 487,
+       487, 487, 487, 488, 488, 488, 488, 489, 489, 489,
+       490, 490, 490, 490, 491, 491, 491, 492, 492, 492,
+       492, 493, 493, 493, 493, 494, 494, 494, 495, 495,
+       495, 495, 496, 496, 496, 496, 497, 497, 497, 498,
+       498, 498, 498, 499, 499, 499, 499, 500, 500, 500,
+       501, 501, 501, 501, 502, 502, 502, 502, 503, 503,
+       503, 504, 504, 504, 504, 505, 505, 505, 505, 506,
+       506, 506, 507, 507, 507, 507, 508, 508, 508, 508,
+       509, 509, 509, 510, 510, 510, 510, 511, 511, 511,
+       511, 512, 512, 512, 513, 513, 513, 513, 514, 514,
+       514, 514, 515, 515, 515, 516, 516, 516, 516, 517,
+       517, 517, 517, 518, 518, 518, 519, 519, 519, 519,
+       520, 520, 520, 520, 521, 521, 521, 522, 522, 522,
+       522, 523, 523, 523, 523, 524, 524, 524, 524, 525,
+       525, 525, 526, 526, 526, 526, 527, 527, 527, 527,
+       528, 528, 528, 529, 529, 529, 529, 530, 530, 530,
+       530, 531, 531, 531, 531, 532, 532, 532, 533, 533,
+       533, 533, 534, 534, 534, 534, 535, 535, 535, 535,
+       536, 536, 536, 537, 537, 537, 537, 538, 538, 538,
+       538, 539, 539, 539, 539, 540, 540, 540, 541, 541,
+       541, 541, 542, 542, 542, 542, 543, 543, 543, 543,
+       544, 544, 544, 545, 545, 545, 545, 546, 546, 546,
+       546, 547, 547, 547, 547, 548, 548, 548, 549, 549,
+       549, 549, 550, 550, 550, 550, 551, 551, 551, 551,
+       552, 552, 552, 553, 553, 553, 553, 554, 554, 554,
+       554, 555, 555, 555, 555, 556, 556, 556, 556, 557,
+       557, 557, 558, 558, 558, 558, 559, 559, 559, 559,
+       560, 560, 560, 560, 561, 561, 561, 561, 562, 562,
+       562, 563, 563, 563, 563, 564, 564, 564, 564, 565,
+       565, 565, 565, 566, 566, 566, 566, 567, 567, 567,
+       568, 568, 568, 568, 569, 569, 569, 569, 570, 570,
+       570, 570, 571, 571, 571, 571, 572, 572, 572, 572,
+       573, 573, 573, 574, 574, 574, 574, 575, 575, 575,
+       575, 576, 576, 576, 576, 577, 577, 577, 577, 578,
+       578, 578, 578, 579, 579, 579, 580, 580, 580, 580,
+       581, 581, 581, 581, 582, 582, 582, 582, 583, 583,
+       583, 583, 584, 584, 584, 584, 585, 585, 585, 585,
+       586, 586, 586, 586, 587, 587, 587, 588, 588, 588,
+       588, 589, 589, 589, 589, 590, 590, 590, 590, 591,
+       591, 591, 591, 592, 592, 592, 592, 593, 593, 593,
+       593, 594, 594, 594, 594, 595, 595, 595, 595, 596,
+       596, 596, 597, 597, 597, 597, 598, 598, 598, 598,
+       599, 599, 599, 599, 600, 600, 600, 600, 601, 601,
+       601, 601, 602, 602, 602, 602, 603, 603, 603, 603,
+       604, 604, 604, 604, 605, 605, 605, 605, 606, 606,
+       606, 606, 607, 607, 607, 607, 608, 608, 608, 609,
+       609, 609, 609, 610, 610, 610, 610, 611, 611, 611,
+       611, 612, 612, 612, 612, 613, 613, 613, 613, 614,
+       614, 614, 614, 615, 615, 615, 615, 616, 616, 616,
+       616, 617, 617, 617, 617, 618, 618, 618, 618, 619,
+       619, 619, 619, 620, 620, 620, 620, 621, 621, 621,
+       621, 622, 622, 622, 622, 623, 623, 623, 623, 624,
+       624, 624, 624, 625, 625, 625, 625, 626, 626, 626,
+       626, 627, 627, 627, 627, 628, 628, 628, 628, 629,
+       629, 629, 629, 630, 630, 630, 630, 631, 631, 631,
+       631, 632, 632, 632, 632, 633, 633, 633, 633, 634,
+       634, 634, 634, 635, 635, 635, 635, 636, 636, 636,
+       636, 637, 637, 637, 637, 638, 638, 638, 638, 639,
+       639, 639, 639, 640, 640, 640, 640, 641, 641, 641,
+       641, 642, 642, 642, 642, 643, 643, 643, 643, 644,
+       644, 644, 644, 645, 645, 645, 645, 646, 646, 646,
+       646, 647, 647, 647, 647, 648, 648, 648, 648, 648,
+       649, 649, 649, 649, 650, 650, 650, 650, 651, 651,
+       651, 651, 652, 652, 652, 652, 653, 653, 653, 653,
+       654, 654, 654, 654, 655, 655, 655, 655, 656, 656,
+       656, 656, 657, 657, 657, 657, 658, 658, 658, 658,
+       659, 659, 659, 659, 660, 660, 660, 660, 660, 661,
+       661, 661, 661, 662, 662, 662, 662, 663, 663, 663,
+       663, 664, 664, 664, 664, 665, 665, 665, 665, 666,
+       666, 666, 666, 667, 667, 667, 667, 668, 668, 668,
+       668, 668, 669, 669, 669, 669, 670, 670, 670, 670,
+       671, 671, 671, 671, 672, 672, 672, 672, 673, 673,
+       673, 673, 674, 674, 674, 674, 675, 675, 675, 675,
+       675, 676, 676, 676, 676, 677, 677, 677, 677, 678,
+       678, 678, 678, 679, 679, 679, 679, 680, 680, 680,
+       680, 681, 681, 681, 681, 681, 682, 682, 682, 682,
+       683, 683, 683, 683, 684, 684, 684, 684, 685, 685,
+       685, 685, 686, 686, 686, 686, 686, 687, 687, 687,
+       687, 688, 688, 688, 688, 689, 689, 689, 689, 690,
+       690, 690, 690, 691, 691, 691, 691, 691, 692, 692,
+       692, 692, 693, 693, 693, 693, 694, 694, 694, 694,
+       695, 695, 695, 695, 695, 696, 696, 696, 696, 697,
+       697, 697, 697, 698, 698, 698, 698, 699, 699, 699,
+       699, 699, 700, 700, 700, 700, 701, 701, 701, 701,
+       702, 702, 702, 702, 703, 703, 703, 703, 703, 704,
+       704, 704, 704, 705, 705, 705, 705, 706, 706, 706,
+       706, 707, 707, 707, 707, 707, 708, 708, 708, 708,
+       709, 709, 709, 709, 710, 710, 710, 710, 710, 711,
+       711, 711, 711, 712, 712, 712, 712, 713, 713, 713,
+       713, 714, 714, 714, 714, 714, 715, 715, 715, 715,
+       716, 716, 716, 716, 717, 717, 717, 717, 717, 718,
+       718, 718, 718, 719, 719, 719, 719, 720, 720, 720,
+       720, 720, 721, 721, 721, 721, 722, 722, 722, 722,
+       723, 723, 723, 723, 723, 724, 724, 724, 724, 725,
+       725, 725, 725, 726, 726, 726, 726, 726, 727, 727,
+       727, 727, 728, 728, 728, 728, 728, 729, 729, 729,
+       729, 730, 730, 730, 730, 731, 731, 731, 731, 731,
+       732, 732, 732, 732, 733, 733, 733, 733, 734, 734,
+       734, 734, 734, 735, 735, 735, 735, 736, 736, 736,
+       736, 736, 737, 737, 737, 737, 738, 738, 738, 738,
+       739, 739, 739, 739, 739, 740, 740, 740, 740, 741,
+       741, 741, 741, 741, 742, 742, 742, 742, 743, 743,
+       743, 743, 743, 744, 744, 744, 744, 745, 745, 745,
+       745, 746, 746, 746, 746, 746, 747, 747, 747, 747,
+       748, 748, 748, 748, 748, 749, 749, 749, 749, 750,
+       750, 750, 750, 750, 751, 751, 751, 751, 752, 752,
+       752, 752, 752, 753, 753, 753, 753, 754, 754, 754,
+       754, 754, 755, 755, 755, 755, 756, 756, 756, 756,
+       756, 757, 757, 757, 757, 758, 758, 758, 758, 758,
+       759, 759, 759, 759, 760, 760, 760, 760, 760, 761,
+       761, 761, 761, 762, 762, 762, 762, 762, 763, 763,
+       763, 763, 764, 764, 764, 764, 764, 765, 765, 765,
+       765, 766, 766, 766, 766, 766, 767, 767, 767, 767,
+       768, 768, 768, 768, 768, 769, 769, 769, 769, 770,
+       770, 770, 770, 770, 771, 771, 771, 771, 772, 772,
+       772, 772, 772, 773, 773, 773, 773, 773, 774, 774,
+       774, 774, 775, 775, 775, 775, 775, 776, 776, 776,
+       776, 777, 777, 777, 777, 777, 778, 778, 778, 778,
+       779, 779, 779, 779, 779, 780, 780, 780, 780, 780,
+       781, 781, 781, 781, 782, 782, 782, 782, 782, 783,
+       783, 783, 783, 783, 784, 784, 784, 784, 785, 785,
+       785, 785, 785, 786, 786, 786, 786, 787, 787, 787,
+       787, 787, 788, 788, 788, 788, 788, 789, 789, 789,
+       789, 790, 790, 790, 790, 790, 791, 791, 791, 791,
+       791, 792, 792, 792, 792, 793, 793, 793, 793, 793,
+       794, 794, 794, 794, 794, 795, 795, 795, 795, 796,
+       796, 796, 796, 796, 797, 797, 797, 797, 797, 798,
+       798, 798, 798, 799, 799, 799, 799, 799, 800, 800,
+       800, 800, 800, 801, 801, 801, 801, 802, 802, 802,
+       802, 802, 803, 803, 803, 803, 803, 804, 804, 804,
+       804, 804, 805, 805, 805, 805, 806, 806, 806, 806,
+       806, 807, 807, 807, 807, 807, 808, 808, 808, 808,
+       808, 809, 809, 809, 809, 810, 810, 810, 810, 810,
+       811, 811, 811, 811, 811, 812, 812, 812, 812, 812,
+       813, 813, 813, 813, 814, 814, 814, 814, 814, 815,
+       815, 815, 815, 815, 816, 816, 816, 816, 816, 817,
+       817, 817, 817, 818, 818, 818, 818, 818, 819, 819,
+       819, 819, 819, 820, 820, 820, 820, 820, 821, 821,
+       821, 821, 821, 822, 822, 822, 822, 823, 823, 823,
+       823, 823, 824, 824, 824, 824, 824, 825, 825, 825,
+       825, 825, 826, 826, 826, 826, 826, 827, 827, 827,
+       827, 827, 828, 828, 828, 828, 829, 829, 829, 829,
+       829, 830, 830, 830, 830, 830, 831, 831, 831, 831,
+       831, 832, 832, 832, 832, 832, 833, 833, 833, 833,
+       833, 834, 834, 834, 834, 834, 835, 835, 835, 835,
+       835, 836, 836, 836, 836, 837, 837, 837, 837, 837,
+       838, 838, 838, 838, 838, 839, 839, 839, 839, 839,
+       840, 840, 840, 840, 840, 841, 841, 841, 841, 841,
+       842, 842, 842, 842, 842, 843, 843, 843, 843, 843,
+       844, 844, 844, 844, 844, 845, 845, 845, 845, 845,
+       846, 846, 846, 846, 846, 847, 847, 847, 847, 847,
+       848, 848, 848, 848, 848, 849, 849, 849, 849, 850,
+       850, 850, 850, 850, 851, 851, 851, 851, 851, 852,
+       852, 852, 852, 852, 853, 853, 853, 853, 853, 854,
+       854, 854, 854, 854, 855, 855, 855, 855, 855, 856,
+       856, 856, 856, 856, 857, 857, 857, 857, 857, 858,
+       858, 858, 858, 858, 859, 859, 859, 859, 859, 860,
+       860, 860, 860, 860, 860, 861, 861, 861, 861, 861,
+       862, 862, 862, 862, 862, 863, 863, 863, 863, 863,
+       864, 864, 864, 864, 864, 865, 865, 865, 865, 865,
+       866, 866, 866, 866, 866, 867, 867, 867, 867, 867,
+       868, 868, 868, 868, 868, 869, 869, 869, 869, 869,
+       870, 870, 870, 870, 870, 871, 871, 871, 871, 871,
+       872, 872, 872, 872, 872, 873, 873, 873, 873, 873,
+       874, 874, 874, 874, 874, 874, 875, 875, 875, 875,
+       875, 876, 876, 876, 876, 876, 877, 877, 877, 877,
+       877, 878, 878, 878, 878, 878, 879, 879, 879, 879,
+       879, 880, 880, 880, 880, 880, 881, 881, 881, 881,
+       881, 881, 882, 882, 882, 882, 882, 883, 883, 883,
+       883, 883, 884, 884, 884, 884, 884, 885, 885, 885,
+       885, 885, 886, 886, 886, 886, 886, 887, 887, 887,
+       887, 887, 887, 888, 888, 888, 888, 888, 889, 889,
+       889, 889, 889, 890, 890, 890, 890, 890, 891, 891,
+       891, 891, 891, 891, 892, 892, 892, 892, 892, 893,
+       893, 893, 893, 893, 894, 894, 894, 894, 894, 895,
+       895, 895, 895, 895, 896, 896, 896, 896, 896, 896,
+       897, 897, 897, 897, 897, 898, 898, 898, 898, 898,
+       899, 899, 899, 899, 899, 899, 900, 900, 900, 900,
+       900, 901, 901, 901, 901, 901, 902, 902, 902, 902,
+       902, 903, 903, 903, 903, 903, 903, 904, 904, 904,
+       904, 904, 905, 905, 905, 905, 905, 906, 906, 906,
+       906, 906, 906, 907, 907, 907, 907, 907, 908, 908,
+       908, 908, 908, 909, 909, 909, 909, 909, 909, 910,
+       910, 910, 910, 910, 911, 911, 911, 911, 911, 912,
+       912, 912, 912, 912, 912, 913, 913, 913, 913, 913,
+       914, 914, 914, 914, 914, 915, 915, 915, 915, 915,
+       915, 916, 916, 916, 916, 916, 917, 917, 917, 917,
+       917, 917, 918, 918, 918, 918, 918, 919, 919, 919,
+       919, 919, 920, 920, 920, 920, 920, 920, 921, 921,
+       921, 921, 921, 922, 922, 922, 922, 922, 922, 923,
+       923, 923, 923, 923, 924, 924, 924, 924, 924, 924,
+       925, 925, 925, 925, 925, 926, 926, 926, 926, 926,
+       926, 927, 927, 927, 927, 927, 928, 928, 928, 928,
+       928, 928, 929, 929, 929, 929, 929, 930, 930, 930,
+       930, 930, 930, 931, 931, 931, 931, 931, 932, 932,
+       932, 932, 932, 932, 933, 933, 933, 933, 933, 934,
+       934, 934, 934, 934, 934, 935, 935, 935, 935, 935,
+       936, 936, 936, 936, 936, 936, 937, 937, 937, 937,
+       937, 938, 938, 938, 938, 938, 938, 939, 939, 939,
+       939, 939, 940, 940, 940, 940, 940, 940, 941, 941,
+       941, 941, 941, 942, 942, 942, 942, 942, 942, 943,
+       943, 943, 943, 943, 943, 944, 944, 944, 944, 944,
+       945, 945, 945, 945, 945, 945, 946, 946, 946, 946,
+       946, 947, 947, 947, 947, 947, 947, 948, 948, 948,
+       948, 948, 948, 949, 949, 949, 949, 949, 950, 950,
+       950, 950, 950, 950, 951, 951, 951, 951, 951, 951,
+       952, 952, 952, 952, 952, 953, 953, 953, 953, 953,
+       953, 954, 954, 954, 954, 954, 954, 955, 955, 955,
+       955, 955, 956, 956, 956, 956, 956, 956, 957, 957,
+       957, 957, 957, 957, 958, 958, 958, 958, 958, 959,
+       959, 959, 959, 959, 959, 960, 960, 960, 960, 960,
+       960, 961, 961, 961, 961, 961, 961, 962, 962, 962,
+       962, 962, 963, 963, 963, 963, 963, 963, 964, 964,
+       964, 964, 964, 964, 965, 965, 965, 965, 965, 965,
+       966, 966, 966, 966, 966, 967, 967, 967, 967, 967,
+       967, 968, 968, 968, 968, 968, 968, 969, 969, 969,
+       969, 969, 969, 970, 970, 970, 970, 970, 971, 971,
+       971, 971, 971, 971, 972, 972, 972, 972, 972, 972,
+       973, 973, 973, 973, 973, 973, 974, 974, 974, 974,
+       974, 974, 975, 975, 975, 975, 975, 975, 976, 976,
+       976, 976, 976, 977, 977, 977, 977, 977, 977, 978,
+       978, 978, 978, 978, 978, 979, 979, 979, 979, 979,
+       979, 980, 980, 980, 980, 980, 980, 981, 981, 981,
+       981, 981, 981, 982, 982, 982, 982, 982, 982, 983,
+       983, 983, 983, 983, 983, 984, 984, 984, 984, 984,
+       984, 985, 985, 985, 985, 985, 986, 986, 986, 986,
+       986, 986, 987, 987, 987, 987, 987, 987, 988, 988,
+       988, 988, 988, 988, 989, 989, 989, 989, 989, 989,
+       990, 990, 990, 990, 990, 990, 991, 991, 991, 991,
+       991, 991, 992, 992, 992, 992, 992, 992, 993, 993,
+       993, 993, 993, 993, 994, 994, 994, 994, 994, 994,
+       995, 995, 995, 995, 995, 995, 996, 996, 996, 996,
+       996, 996, 997, 997, 997, 997, 997, 997, 998, 998,
+       998, 998, 998, 998, 999, 999, 999, 999, 999, 999,
+       1000, 1000, 1000, 1000, 1000, 1000, 1001, 1001, 1001, 1001,
+       1001, 1001, 1001, 1002, 1002, 1002, 1002, 1002, 1002, 1003,
+       1003, 1003, 1003, 1003, 1003, 1004, 1004, 1004, 1004, 1004,
+       1004, 1005, 1005, 1005, 1005, 1005, 1005, 1006, 1006, 1006,
+       1006, 1006, 1006, 1007, 1007, 1007, 1007, 1007, 1007, 1008,
+       1008, 1008, 1008, 1008, 1008, 1009, 1009, 1009, 1009, 1009,
+       1009, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1011, 1011,
+       1011, 1011, 1011, 1011, 1012, 1012, 1012, 1012, 1012, 1012,
+       1013, 1013, 1013, 1013, 1013, 1013, 1014, 1014, 1014, 1014,
+       1014, 1014, 1015, 1015, 1015, 1015, 1015, 1015, 1016, 1016,
+       1016, 1016, 1016, 1016, 1016, 1017, 1017, 1017, 1017, 1017,
+       1017, 1018, 1018, 1018, 1018, 1018, 1018, 1019, 1019, 1019,
+       1019, 1019, 1019, 1020, 1020, 1020, 1020, 1020, 1020, 1020,
+       1021, 1021, 1021, 1021, 1021, 1021, 1022, 1022, 1022, 1022,
+       1022, 1022, 1023, 1023, 1023, 1023, 1023, 1023, 1024, 1024,
+       1024, 1024,
+}; // END of _fastangle_atan_table_13[8192]
+
+#define ETL_FASTANGLE_LOOKUP_RES       (13)
+#define _fastangle_sin_table           _fastangle_sin_table_13
+#define _fastangle_asin_table          _fastangle_asin_table_13
+#define _fastangle_tan_table           _fastangle_tan_table_13
+#define _fastangle_atan_table          _fastangle_atan_table_13
+
+#endif // END of __ETL_FASTANGLE_TABLES__
+
diff --git a/ETL/tags/0.4.11/ETL/_fixed.h b/ETL/tags/0.4.11/ETL/_fixed.h
new file mode 100644 (file)
index 0000000..541f40c
--- /dev/null
@@ -0,0 +1,643 @@
+/*! ========================================================================
+** Extended Template and Library
+** Fixed-Point Math Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2007 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__FIXED_H
+#define __ETL__FIXED_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <cmath>
+
+/* === M A C R O S ========================================================= */
+
+// the "+0.5" code was commented out - maybe to make thing run faster?
+// it can be re-enabled by uncommenting this next line:
+// #define ROUND_TO_NEAREST_INTEGER
+
+#ifndef ETL_FIXED_TYPE
+# define ETL_FIXED_TYPE        int
+#endif
+
+#ifndef ETL_FIXED_BITS
+#define ETL_FIXED_BITS 12
+#endif
+
+#ifndef ETL_FIXED_EPSILON
+#define ETL_FIXED_EPSILON              _EPSILON()
+#endif
+
+#ifdef __GNUC___
+#define ETL_ATTRIB_CONST       __attribute__ ((const))
+#define ETL_ATTRIB_PURE                __attribute__ ((pure))
+#define ETL_ATTRIB_INLINE      __attribute__ ((always_inline))
+#else
+#define ETL_ATTRIB_CONST
+#define ETL_ATTRIB_PURE
+#define ETL_ATTRIB_INLINE
+#endif
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+// Forward declarations
+template<typename T, unsigned int FIXED_BITS> class fixed_base;
+//template<> class fixed_base<char>;
+
+_ETL_END_NAMESPACE
+
+_STD_BEGIN_NAMESPACE
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> abs(const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> cos(const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> cosh(const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> exp(const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> log(const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> log10(const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> pow(const _ETL::fixed_base<T,FIXED_BITS>&, int);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> pow(const _ETL::fixed_base<T,FIXED_BITS>&, const T&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> pow(const _ETL::fixed_base<T,FIXED_BITS>&,
+                                       const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> pow(const _ETL::fixed_base<T,FIXED_BITS>&, const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> sin(const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> sinh(const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> sqrt(const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> tan(const _ETL::fixed_base<T,FIXED_BITS>&);
+template<typename T, unsigned int FIXED_BITS> _ETL::fixed_base<T,FIXED_BITS> tanh(const _ETL::fixed_base<T,FIXED_BITS>&);
+_STD_END_NAMESPACE
+_ETL_BEGIN_NAMESPACE
+
+/*! ========================================================================
+** \class      fixed_base
+** \brief      Fixed-point template base class
+**
+** A more detailed description needs to be written.
+*/
+template <class T,unsigned int FIXED_BITS>
+class fixed_base
+{
+public:
+       typedef T value_type;
+private:
+       T _data;
+
+       typedef fixed_base<T,FIXED_BITS> _fixed;
+       typedef fixed_base<T,FIXED_BITS> self_type;
+
+       inline static bool _TYPE_SMALLER_THAN_INT() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE;
+       inline static bool _USING_ALL_BITS() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE;
+       inline static value_type _ONE() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE;
+       inline static value_type _F_MASK() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE;
+       inline static float _EPSILON() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE;
+
+       class raw { };
+public:
+       fixed_base()ETL_ATTRIB_INLINE;
+       fixed_base(const float &f)ETL_ATTRIB_INLINE;
+       fixed_base(const double &f)ETL_ATTRIB_INLINE;
+       fixed_base(const long double &f)ETL_ATTRIB_INLINE;
+       fixed_base(const int &i)ETL_ATTRIB_INLINE;
+       fixed_base(const int &n,const int &d)ETL_ATTRIB_INLINE; //!< Fraction constructor
+       fixed_base(const _fixed &x)ETL_ATTRIB_INLINE;
+       fixed_base(value_type x,raw)ETL_ATTRIB_INLINE;
+
+       T &data() ETL_ATTRIB_PURE ETL_ATTRIB_INLINE;
+       const T &data()const ETL_ATTRIB_PURE ETL_ATTRIB_INLINE;
+
+       const _fixed& operator+=(const _fixed &rhs) ETL_ATTRIB_INLINE;
+       const _fixed& operator-=(const _fixed &rhs) ETL_ATTRIB_INLINE;
+       template<typename U> const _fixed& operator*=(const U &rhs) ETL_ATTRIB_INLINE;
+       template<typename U> const _fixed& operator/=(const U &rhs) ETL_ATTRIB_INLINE;
+       const _fixed& operator*=(const _fixed &rhs) ETL_ATTRIB_INLINE;
+       const _fixed& operator/=(const _fixed &rhs) ETL_ATTRIB_INLINE;
+       const _fixed& operator*=(const int &rhs) ETL_ATTRIB_INLINE;
+       const _fixed& operator/=(const int &rhs) ETL_ATTRIB_INLINE;
+
+
+       template<typename U> _fixed operator+(const U &rhs)const ETL_ATTRIB_INLINE;
+       template<typename U> _fixed operator-(const U &rhs)const ETL_ATTRIB_INLINE;
+       template<typename U> _fixed operator*(const U &rhs)const ETL_ATTRIB_INLINE;
+       template<typename U> _fixed operator/(const U &rhs)const ETL_ATTRIB_INLINE;
+       _fixed operator+(const _fixed &rhs)const ETL_ATTRIB_INLINE;
+       _fixed operator-(const _fixed &rhs)const ETL_ATTRIB_INLINE;
+       _fixed operator*(const _fixed &rhs)const ETL_ATTRIB_INLINE;
+       _fixed operator/(const _fixed &rhs)const ETL_ATTRIB_INLINE;
+       _fixed operator*(const int &rhs)const ETL_ATTRIB_INLINE;
+       _fixed operator/(const int &rhs)const ETL_ATTRIB_INLINE;
+       _fixed operator*(const float &rhs)const ETL_ATTRIB_INLINE;
+       _fixed operator*(const double &rhs)const ETL_ATTRIB_INLINE;
+
+       // Negation Operator
+       _fixed operator-()const ETL_ATTRIB_INLINE;
+
+       // Casting Operators
+       inline operator float()const ETL_ATTRIB_INLINE;
+       inline operator double()const ETL_ATTRIB_INLINE;
+       inline operator long double()const ETL_ATTRIB_INLINE;
+       inline operator int()const ETL_ATTRIB_INLINE;
+       inline operator bool()const ETL_ATTRIB_INLINE;
+
+       _fixed floor()const;
+       _fixed ceil()const;
+       _fixed round()const;
+
+       bool operator==(const _fixed &rhs)const { return data()==rhs.data(); }
+       bool operator!=(const _fixed &rhs)const { return data()!=rhs.data(); }
+       bool operator<(const _fixed &rhs)const { return data()<rhs.data(); }
+       bool operator>(const _fixed &rhs)const { return data()>rhs.data(); }
+       bool operator<=(const _fixed &rhs)const { return data()<=rhs.data(); }
+       bool operator>=(const _fixed &rhs)const { return data()>=rhs.data(); }
+};
+
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::fixed_base()
+{}
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::fixed_base(const _fixed &x):_data(x._data)
+{}
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::fixed_base(const float &f):_data(static_cast<value_type>(f*_ONE()
+#ifdef ROUND_TO_NEAREST_INTEGER
+                                                                                                                                                                  +0.5f
+#endif
+                                                                       )) {}
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::fixed_base(const double &f):_data(static_cast<value_type>(f*_ONE()
+#ifdef ROUND_TO_NEAREST_INTEGER
+                                                                                                                                                                       +0.5
+#endif
+                                                                       )) {}
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::fixed_base(const long double &f):_data(static_cast<value_type>(f*_ONE()
+#ifdef ROUND_TO_NEAREST_INTEGER
+                                                                                                                                                                                +0.5
+#endif
+                                                                       )) {}
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::fixed_base(const int &i):_data(i<<FIXED_BITS)
+{}
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::fixed_base(value_type x,raw):_data(x) { }
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::fixed_base(const int &n,const int &d):_data((n<<FIXED_BITS)/d) { }
+
+
+
+template <class T,unsigned int FIXED_BITS> inline bool
+fixed_base<T,FIXED_BITS>::_TYPE_SMALLER_THAN_INT()
+{
+       return sizeof(T)<sizeof(int);
+}
+
+template <class T,unsigned int FIXED_BITS> inline bool
+fixed_base<T,FIXED_BITS>::_USING_ALL_BITS()
+{
+       return sizeof(T)*8==FIXED_BITS;
+}
+
+template <class T,unsigned int FIXED_BITS> inline T
+fixed_base<T,FIXED_BITS>::_ONE()
+{
+       return static_cast<T>((_USING_ALL_BITS()?~T(0):1<<FIXED_BITS));
+}
+
+template <class T,unsigned int FIXED_BITS> inline T
+fixed_base<T,FIXED_BITS>::_F_MASK()
+{
+       return static_cast<T>(_USING_ALL_BITS()?~T(0):_ONE()-1);
+}
+
+template <class T,unsigned int FIXED_BITS> inline float
+fixed_base<T,FIXED_BITS>::_EPSILON()
+{
+       return 1.0f/((float)_ONE()*2);
+}
+
+
+template <class T,unsigned int FIXED_BITS>T &
+fixed_base<T,FIXED_BITS>::data()
+{
+       return _data;
+}
+
+template <class T,unsigned int FIXED_BITS>const T &
+fixed_base<T,FIXED_BITS>::data()const
+{
+       return _data;
+}
+
+//! fixed+=fixed
+template <class T,unsigned int FIXED_BITS>const fixed_base<T,FIXED_BITS> &
+fixed_base<T,FIXED_BITS>::operator+=(const _fixed &rhs)
+{
+       _data+=rhs._data;
+       return *this;
+}
+
+//! fixed-=fixed
+template <class T,unsigned int FIXED_BITS>const fixed_base<T,FIXED_BITS> &
+fixed_base<T,FIXED_BITS>::operator-=(const _fixed &rhs)
+{
+       _data-=rhs._data;
+       return *this;
+}
+
+//! fixed*=fixed
+template <class T,unsigned int FIXED_BITS>const fixed_base<T,FIXED_BITS> &
+fixed_base<T,FIXED_BITS>::operator*=(const _fixed &rhs)
+{
+       if(_TYPE_SMALLER_THAN_INT())
+               _data=static_cast<T>((int)_data*(int)rhs._data>>FIXED_BITS);
+       else
+       {
+               _data*=rhs._data;
+               _data>>=FIXED_BITS;
+       }
+
+       return *this;
+}
+
+//! fixed/=fixed
+template <class T,unsigned int FIXED_BITS>const fixed_base<T,FIXED_BITS> &
+fixed_base<T,FIXED_BITS>::operator/=(const _fixed &rhs)
+{
+       if(_TYPE_SMALLER_THAN_INT())
+               _data=static_cast<T>((int)_data/(int)rhs._data<<FIXED_BITS);
+       else
+       {
+               _data/=rhs._data;
+               _data<<=FIXED_BITS;
+       }
+       return *this;
+}
+
+template <class T,unsigned int FIXED_BITS> template<typename U> const fixed_base<T,FIXED_BITS> &
+fixed_base<T,FIXED_BITS>::operator*=(const U &rhs)
+{
+       return operator*=(fixed_base<T,FIXED_BITS>(rhs));
+}
+
+template <class T,unsigned int FIXED_BITS> template<typename U> const fixed_base<T,FIXED_BITS> &
+fixed_base<T,FIXED_BITS>::operator/=(const U &rhs)
+{
+       return operator/=(fixed_base<T,FIXED_BITS>(rhs));
+}
+
+//! fixed*=int
+template <class T,unsigned int FIXED_BITS>const fixed_base<T,FIXED_BITS> &
+fixed_base<T,FIXED_BITS>::operator*=(const int &rhs)
+{
+       _data*=rhs; return *this;
+}
+
+//! fixed/=int
+template <class T,unsigned int FIXED_BITS>const fixed_base<T,FIXED_BITS> &
+fixed_base<T,FIXED_BITS>::operator/=(const int &rhs)
+{
+       _data/=rhs; return *this;
+}
+
+
+
+
+
+
+
+//! fixed + fixed
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator+(const _fixed &rhs)const
+{
+       _fixed ret;
+       ret._data=_data+rhs._data;
+       return ret;
+}
+
+//! fixed - fixed
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator-(const _fixed &rhs)const
+{
+       _fixed ret;
+       ret._data=_data-rhs._data;
+       return ret;
+}
+
+//! fixed * fixed
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator*(const _fixed &rhs)const
+{
+       _fixed ret;
+       ret._data=((_data*rhs._data)>>FIXED_BITS);
+       return ret;
+       //return reinterpret_cast<_fixed>((_data*rhs._data)>>FIXED_BITS);
+}
+
+//! fixed / fixed
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator/(const _fixed &rhs)const
+{
+       _fixed ret;
+       ret._data=((_data/rhs._data)<<FIXED_BITS);
+       return ret;
+       //return reinterpret_cast<_fixed>((_data/rhs._data)<<FIXED_BITS);
+}
+
+//! fixed + ...
+template <class T,unsigned int FIXED_BITS> template<typename U> fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator+(const U &rhs) const
+{
+       return operator+(fixed_base<T,FIXED_BITS>(rhs));
+}
+
+//! fixed - ...
+template <class T,unsigned int FIXED_BITS> template<typename U> fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator-(const U &rhs) const
+{
+       return operator-(fixed_base<T,FIXED_BITS>(rhs));
+}
+
+//! fixed * ...
+template <class T,unsigned int FIXED_BITS> template<typename U> fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator*(const U &rhs) const
+{
+       return operator*(fixed_base<T,FIXED_BITS>(rhs));
+}
+
+//! fixed / ...
+template <class T,unsigned int FIXED_BITS> template<typename U> fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator/(const U &rhs) const
+{
+       return operator/(fixed_base<T,FIXED_BITS>(rhs));
+}
+
+//! fixed * int
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator*(const int &rhs)const
+{
+       _fixed ret;
+       ret._data=_data*rhs;
+       return ret;
+       //return reinterpret_cast<_fixed>(_data*rhs);
+}
+
+//! fixed * float
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator*(const float &rhs)const
+{
+    return (*this)*_fixed(rhs);
+}
+
+//! fixed * double
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator*(const double &rhs)const
+{
+    return (*this)*_fixed(rhs);
+}
+
+
+//! fixed / int
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator/(const int &rhs)const
+{
+       _fixed ret;
+       ret._data=_data/rhs;
+       return ret;
+       //return reinterpret_cast<_fixed>(_data/rhs);
+}
+
+//! float * fixed
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+operator*(const float& lhs, const fixed_base<T,FIXED_BITS> &rhs)
+{
+    return rhs*lhs;
+}
+
+//! double * fixed
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+operator*(const double& lhs, const fixed_base<T,FIXED_BITS> &rhs)
+{
+    return rhs*lhs;
+}
+
+
+
+
+
+
+// Negation Operator
+template <class T,unsigned int FIXED_BITS>fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator-()const
+{
+       _fixed ret; ret._data=-_data; return ret;
+}
+
+// Casting Operators
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator float()const
+{
+       return static_cast<float>(_data)/static_cast<float>(_ONE());
+}
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator double()const
+{
+       return static_cast<double>(_data)/static_cast<double>(_ONE());
+}
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator long double()const
+{
+       return static_cast<long double>(_data)/static_cast<long double>(_ONE());
+}
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator int()const
+{
+       return static_cast<int>(_data>>FIXED_BITS);
+}
+
+template <class T,unsigned int FIXED_BITS>
+fixed_base<T,FIXED_BITS>::operator bool()const
+{
+       return static_cast<bool>(_data);
+}
+
+
+template <class T,unsigned int FIXED_BITS> fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::floor()const
+{
+       _fixed ret(*this);
+       ret._data&=~_F_MASK();
+       return ret;
+}
+
+template <class T,unsigned int FIXED_BITS> fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::ceil()const
+{
+       _fixed ret(*this);
+       if(ret._data&_F_MASK())
+               ret._data=(ret._data&~_F_MASK()) + _ONE();
+       else
+               ret._data&=~_F_MASK();
+       return ret;
+}
+
+template <class T,unsigned int FIXED_BITS> fixed_base<T,FIXED_BITS>
+fixed_base<T,FIXED_BITS>::round()const
+{
+       _fixed ret(*this);
+       ret._data+=_ONE()>>1;
+       ret._data&=~_F_MASK();
+       return ret;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+typedef fixed_base<ETL_FIXED_TYPE,ETL_FIXED_BITS> fixed;
+
+_ETL_END_NAMESPACE
+
+_STD_BEGIN_NAMESPACE
+
+template <class T,unsigned int FIXED_BITS>
+inline _ETL::fixed_base<T,FIXED_BITS>
+ceil(const _ETL::fixed_base<T,FIXED_BITS> &rhs)
+{ return rhs.ceil(); }
+
+template <class T,unsigned int FIXED_BITS>
+_ETL::fixed_base<T,FIXED_BITS>
+floor(const _ETL::fixed_base<T,FIXED_BITS> &rhs)
+{ return rhs.floor(); }
+
+template <class T,unsigned int FIXED_BITS>
+_ETL::fixed_base<T,FIXED_BITS>
+round(const _ETL::fixed_base<T,FIXED_BITS> &rhs)
+{ return rhs.round(); }
+
+template <class T,unsigned int FIXED_BITS>
+_ETL::fixed_base<T,FIXED_BITS>
+abs(const _ETL::fixed_base<T,FIXED_BITS> &rhs)
+{ return rhs<_ETL::fixed_base<T,FIXED_BITS>(0)?-rhs:rhs; }
+
+_STD_END_NAMESPACE
+
+/*
+template <class T,unsigned int FIXED_BITS, typename U> bool
+operator==(const _ETL::fixed_base<T,FIXED_BITS>& lhs, const _ETL::fixed_base<T,FIXED_BITS>& rhs)
+{ return lhs.data()==rhs.data(); }
+
+template <class T,unsigned int FIXED_BITS, typename U> bool
+operator!=(const _ETL::fixed_base<T,FIXED_BITS>& lhs, const _ETL::fixed_base<T,FIXED_BITS>& rhs)
+{ return lhs.data()!=rhs.data(); }
+
+template <class T,unsigned int FIXED_BITS, typename U> bool
+operator>(const _ETL::fixed_base<T,FIXED_BITS>& lhs, const _ETL::fixed_base<T,FIXED_BITS>& rhs)
+{ return lhs.data()>rhs.data(); }
+
+template <class T,unsigned int FIXED_BITS, typename U> bool
+operator<(const _ETL::fixed_base<T,FIXED_BITS>& lhs, const _ETL::fixed_base<T,FIXED_BITS>& rhs)
+{ return lhs.data()<rhs.data(); }
+
+template <class T,unsigned int FIXED_BITS, typename U> bool
+operator>=(const _ETL::fixed_base<T,FIXED_BITS>& lhs, const _ETL::fixed_base<T,FIXED_BITS>& rhs)
+{ return lhs.data()>=rhs.data(); }
+
+template <class T,unsigned int FIXED_BITS, typename U> bool
+operator<=(const _ETL::fixed_base<T,FIXED_BITS>& lhs, const _ETL::fixed_base<T,FIXED_BITS>& rhs)
+{ return lhs.data()<=rhs.data(); }
+*/
+
+
+#if defined(__GNUC__) && __GNUC__ == 3
+template <class T,unsigned int FIXED_BITS, typename U> U
+operator*(const U &a,const _ETL::fixed_base<T,FIXED_BITS> &b)
+       { return a*static_cast<double>(b); }
+
+template <class T,unsigned int FIXED_BITS, typename U> U
+operator/(const U &a,const _ETL::fixed_base<T,FIXED_BITS> &b)
+       { return a/static_cast<double>(b); }
+
+template <class T,unsigned int FIXED_BITS, typename U> U
+operator+(const U &a,const _ETL::fixed_base<T,FIXED_BITS> &b)
+       { return a+static_cast<double>(b); }
+
+template <class T,unsigned int FIXED_BITS, typename U> U
+operator-(const U &a,const _ETL::fixed_base<T,FIXED_BITS> &b)
+       { return a-static_cast<double>(b); }
+
+
+/*
+inline const float &
+operator*=(float &a,const _ETL::fixed &b)
+       { a*=(float)b; return a; }
+
+inline const float &
+operator/=(float &a,const _ETL::fixed &b)
+       { a/=(float)b; return a; }
+
+inline const float &
+operator-=(float &a,const _ETL::fixed &b)
+       { a-=(float)b; return a; }
+
+inline const float &
+operator+=(float &a,const _ETL::fixed &b)
+       { a+=(float)b; return a; }
+*/
+#endif
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_gaussian.h b/ETL/tags/0.4.11/ETL/_gaussian.h
new file mode 100644 (file)
index 0000000..6ad9882
--- /dev/null
@@ -0,0 +1,315 @@
+/*! ========================================================================
+** Extended Template Library
+** Gaussian Blur Template Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_GAUSSIAN_H
+#define __ETL_GAUSSIAN_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <cstring>             // for memset()
+#include <iterator>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template<typename T> void
+gaussian_blur_5x5_(T pen,int w, int h,
+typename T::pointer SC0,
+typename T::pointer SC1,
+typename T::pointer SC2,
+typename T::pointer SC3)
+{
+       int x,y;
+       typename T::value_type Tmp1,Tmp2,SR0,SR1,SR2,SR3;
+
+       //typename T::iterator_x iter;
+
+       // Setup the row buffers
+       for(x=0;x<w;x++)SC0[x+2]=pen.x()[x]*24;
+       memset(SC1,0,(w+2)*sizeof(typename T::value_type));
+       memset(SC2,0,(w+2)*sizeof(typename T::value_type));
+       memset(SC3,0,(w+2)*sizeof(typename T::value_type));
+
+       for(y=0;y<h+2;y++,pen.inc_y())
+       {
+               int yadj;
+               if(y>=h)
+                       {yadj=(h-y)-1; SR0=pen.y()[yadj]*1.35;}
+               else
+                       {yadj=0; SR0=pen.get_value()*1.35; }
+
+               SR1=SR2=SR3=typename T::value_type();
+               for(x=0;x<w+2;x++,pen.inc_x())
+               {
+                       if(x>=w)
+                               Tmp1=pen[yadj][(w-x)-1];
+                       else
+                               Tmp1=*pen[yadj];
+
+                       Tmp2=SR0+Tmp1;
+                       SR0=Tmp1;
+                       Tmp1=SR1+Tmp2;
+                       SR1=Tmp2;
+                       Tmp2=SR2+Tmp1;
+                       SR2=Tmp1;
+                       Tmp1=SR3+Tmp2;
+                       SR3=Tmp2;
+
+                       // Column Machine
+                       Tmp2=SC0[x]+Tmp1;
+                       SC0[x]=Tmp1;
+                       Tmp1=SC1[x]+Tmp2;
+                       SC1[x]=Tmp2;
+                       Tmp2=SC2[x]+Tmp1;
+                       SC2[x]=Tmp1;
+                       if(y>1&&x>1)
+                               pen[-2][-2]=(SC3[x]+Tmp2)/256;
+                       SC3[x]=Tmp2;
+               }
+               pen.dec_x(x);
+       }
+
+}
+
+template<typename T> void
+gaussian_blur_5x5(T pen, int w, int h)
+{
+       typename T::pointer SC0=new typename T::value_type[w+2];
+       typename T::pointer SC1=new typename T::value_type[w+2];
+       typename T::pointer SC2=new typename T::value_type[w+2];
+       typename T::pointer SC3=new typename T::value_type[w+2];
+
+       gaussian_blur_5x5_(pen,w,h,SC0,SC1,SC2,SC3);
+
+       delete [] SC0;
+       delete [] SC1;
+       delete [] SC2;
+       delete [] SC3;
+}
+
+template<typename T> void
+gaussian_blur_5x5(T begin, T end)
+{
+       typename T::difference_type size(end-begin);
+
+       typename T::pointer SC0=new typename T::value_type[size.x+2];
+       typename T::pointer SC1=new typename T::value_type[size.x+2];
+       typename T::pointer SC2=new typename T::value_type[size.x+2];
+       typename T::pointer SC3=new typename T::value_type[size.x+2];
+
+       gaussian_blur_5x5_(begin,size.x,size.y,SC0,SC1,SC2,SC3);
+
+       delete [] SC0;
+       delete [] SC1;
+       delete [] SC2;
+       delete [] SC3;
+}
+
+template<typename T> void
+gaussian_blur_3x3(T pen,int w, int h)
+{
+       int x,y;
+       typename T::value_type Tmp1,Tmp2,SR0,SR1;
+
+//     typename T::iterator_x iter;
+
+       typename T::pointer SC0=new typename T::value_type[w+1];
+       typename T::pointer SC1=new typename T::value_type[w+1];
+
+       // Setup the row buffers
+       for(x=0;x<w;x++)SC0[x+1]=pen.x()[x]*4;
+       memset(SC1,0,(w+1)*sizeof(typename T::value_type));
+
+       for(y=0;y<h+1;y++,pen.inc_y())
+       {
+               int yadj;
+               if(y>=h)
+                       {yadj=-1; SR1=SR0=pen.y()[yadj];}
+               else
+                       {yadj=0; SR1=SR0=pen.get_value(); }
+
+               for(x=0;x<w+1;x++,pen.inc_x())
+               {
+                       if(x>=w)
+                               Tmp1=pen[yadj][(w-x)-2];
+                       else
+                               Tmp1=*pen[yadj];
+
+                       Tmp2=SR0+Tmp1;
+                       SR0=Tmp1;
+                       Tmp1=SR1+Tmp2;
+                       SR1=Tmp2;
+
+                       Tmp2=SC0[x]+Tmp1;
+                       SC0[x]=Tmp1;
+                       if(y&&x)
+                               pen[-1][-1]=(SC1[x]+Tmp2)/16;
+                       SC1[x]=Tmp2;
+               }
+               pen.dec_x(x);
+       }
+
+       delete [] SC0;
+       delete [] SC1;
+}
+
+//! 2D 3x3 pixel gaussian blur
+template<typename _PEN> void
+gaussian_blur_3x3(_PEN begin, _PEN end)
+{
+       typename _PEN::difference_type size(end-begin);
+       gaussian_blur_3x3(begin,size.x,size.y);
+}
+
+//! 1D 3 pixel gaussian blur
+template<typename I> void
+gaussian_blur_3(I begin, I end, bool endpts = true)
+{
+//     typedef typename I _itertype;
+//     int i;
+       typename std::iterator_traits<I>::value_type Tmp1,Tmp2,SR0,SR1;
+
+       SR0=SR1=*begin;
+       I iter,prev=begin;
+       for(iter=begin;iter!=end;prev=iter++)
+       {
+               Tmp1=*iter;
+               Tmp2=SR0+Tmp1;
+               SR0=Tmp1;
+               Tmp1=SR1+Tmp2;
+               SR1=Tmp2;
+               if(iter!=begin && ( endpts || (prev != begin) ))
+                       *prev=(Tmp1)/4;
+       }
+
+       if(endpts)
+       {
+               Tmp1=*prev;
+               Tmp2=SR0+Tmp1;
+               SR0=Tmp1;
+               Tmp1=SR1+Tmp2;
+               SR1=Tmp2;
+               *prev=(Tmp1)/4;
+       }
+}
+
+//! 2D 3x1 pixel gaussian blur
+template<typename _PEN> void
+gaussian_blur_3x1(_PEN begin, _PEN end)
+{
+       typename _PEN::difference_type size=end-begin;
+       for(;size.y>0;size.y--, begin.inc_y())
+               gaussian_blur_3(begin.x(),begin.x()+size.x);
+}
+
+//! 2D 1x3 pixel gaussian blur
+template<typename _PEN> void
+gaussian_blur_1x3(_PEN begin, _PEN end)
+{
+       typename _PEN::difference_type size=end-begin;
+       for(;size.x>0;size.x--,begin.inc_x())
+               gaussian_blur_3(begin.y(),begin.y()+size.y);
+}
+
+template<typename T> void
+gaussian_blur(T pen, int w, int h, int blur_x, int blur_y)
+{
+       typename T::pointer SC0=new typename T::value_type[w+2];
+       typename T::pointer SC1=new typename T::value_type[w+2];
+       typename T::pointer SC2=new typename T::value_type[w+2];
+       typename T::pointer SC3=new typename T::value_type[w+2];
+
+       blur_x--;
+       blur_y--;
+
+       while(blur_x&&blur_y)
+       {
+               if(blur_x>=4 && blur_y>=4)
+               {
+                       gaussian_blur_5x5_(pen,w,h,SC0,SC1,SC2,SC3);
+                       blur_x-=4,blur_y-=4;
+               }
+               else if(blur_x>=2 && blur_y>=2)
+               {
+                       gaussian_blur_3x3(pen,w,h);
+                       blur_x-=2,blur_y-=2;
+               }
+               else
+                       blur_x--,blur_y--;
+       }
+       while(blur_x)
+       {
+               if(blur_x>=2)
+               {
+                       gaussian_blur_3x1(pen,T(pen).move(w,h));
+                       blur_x-=2;
+               }
+               else
+                       blur_x--;
+       }
+       while(blur_y)
+       {
+               if(blur_y>=2)
+               {
+                       gaussian_blur_1x3(pen,T(pen).move(w,h));
+                       blur_y-=2;
+               }
+               else
+                       blur_y--;
+       }
+
+       delete [] SC0;
+       delete [] SC1;
+       delete [] SC2;
+       delete [] SC3;
+}
+
+template<typename T> void
+gaussian_blur(T begin, T end,int w, int h)
+{
+       typename T::difference_type size(end-begin);
+       gaussian_blur(begin,size.x,size.y,w,h);
+}
+
+template<typename T> void
+gaussian_blur(T begin, T end,int w)
+{
+       typename T::difference_type size(end-begin);
+       gaussian_blur(begin,size.x,size.y,w,w);
+}
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_handle.h b/ETL/tags/0.4.11/ETL/_handle.h
new file mode 100644 (file)
index 0000000..0137f8f
--- /dev/null
@@ -0,0 +1,826 @@
+/* === E T L =============================================================== */
+/*!    \file _handle.h
+**     $Id$
+**     \brief Template Object Handle Implementation
+**     \internal
+**
+**     \legal
+**     Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**     Copyright (c) 2007, 2008 Chris Moore
+**
+**     This package is free software; you can redistribute it and/or
+**     modify it under the terms of the GNU General Public License as
+**     published by the Free Software Foundation; either version 2 of
+**     the License, or (at your option) any later version.
+**
+**     This package is distributed in the hope that it will be useful,
+**     but WITHOUT ANY WARRANTY; without even the implied warranty of
+**     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+**     General Public License for more details.
+**     \endlegal
+**
+**     \note
+**             This is an internal header file, included by other ETL headers.
+**             You should not attempt to use it directly.
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__HANDLE_H
+#define __ETL__HANDLE_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <cassert>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+#define ETL_SELF_DELETING_SHARED_OBJECT
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+#ifdef NDEBUG
+#define assert_cast            static_cast
+#else
+#define assert_cast            dynamic_cast
+#endif
+
+
+_ETL_BEGIN_NAMESPACE
+
+// Forward Declarations
+template <class T> class handle;
+template <class T> class loose_handle;
+template <class T> class rhandle;
+
+
+// ========================================================================
+/*!    \class  shared_object _handle.h ETL/handle
+**     \brief  Shared Object Base Class
+**     \see handle, loose_handle
+**     \writeme
+*/
+class shared_object
+{
+private:
+       mutable int refcount;
+#ifdef ETL_LOCK_REFCOUNTS
+       mutable etl::mutex mtx;
+#endif
+
+protected:
+       shared_object():refcount(0) { }
+
+#ifdef ETL_SELF_DELETING_SHARED_OBJECT
+       virtual ~shared_object() { }
+#else
+       ~shared_object() { }
+#endif
+
+public:
+       void ref()const
+       {
+#ifdef ETL_LOCK_REFCOUNTS
+               etl::mutex::lock lock(mtx);
+#endif
+               assert(refcount>=0);
+               refcount++;
+       }
+
+       //! Returns \c false if object needs to be deleted
+       bool unref()const
+       {
+               bool ret = true;
+               {
+#ifdef ETL_LOCK_REFCOUNTS
+                       etl::mutex::lock lock(mtx);
+#endif
+                       assert(refcount>0);
+
+                       refcount--;
+
+                       if(refcount==0) {
+                               ret = false;
+#ifdef ETL_SELF_DELETING_SHARED_OBJECT
+                               refcount=-666;
+#endif
+                       }
+               }
+
+#ifdef ETL_SELF_DELETING_SHARED_OBJECT
+               if (!ret)
+                       delete this;
+#endif
+               return ret;
+       }
+
+       int count()const { return refcount; }
+
+}; // END of class shared_object
+
+// ========================================================================
+/*!    \class  virtual_shared_object _handle.h ETL/handle
+**     \brief  Virtual Shared Object Base Class
+**     \see handle, loose_handle
+**     \writeme
+*/
+class virtual_shared_object
+{
+protected:
+       virtual_shared_object() { }
+public:
+       virtual ~virtual_shared_object()=0;
+       virtual void ref()const=0;
+       virtual bool unref()const=0;
+       virtual int count()const=0;
+       virtual virtual_shared_object *clone()=0;
+}; // END of class virtual_shared_object
+
+// ========================================================================
+/*!    \class  handle _handle.h        ETL/handle
+**     \brief  Object Handle
+**     \see shared_object, loose_handle
+**     \writeme
+*/
+template <class T>
+class handle
+{
+public:
+
+       typedef T value_type;
+       typedef T& reference;
+       typedef const T& const_reference;
+       typedef T* pointer;
+       typedef const T* const_pointer;
+       typedef int count_type;
+       typedef int size_type;
+
+protected:
+#ifdef _DEBUG
+public:
+#endif
+       value_type *obj;                //!< Pointer to object
+
+public:
+
+       //! Default constructor - empty handle
+       handle():obj(NULL) {}
+
+       //! Constructor that constructs from a pointer to new object
+       handle(pointer x):obj(x)
+       {
+               if(obj)
+                       obj->ref();
+       }
+
+       //! Default copy constructor
+       handle(const handle<value_type> &x):obj(x.get())
+       {
+               if(obj)
+                       obj->ref();
+       }
+
+       //! Handle is released on deletion
+       ~handle() { detach(); }
+
+       //! Template Assignment operator
+       /*! \note This class may not be necessary, and may be removed
+       **              at some point in the future.
+       */
+       /*
+       template <class U> handle<value_type> &
+       operator=(const handle<U> &x)
+       {
+               if(x.get()==obj)
+                       return *this;
+
+               detach();
+
+               obj=static_cast<value_type*>(x.get());
+               if(obj)obj->ref();
+               return *this;
+       }
+       */
+
+       //! Assignment operator
+       handle<value_type> &
+       operator=(const handle<value_type> &x)
+       {
+               if(x.get()==obj)
+                       return *this;
+
+               detach();
+
+               obj=x.get();
+               if(obj)obj->ref();
+               return *this;
+       }
+
+       //! Swaps the values of two handles without reference counts
+       handle<value_type> &
+       swap(handle<value_type> &x)
+       {
+               pointer ptr=x.obj;
+               x.obj=x.get();
+               obj=ptr;
+               return *this;
+       }
+
+       //! Handle detach procedure
+       /*! unref()'s the object and sets the internal object pointer to \c NULL */
+       void
+       detach()
+       {
+               pointer xobj(obj);
+               obj=0;
+#ifdef ETL_SELF_DELETING_SHARED_OBJECT
+               if(xobj)
+                       xobj->unref();
+#else
+               if(xobj && !xobj->unref())
+                       delete xobj;
+#endif
+       }
+
+       // This will be reintroduced with a new function
+       //void release() { detach(); }
+
+       void reset() { detach(); }
+
+       bool empty()const { return obj==0; }
+
+       //! Creates a new instance of a T object and puts it in the handle.
+       /*! Uses the default constructor */
+       void spawn() { operator=(handle(new T())); }
+
+       handle<value_type> clone()const { assert(obj); return static_cast<value_type*>(obj->clone()); }
+
+       //! Returns a constant handle to our object
+       handle<const value_type> constant()const { assert(obj); return *this; }
+
+       //! Returns number of instances
+       count_type
+       count()const
+               { return obj?obj->count():0; }
+
+       //! Returns true if there is only one instance of the object
+       bool
+       unique()const
+               { assert(obj); return count()==1; }
+
+       reference
+       operator*()const
+               { assert(obj); return *obj; }
+
+       pointer
+       operator->()const
+               { assert(obj); return obj; }
+
+       //! More explicit bool cast
+       operator bool()const
+               { return obj!=NULL; }
+
+       operator handle<const value_type>()const
+       { return handle<const value_type>(static_cast<const_pointer>(obj)); }
+
+       //! <tt> static_cast\<\> </tt> wrapper
+       template <class U> static handle<T> cast_static         (const handle<U> &x) { return handle<T>(static_cast             <T*>(x.get())); }
+       //! <tt> dynamic_cast\<\> </tt> wrapper
+       template <class U> static handle<T> cast_dynamic        (const handle<U> &x) { return handle<T>(dynamic_cast    <T*>(x.get())); }
+       //! <tt> const_cast\<\> </tt> wrapper
+       template <class U> static handle<T> cast_const          (const handle<U> &x) { return handle<T>(const_cast              <T*>(x.get())); }
+       //! <tt> reinterpret_cast\<\> </tt> wrapper
+       template <class U> static handle<T> cast_reinterpret(const handle<U> &x) { return handle<T>(reinterpret_cast<T*>(x.get())); }
+
+       template <class U> static handle<T> cast_static         (const loose_handle<U> &x);
+       template <class U> static handle<T> cast_dynamic        (const loose_handle<U> &x);
+       template <class U> static handle<T> cast_const          (const loose_handle<U> &x);
+       template <class U> static handle<T> cast_reinterpret(const loose_handle<U> &x);
+
+       template <class U> static handle<T> cast_static         (const rhandle<U> &x);
+       template <class U> static handle<T> cast_dynamic        (const rhandle<U> &x);
+       template <class U> static handle<T> cast_const          (const rhandle<U> &x);
+       template <class U> static handle<T> cast_reinterpret(const rhandle<U> &x);
+
+       template <class U> static handle<T> cast_static         (U* x);
+       template <class U> static handle<T> cast_dynamic        (U* x);
+       template <class U> static handle<T> cast_const          (U* x);
+       template <class U> static handle<T> cast_reinterpret(U* x);
+
+       //! Returns pointer to the object that is being wrapped
+       pointer get()const { return obj; }
+
+       bool
+       operator!()const
+               { return !obj; }
+
+       //! static_cast<> overload -- Useful for implicit casts
+       template <class U>
+       operator handle<U>()const
+       { return handle<U>(static_cast<U*>(obj)); }
+}; // END of template class handle
+
+// ========================================================================
+/*!    \class  rshared_object _handle.h        ETL/handle
+**     \brief  Replaceable Shared Object Base Class
+**     \see rhandle
+**     \writeme
+*/
+class rshared_object : public shared_object
+{
+private:
+       mutable int rrefcount;
+
+public:
+       void *front_;
+       void *back_;
+
+protected:
+       rshared_object():rrefcount(0),front_(0),back_(0) { }
+
+public:
+       void rref()const
+               { rrefcount++; }
+
+       void runref()const
+       {
+               assert(rrefcount>0);
+               rrefcount--;
+       }
+
+       int rcount()const
+               { return rrefcount; }
+}; // END of class rshared_object
+
+// ========================================================================
+/*!    \class  rhandle _handle.h       ETL/handle
+**     \brief  Replaceable Object Handle
+**     \see rshared_object, handle, loose_handle
+**     \writeme
+*/
+template <class T>
+class rhandle : public handle<T>
+{
+       friend class rshared_object;
+public:
+
+       typedef T value_type;
+       typedef T& reference;
+       typedef const T& const_reference;
+       typedef T* pointer;
+       typedef const T* const_pointer;
+       typedef int count_type;
+       typedef int size_type;
+
+
+       using handle<value_type>::count;
+       using handle<value_type>::unique;
+       using handle<value_type>::operator bool;
+       using handle<value_type>::get;
+       using handle<value_type>::operator*;
+       using handle<value_type>::operator->;
+
+       /*
+       operator const handle<value_type>&()const
+       { return *this; }
+       */
+
+private:
+       using handle<value_type>::obj;
+
+       rhandle<value_type> *prev_;
+       rhandle<value_type> *next_;
+
+       void add_to_rlist()
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+
+               assert(obj);
+               obj->rref();
+
+               // If this is the first reversible handle
+               if(!obj->front_)
+               {
+                       obj->front_=obj->back_=this;
+                       prev_=next_=0;
+                       return;
+               }
+
+               prev_=reinterpret_cast<rhandle<value_type>*>(obj->back_);
+               next_=0;
+               prev_->next_=this;
+               obj->back_=this;
+       }
+
+       void del_from_rlist()
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               assert(obj);
+               obj->runref();
+
+               // If this is the last reversible handle
+               if(obj->front_==obj->back_)
+               {
+                       obj->front_=obj->back_=0;
+                       prev_=next_=0;
+                       return;
+               }
+
+               if(!prev_)
+                       obj->front_=(void*)next_;
+               else
+                       prev_->next_=next_;
+
+               if(!next_)
+                       obj->back_=(void*)prev_;
+               else
+                       next_->prev_=prev_;
+       }
+
+public:
+
+       //! Default constructor - empty handle
+       rhandle() {}
+
+       //! Constructor that constructs from a pointer to new object
+       rhandle(pointer x):handle<T>(x)
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               if(obj)add_to_rlist();
+       }
+
+       rhandle(const handle<value_type> &x):handle<T>(x)
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               if(obj)add_to_rlist();
+       }
+
+       //! Default copy constructor
+       rhandle(const rhandle<value_type> &x):handle<T>(x)
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               if(obj)add_to_rlist();
+       }
+
+       //! Handle is released on deletion
+       ~rhandle() { detach(); }
+
+       //! Template Assignment operator
+       /*! \note This class may not be necessary, and may be removed
+       **              at some point in the future.
+       */
+       /*
+       template <class U> const handle<value_type> &
+       operator=(const handle<U> &x)
+       {
+               if(x.get()==obj)
+                       return *this;
+
+               detach();
+
+               obj=static_cast<value_type*>(x.get());
+               if(obj)
+               {
+                       obj->ref();
+                       add_to_rlist();
+               }
+               return *this;
+       }
+       */
+
+       //! Assignment operator
+       rhandle<value_type> &
+       operator=(const rhandle<value_type> &x)
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               if(x.get()==obj)
+                       return *this;
+
+               detach();
+
+               obj=x.get();
+               if(obj)
+               {
+                       obj->ref();
+                       add_to_rlist();
+               }
+               return *this;
+       }
+
+       rhandle<value_type>&
+       operator=(const handle<value_type> &x)
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               if(x.get()==obj)
+                       return *this;
+
+               detach();
+
+               obj=x.get();
+               if(obj)
+               {
+                       obj->ref();
+                       add_to_rlist();
+               }
+               return *this;
+       }
+
+       rhandle<value_type>&
+       operator=(value_type* x)
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               if(x==obj)
+                       return *this;
+
+               detach();
+
+               obj=x;
+               if(obj)
+               {
+                       obj->ref();
+                       add_to_rlist();
+               }
+               return *this;
+       }
+
+       //! Handle release procedure
+       /*! unref()'s the object and sets the internal object pointer to \c NULL */
+       void
+       detach()
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               if(obj)del_from_rlist();
+               handle<value_type>::detach();
+               obj=0;
+       }
+
+       // This will be reintroduced with a new function
+       //void release() { detach(); }
+
+       void reset() { detach(); }
+
+       //! Creates a new instance of a T object and puts it in the handle.
+       /*! Uses the default constructor */
+       void spawn() { operator=(handle<value_type>(new T())); }
+
+       //! Returns number of reversible instances
+       count_type
+       rcount()const
+       {
+//             value_type*const& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               return obj?obj->rcount():0;
+       }
+
+       //! Returns true if there is only one instance of the object
+       bool
+       runique()const
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               assert(obj); return obj->front_==obj->back_;
+       }
+
+       //! \writeme
+       int replace(const handle<value_type> &x)
+       {
+//             value_type*& obj(handle<T>::obj); // Required to keep gcc 3.4.2 from barfing
+               assert(obj);
+               assert(x.get()!=obj);
+
+               if(x.get()==obj)
+                       return 0;
+
+               rhandle<value_type> *iter;
+               rhandle<value_type> *next;
+
+               iter=reinterpret_cast<rhandle<value_type>*>(obj->front_);
+
+               assert(iter);
+
+               next=iter->next_;
+
+               int i=0;
+               #ifndef NDEBUG
+               pointer obj_=obj;
+               #endif
+
+               for(;iter;iter=next,next=iter?iter->next_:0,i++)
+               {
+                       assert(iter->get()==obj_);
+                       (*iter)=x;
+               }
+
+               assert(obj==x.get());
+
+               return i;
+       }
+
+       //! Swaps the values of two handles without reference counts
+       /*!     \warning not yet implemented. \writeme */
+       handle<value_type> &
+       swap(handle<value_type> &x);
+       /*
+       {
+               assert(0);
+               pointer ptr=x.obj;
+               x.obj=x.get();
+               obj=ptr;
+               return *this;
+       }
+       */
+}; // END of template class rhandle
+
+
+// ========================================================================
+/*!    \class  loose_handle _handle.h  ETL/handle
+**     \brief  Loose Object Handle
+**     \see shared_object, handle
+**     \writeme
+*/
+template <class T>
+class loose_handle
+{
+public:
+
+       typedef T value_type;
+       typedef T& reference;
+       typedef const T& const_reference;
+       typedef T* pointer;
+       typedef const T* const_pointer;
+       typedef int count_type;
+       typedef int size_type;
+
+protected:
+#ifdef _DEBUG
+public:
+#endif
+       value_type *obj;                //!< Pointer to object
+
+public:
+
+       //! Default constructor - empty handle
+       loose_handle():obj(0) {}
+
+       //! Constructor that constructs from a pointer to new object
+       loose_handle(pointer x):obj(x) { }
+
+       //! Default copy constructor
+       loose_handle(const loose_handle<value_type> &x):obj(x.get()) { }
+
+       loose_handle(const handle<value_type> &x):obj(x.get()) { }
+
+       template <class U> const loose_handle<value_type> &
+       operator=(const handle<U> &x)
+       {
+               if(x.get()==obj)
+                       return *this;
+
+               obj=static_cast<value_type*>(x.get());
+               return *this;
+       }
+
+       template <class U> const loose_handle<value_type> &
+       operator=(const loose_handle<U> &x)
+       {
+               if(x.get()==obj)
+                       return *this;
+
+               obj=static_cast<value_type*>(x.get());
+               return *this;
+       }
+
+       //! Assignment operator
+       const loose_handle<value_type> &
+       operator=(const loose_handle<value_type> &x)
+       {
+               if(x.get()==obj)
+                       return *this;
+
+               obj=x.get();
+               return *this;
+       }
+
+       //! Swaps the values of two handles without reference counts
+       loose_handle<value_type> &
+       swap(loose_handle<value_type> &x)
+       {
+               pointer ptr=x.obj;
+               x.obj=x.get();
+               obj=ptr;
+               return *this;
+       }
+
+       //! Handle release procedure
+       void detach() { obj=0;  }
+
+       // This will be reintroduced with a new function
+       //void release() { detach(); }
+
+       void reset() { detach(); }
+
+       bool empty()const { return obj==0; }
+
+       handle<value_type> clone()const { assert(obj); return obj->clone(); }
+
+       //! Returns a constant handle to our object
+       loose_handle<const value_type> constant()const { return *this; }
+
+       //! Returns number of instances
+       count_type
+       count()const
+               { return obj?obj->count():0; }
+
+       reference
+       operator*()const
+               { assert(obj); return *obj; }
+
+       pointer
+       operator->()const
+               { assert(obj); return obj; }
+
+       //! static_cast<> overload
+       //template <class U>
+       //operator loose_handle<U>()const
+       //{ return loose_handle<U>(static_cast<U*>(obj)); }
+
+       //! static_cast<> overload (for consts)
+       operator loose_handle<const value_type>()const
+       { return loose_handle<const value_type>(static_cast<const_pointer>(obj)); }
+
+       operator handle<value_type>()const
+       { return handle<value_type>(obj); }
+
+       operator rhandle<value_type>()const
+       { return rhandle<value_type>(obj); }
+
+       //! Returns pointer to the object that is being wrapped
+       pointer get()const { return obj; }
+
+       //! More explicit bool cast
+       operator bool()const
+               { return obj!=0; }
+
+       bool
+       operator!()const
+               { return !obj; }
+
+       void ref() { if(obj)obj->ref(); }
+
+       bool unref() { if(obj && !obj->unref()){ obj=0; return false; } return true; }
+}; // END of template class loose_handle
+
+// cast loose_handle<> -> handle<>
+template <class T> template <class U> handle<T> handle<T>::cast_static    (const loose_handle<U>& x) { return handle<T>(static_cast     <T*>(x.get())); }
+template <class T> template <class U> handle<T> handle<T>::cast_dynamic           (const loose_handle<U>& x) { return handle<T>(dynamic_cast    <T*>(x.get())); }
+template <class T> template <class U> handle<T> handle<T>::cast_const     (const loose_handle<U>& x) { return handle<T>(const_cast              <T*>(x.get())); }
+template <class T> template <class U> handle<T> handle<T>::cast_reinterpret(const loose_handle<U>& x) { return handle<T>(reinterpret_cast<T*>(x.get())); }
+
+// cast rhandle_handle<> -> handle<>
+template <class T> template <class U> handle<T> handle<T>::cast_static    (const rhandle<U>&      x) { return handle<T>(static_cast     <T*>(x.get())); }
+template <class T> template <class U> handle<T> handle<T>::cast_dynamic           (const rhandle<U>&      x) { return handle<T>(dynamic_cast    <T*>(x.get())); }
+template <class T> template <class U> handle<T> handle<T>::cast_const     (const rhandle<U>&      x) { return handle<T>(const_cast              <T*>(x.get())); }
+template <class T> template <class U> handle<T> handle<T>::cast_reinterpret(const rhandle<U>&     x) { return handle<T>(reinterpret_cast<T*>(x.get())); }
+
+// cast U* -> handle<>
+template <class T> template <class U> handle<T> handle<T>::cast_static    (U*                                     x) { return handle<T>(static_cast     <T*>(x));               }
+template <class T> template <class U> handle<T> handle<T>::cast_dynamic           (U*                                     x) { return handle<T>(dynamic_cast    <T*>(x));               }
+template <class T> template <class U> handle<T> handle<T>::cast_const     (U*                                     x) { return handle<T>(const_cast              <T*>(x));               }
+template <class T> template <class U> handle<T> handle<T>::cast_reinterpret(U*                                    x) { return handle<T>(reinterpret_cast<T*>(x));               }
+
+// operator== for handle<>, loose_handle<> and T*
+template <class T,class U> bool operator==(const handle                 <T>& lhs,const handle          <U>& rhs) { return (lhs.get()==rhs.get()); }
+template <class T,class U> bool operator==(const loose_handle<T>& lhs,const loose_handle<U>& rhs) { return (lhs.get()==rhs.get()); }
+template <class T,class U> bool operator==(const handle                 <T>& lhs,const loose_handle<U>& rhs) { return (lhs.get()==rhs.get()); }
+template <class T,class U> bool operator==(const loose_handle<T>& lhs,const handle             <U>& rhs) { return (lhs.get()==rhs.get()); }
+template <class T>                bool operator==(const handle<T>&               lhs,const T*                           rhs) { return (lhs.get()==rhs);           }
+template <class T>                bool operator==(const loose_handle<T>& lhs,const T*                           rhs) { return (lhs.get()==rhs);           }
+template <class T>                bool operator==(const T*                               lhs,const handle<T>&           rhs) { return (lhs              ==rhs.get()); }
+template <class T>                bool operator==(const T*                               lhs,const loose_handle<T>& rhs) { return (lhs          ==rhs.get()); }
+
+// operator!= for handle<>, loose_handle<> and T*
+template <class T,class U> bool operator!=(const handle                 <T>& lhs,const handle          <U>& rhs) { return (lhs.get()!=rhs.get()); }
+template <class T,class U> bool operator!=(const loose_handle<T>& lhs,const loose_handle<U>& rhs) { return (lhs.get()!=rhs.get()); }
+template <class T,class U> bool operator!=(const handle                 <T>& lhs,const loose_handle<U>& rhs) { return (lhs.get()!=rhs.get()); }
+template <class T,class U> bool operator!=(const loose_handle<T>& lhs,const handle             <U>& rhs) { return (lhs.get()!=rhs.get()); }
+template <class T>                bool operator!=(const handle<T>&               lhs,const T*                           rhs) { return (lhs.get()!=rhs);           }
+template <class T>                bool operator!=(const loose_handle<T>& lhs,const T*                           rhs) { return (lhs.get()!=rhs);           }
+template <class T>                bool operator!=(const T*                               lhs,const handle<T>&           rhs) { return (lhs              !=rhs.get()); }
+template <class T>                bool operator!=(const T*                               lhs,const loose_handle<T>& rhs) { return (lhs          !=rhs.get()); }
+
+// operator< for handle<>, loose_handle<> and T*
+template <class T,class U> bool operator<(const handle<T>&               lhs,const handle<U>&           rhs) { return (lhs.get()<rhs.get());  }
+template <class T,class U> bool operator<(const loose_handle<T>&  lhs,const loose_handle<U>& rhs) { return (lhs.get()<rhs.get());  }
+template <class T,class U> bool operator<(const handle<T>&               lhs,const loose_handle<U>& rhs) { return (lhs.get()<rhs.get());  }
+template <class T,class U> bool operator<(const loose_handle<T>&  lhs,const handle<U>&          rhs) { return (lhs.get()<rhs.get());  }
+template <class T>                bool operator<(const handle<T>&                lhs,const T*                           rhs) { return (lhs.get()<rhs);            }
+template <class T>                bool operator<(const loose_handle<T>&  lhs,const T*                           rhs) { return (lhs.get()<rhs);            }
+template <class T>                bool operator<(const T*                                lhs,const handle<T>&           rhs) { return (lhs              <rhs.get());  }
+template <class T>                bool operator<(const T*                                lhs,const loose_handle<T>& rhs) { return (lhs          <rhs.get());  }
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_hermite.h b/ETL/tags/0.4.11/ETL/_hermite.h
new file mode 100644 (file)
index 0000000..dbec57a
--- /dev/null
@@ -0,0 +1,174 @@
+/*! ========================================================================
+** Extended Template Library
+** Hermite Template Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_HERMITE_H
+#define __ETL_HERMITE_H
+
+/* === H E A D E R S ======================================================= */
+
+#include "bezier"
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+/*
+template <typename T>
+class hermite_base : std::unary_function<float,T>
+{
+public:
+       typedef T value_type;
+       typedef float time_type;
+private:
+       affine_combo<value_type,time_type> affine_func;
+       value_type a,b,c,d;
+       time_type r,s;
+
+       value_type _coeff[3];
+       time_type drs; // reciprocal of (s-r)
+public:
+       hermite_base():r(0.0),s(1.0) { drs=1.0/(s-r); }
+       hermite_base(
+               const value_type &a, const value_type &b, const value_type &c, const value_type &d,
+               const time_type &r=0.0, const time_type &s=1.0):
+               a(a),b(b),c(c),d(d),r(r),s(s) { sync(); }
+
+       void sync(void)
+       {
+               drs=1.0/(s-r);
+               _coeff[0]=           c;
+               _coeff[1]=-d*1 - c*2 + b*3 - a*3;
+               _coeff[2]= d*1 + c*1 - b*2 + a*2;
+       }
+
+       inline value_type
+       operator()(time_type t)const
+       { t-=r; t*=drs; return a + (_coeff[0]+(_coeff[1]+(_coeff[2])*t)*t)*t; }
+
+       void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=1.0/(s-r); }
+       void set_r(time_type new_r) { r=new_r; drs=1.0/(s-r); }
+       void set_s(time_type new_s) { s=new_s; drs=1.0/(s-r); }
+       const time_type &get_r(void)const { return r; }
+       const time_type &get_s(void)const { return s; }
+       time_type get_dt(void)const { return s-r; }
+
+       value_type &
+       operator[](int i)
+       { return (&a)[i]; }
+
+       const value_type &
+       operator[](int i) const
+       { return (&a)[i]; }
+};
+
+
+template <typename T>
+class hermite : public hermite_base<T>
+{
+public:
+       typedef T value_type;
+       typedef float time_type;
+
+
+
+public:
+       hermite() { }
+       hermite(const value_type &p1, const value_type &p2, const value_type &t1, const value_type &t2):
+       P1(p1),P2(p2),T1(t1),T2(t2) { sync(); }
+       hermite(const value_type &p1, const value_type &p2):
+       P1(p1),P2(p2),T1(p2-p1),T2(p2-p1) { sync(); }
+
+       value_type P1,P2,T1,T2;
+
+       value_type &p1(void) { return P1; }
+       value_type &p2(void) { return P2; }
+       value_type &t1(void) { return T1; }
+       value_type &t2(void) { return T2; }
+
+       void sync(void)
+       {
+//             hermite_base<T>::operator[](0)=P1;
+//             bezier<T>::operator[](1)=P1+T1/3;
+//             bezier<T>::operator[](2)=P2-T2/3;
+//             bezier<T>::operator[](3)=P2;
+
+               hermite_base<T>::operator[](0)=P1;
+               hermite_base<T>::operator[](1)=P2;
+               hermite_base<T>::operator[](2)=T1;
+               hermite_base<T>::operator[](3)=T2;
+
+               hermite_base<T>::sync();
+       }
+
+};
+
+*/
+
+template <typename V,typename T=float>
+class hermite : public bezier<V,T>
+{
+public:
+       typedef V value_type;
+       typedef T time_type;
+
+
+
+public:
+       hermite() { }
+       hermite(const value_type &p1, const value_type &p2, const value_type &t1, const value_type &t2):
+       P1(p1),P2(p2),T1(t1),T2(t2) { sync(); }
+       hermite(const value_type &p1, const value_type &p2):
+       P1(p1),P2(p2),T1(p2-p1),T2(p2-p1) { sync(); }
+
+       value_type P1,P2,T1,T2;
+
+       value_type &p1() { return P1; }
+       value_type &p2() { return P2; }
+       value_type &t1() { return T1; }
+       value_type &t2() { return T2; }
+
+       void sync()
+       {
+               bezier<V,T>::operator[](0)=P1;
+               bezier<V,T>::operator[](1)=P1+T1/3;
+               bezier<V,T>::operator[](2)=P2-T2/3;
+               bezier<V,T>::operator[](3)=P2;
+
+               bezier<V,T>::sync();
+       }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_misc.h b/ETL/tags/0.4.11/ETL/_misc.h
new file mode 100644 (file)
index 0000000..6c84265
--- /dev/null
@@ -0,0 +1,103 @@
+/*! ========================================================================
+** Extended Template and Library
+** Misc
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2007 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__MISC_H_
+#define __ETL__MISC_H_
+
+/* === H E A D E R S ======================================================= */
+#include <cmath>
+
+#include <math.h>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template<typename I, typename T> inline I
+binary_find(I begin, I end, const T& value)
+{
+#if 1
+       I iter(begin+(end-begin)/2);
+
+       while(end-begin>1 && !(*iter==value))
+       {
+               ((*iter<value)?begin:end) = iter;
+
+               iter = begin+(end-begin)/2;
+       }
+       return iter;
+#else
+       size_t len_(end-begin);
+       size_t half_(len_/2);
+
+       I iter(begin);
+       iter+=half_;
+
+       while(len_>1 && !(*iter==value))
+       {
+               ((*iter<value)?begin:end) = iter;
+
+               len_=half_;
+               half_/=2;
+
+               iter=begin;
+               iter+=half_;
+       }
+       return iter;
+#endif
+}
+
+inline int round_to_int(const float x) {
+       /*!     \todo Isn't there some x86 FPU instruction for quickly
+       **      converting a float to a rounded integer? It's worth
+       **      looking into at some point... */
+       // return static_cast<int>(x+0.5f);                     // <-- (a) fast, but rounds -1.333 to 0!
+       // return static_cast<int>(rintf(x));           // <-- (b) slow, but correct
+    if (x>=0) return static_cast<int>(x + 0.5);        // <-- slower than (a), but correct, and faster than (b)
+    else      return static_cast<int>(x - 0.5);
+}
+inline int round_to_int(const double x) {
+       // return static_cast<int>(x+0.5);
+       // return static_cast<int>(rint(x));
+       if (x>=0) return static_cast<int>(x + 0.5);
+    else      return static_cast<int>(x - 0.5);
+}
+
+inline int ceil_to_int(const float x) { return static_cast<int>(ceil(x)); }
+inline int ceil_to_int(const double x) { return static_cast<int>(ceil(x)); }
+
+inline int floor_to_int(const float x) { return static_cast<int>(x); }
+inline int floor_to_int(const double x) { return static_cast<int>(x); }
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_mutex_null.h b/ETL/tags/0.4.11/ETL/_mutex_null.h
new file mode 100644 (file)
index 0000000..6c0d21e
--- /dev/null
@@ -0,0 +1,71 @@
+/*! ========================================================================
+** Extended Template and Library
+** NULL Mutex Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__MUTEX_NULL_H_
+#define __ETL__MUTEX_NULL_H_
+
+/* === H E A D E R S ======================================================= */
+/* === M A C R O S ========================================================= */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class mutex_null
+{
+public:
+
+       mutex_null(){}
+       ~mutex_null(){}
+       //! Exception-safe mutex lock class
+/*
+       class lock
+       {
+               mutex *_mtx;
+       public:
+               lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); }
+               ~lock() { _mtx->unlock_mutex(); }
+               mutex &get() { return *_mtx; }
+       };
+*/
+       class lock
+       {
+       public:
+               lock(mutex_null &/*x*/) { }
+       };
+
+       void lock_mutex(){}
+       bool try_lock_mutex(){return true;}
+       void unlock_mutex(){}
+};
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_mutex_pthreads.h b/ETL/tags/0.4.11/ETL/_mutex_pthreads.h
new file mode 100644 (file)
index 0000000..aed6766
--- /dev/null
@@ -0,0 +1,116 @@
+/*! ========================================================================
+** Extended Template and Library
+** Mutex Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__MUTEX_PTHREADS_H_
+#define __ETL__MUTEX_PTHREADS_H_
+
+/* === H E A D E R S ======================================================= */
+
+#define __USE_GNU
+
+#include <pthread.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* === M A C R O S ========================================================= */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class mutex
+{
+       pthread_mutex_t mtx;
+       pthread_t locker;
+       int depth;
+public:
+
+       mutex()
+       {
+               pthread_mutexattr_t attr;
+               pthread_mutexattr_init(&attr);
+               //#ifdef PTHREAD_PRIO_INHERIT
+               //pthread_mutexattr_setprioceiling(&attr,PTHREAD_PRIO_INHERIT);
+               //#endif
+               #ifdef PTHREAD_MUTEX_RECURSIVE
+               pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
+               #endif
+               pthread_mutex_init(&mtx,&attr);
+               pthread_mutexattr_destroy(&attr);
+               locker=0;
+               depth=0;
+       }
+
+       ~mutex()
+       { pthread_mutex_destroy(&mtx); }
+
+
+       //! Exception-safe mutex lock class
+       class lock
+       {
+               mutex *_mtx;
+       public:
+               lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); }
+               ~lock() { _mtx->unlock_mutex(); }
+               mutex &get() { return *_mtx; }
+       };
+
+       void lock_mutex(void)
+       {
+               if(!locker || locker!=pthread_self())
+               {
+                       pthread_mutex_lock(&mtx);
+                       locker=pthread_self();
+                       depth=0;
+                       return;
+               }
+               depth++;
+       }
+
+       bool try_lock_mutex(void)
+       { return !(bool) pthread_mutex_trylock(&mtx); }
+
+       void unlock_mutex(void)
+       {
+               if(depth)
+               {
+                       depth--;
+                       return;
+               }
+               pthread_mutex_unlock(&mtx);
+               locker=0;
+       }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_mutex_pthreads_simple.h b/ETL/tags/0.4.11/ETL/_mutex_pthreads_simple.h
new file mode 100644 (file)
index 0000000..d95b327
--- /dev/null
@@ -0,0 +1,64 @@
+/*! ========================================================================
+** Extended Template and Library
+** Mutex Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2008 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__MUTEX_PTHREADS_SIMPLE_H_
+#define __ETL__MUTEX_PTHREADS_SIMPLE_H_
+
+/* === H E A D E R S ======================================================= */
+
+#include <pthread.h>
+
+/* === M A C R O S ========================================================= */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class mutex
+{
+       pthread_mutex_t mtx;
+public:
+                       mutex()                 { pthread_mutex_init(&mtx,NULL);        }
+                  ~mutex()                     { pthread_mutex_destroy(&mtx);          }
+       void    lock_mutex()    { pthread_mutex_lock(&mtx);                     }
+       void    unlock_mutex()  { pthread_mutex_unlock(&mtx);           }
+
+       //! Exception-safe mutex lock class
+       class lock
+       {
+               mutex *_mtx;
+       public:
+                lock(mutex &x):_mtx(&x)        { _mtx->lock_mutex();           }
+               ~lock()                                         { _mtx->unlock_mutex();         }
+       };
+};
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_mutex_win32.h b/ETL/tags/0.4.11/ETL/_mutex_win32.h
new file mode 100644 (file)
index 0000000..b7dda75
--- /dev/null
@@ -0,0 +1,82 @@
+/*! ========================================================================
+** Extended Template and Library
+** Mutex Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__MUTEX_WIN32_H_
+#define __ETL__MUTEX_WIN32_H_
+
+/* === H E A D E R S ======================================================= */
+
+#include <windows.h>
+// extern HANDLE CreateMutex(NULL, FALSE, NULL);
+// extern CloseHandle(handle);
+// extern WaitForSingleObject(handle, INFINITE);
+// extern ReleaseMutex(handle);
+
+/* === M A C R O S ========================================================= */
+
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class mutex
+{
+       HANDLE handle;
+public:
+
+       mutex()
+       { handle = CreateMutex(NULL, FALSE, NULL); }
+
+       ~mutex()
+       { CloseHandle(handle); }
+
+       //! Exception-safe mutex lock class
+       class lock
+       {
+               mutex *_mtx;
+       public:
+               lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); }
+               ~lock() { _mtx->unlock_mutex(); }
+               mutex &get() { return *_mtx; }
+       };
+
+       void lock_mutex(void)
+       { WaitForSingleObject(handle, INFINITE); }
+
+       bool try_lock_mutex(void)
+       { return WaitForSingleObject(handle, INFINITE)==WAIT_FAILED; }
+
+       void unlock_mutex(void)
+       { ReleaseMutex(handle); }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_pen.h b/ETL/tags/0.4.11/ETL/_pen.h
new file mode 100644 (file)
index 0000000..aa6bfab
--- /dev/null
@@ -0,0 +1,405 @@
+/*! ========================================================================
+** Extended Template Library
+** Pen Template Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_PEN_H
+#define __ETL_PEN_H
+
+/* === H E A D E R S ======================================================= */
+
+#include "_curve_func.h"
+#include <cassert>
+#include <iterator>
+#include <algorithm>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template<typename T>
+class generic_pen_row_iterator
+{
+public:
+       struct iterator_category : public std::random_access_iterator_tag {};
+       typedef T value_type;
+       typedef int difference_type;
+       typedef value_type* pointer;
+       typedef value_type& reference;
+
+       typedef generic_pen_row_iterator<value_type> self_type;
+
+       pointer data_;
+       int pitch_;
+
+       reference operator[](int i)const { assert(data_); return *(pointer)( (char*)data_+pitch_*i ); }
+       reference operator*()const { assert(data_); return *data_; }
+       pointer operator->() const { assert(data_); return &(operator*()); }
+
+       void inc() { assert(data_); data_ = (pointer)((char*)data_ + pitch_); }
+       void inc(int n) { assert(data_); data_ = (pointer)((char*)data_ + n*pitch_); }
+
+       void dec() { assert(data_); data_ = (pointer)((char*)data_ - pitch_); }
+       void dec(int n) { assert(data_); data_ = (pointer)((char*)data_ - n*pitch_); }
+
+       const self_type &operator++() { assert(data_); inc(); return *this; }
+       const self_type &operator--() { assert(data_); dec(); return *this; }
+
+       self_type operator++(int)
+               { assert(data_); self_type ret(*this); inc(); return ret; }
+       self_type operator--(int)
+               { assert(data_); self_type ret(*this); dec(); return ret; }
+
+       bool operator==(const self_type &rhs)const
+               { return data_==rhs.data_; }
+
+       bool operator!=(const self_type &rhs)const
+               { return data_!=rhs.data_; }
+
+       difference_type operator-(const self_type &rhs)const
+               { assert(data_); return ((char*)data_-(char*)rhs.data_-1)/pitch_+1; }
+
+       self_type operator+(const difference_type &rhs)const
+       {
+               assert(data_);
+               self_type ret(*this);
+               ret.inc(rhs);
+               return ret;
+       }
+
+       self_type operator-(const difference_type &rhs)const
+       {
+               assert(data_);
+               self_type ret(*this);
+               ret.dec(rhs);
+               return ret;
+       }
+
+       operator const generic_pen_row_iterator<const value_type>()const
+       {
+               return generic_pen_row_iterator<const value_type>(data_,pitch_);
+       }
+
+       operator bool()const { return (bool)data_; }
+       bool operator!()const { return !data_; }
+
+       generic_pen_row_iterator(pointer data, int pitch):data_(data),pitch_(pitch) { }
+       generic_pen_row_iterator():data_(NULL) { }
+};
+
+template<typename T, typename AT=T>
+class generic_pen
+{
+public:
+       typedef T value_type;
+       typedef AT accumulator_type;
+       typedef value_type* pointer;
+       typedef const value_type* const_pointer;
+       typedef value_type& reference;
+       typedef const value_type& const_reference;
+
+       typedef pointer iterator_x;
+       typedef const_pointer const_iterator_x;
+
+       typedef generic_pen_row_iterator<value_type> iterator_y;
+       typedef generic_pen_row_iterator<const value_type> const_iterator_y;
+
+       struct difference_type
+       {
+               typedef int value_type;
+               value_type x,y;
+               difference_type(value_type x, value_type y):x(x),y(y) { }
+               value_type &operator[](int i)const { return i?y:x; }
+       };
+
+protected:
+       int x_,y_;
+       int w_,h_;
+private:
+       int pitch_;
+       value_type value_;
+       value_type *data_;
+
+       typedef generic_pen<T,AT> self_type;
+
+       void addptr(int nbytes)
+       {
+               data_ = (pointer)((char*)data_ + nbytes);
+       }
+
+       void subptr(int nbytes)
+       {
+               data_ = (pointer)((char*)data_ - nbytes);
+       }
+
+public:
+
+       generic_pen(value_type *data, int w, int h, int pitch):
+               x_(0),
+               y_(0),
+               w_(w),
+               h_(h),
+               pitch_(pitch),
+               data_(data)
+       {
+       }
+
+       generic_pen(value_type *data, int w, int h):
+               x_(0),
+               y_(0),
+               w_(w),
+               h_(h),
+               pitch_(sizeof(value_type)*w),
+               data_(data)
+       {
+       }
+
+       generic_pen():data_(NULL) { }
+
+       self_type& move(int a, int b)
+       {
+               assert(data_);
+               x_ += a, y_ += b;
+               addptr(b*pitch_ + a*sizeof(value_type));
+               return *this;
+       }
+       self_type& move_to(int x, int y) { assert(data_); return move(x - x_,y - y_);}
+       void set_value(const value_type &v) { value_=v; }
+
+       void inc_x() { assert(data_); x_++; data_++; }
+       void dec_x() { assert(data_); x_--; data_--; }
+       void inc_y() { assert(data_); y_++; addptr(pitch_); }
+       void dec_y() { assert(data_); y_--; subptr(pitch_); }
+
+       void inc_x(int n) { assert(data_); x_+=n; data_+=n; }
+       void dec_x(int n) { assert(data_); x_-=n; data_-=n; }
+       void inc_y(int n) { assert(data_); y_+=n; data_ = (pointer)((char*)data_ + pitch_*n); }
+       void dec_y(int n) { assert(data_); y_-=n; data_ = (pointer)((char*)data_ - pitch_*n); }
+
+       void put_value(const value_type &v)const { assert(data_); *data_=v; }
+       void put_value()const { assert(data_); put_value(value_); }
+
+       void put_value_clip(const value_type &v)const
+               { if(!clipped()) put_value(v); }
+       void put_value_clip()const { put_value_clip(value_); }
+
+       const_reference get_value()const { assert(data_); return *data_; }
+
+       const_reference get_value_at(int x, int y)const { assert(data_); return ((pointer)(((char*)data_)+y*pitch_))[x]; }
+
+       const_reference get_value_clip_at(int x, int y)const { assert(data_); if(clipped(x,y))return value_type(); return ((pointer)(((char*)data_)+y*pitch_))[x]; }
+
+       value_type get_value_clip()const { assert(data_); if(clipped())return value_type(); return *data_; }
+
+       value_type get_pen_value()const { return value_; }
+
+       void put_hline(int l,const value_type &v)
+       {for(;l>0;l--,inc_x())put_value(v);}
+
+       void put_hline(int l) {put_hline(l,value_);}
+
+       void put_hline_clip(int l, const value_type &v)
+       {l=std::min(l,w_-x_);for(;l>0;l--,inc_x())put_value_clip(v);}
+
+       void put_hline_clip(int l) {put_hline_clip(l,value_);}
+
+       //the put_block functions do not modify the pen
+       void put_block(int h, int w, const value_type &v)
+       {
+               self_type row(*this);
+               for(;h>0;h--,row.inc_y())
+               {
+                       self_type col(row);
+                       col.put_hline(w,v);
+               }
+       }
+
+       void put_block(int h, int w) { put_block(h,w,value_); }
+
+       void put_block_clip(int h, int w, const value_type &v)
+       {
+               self_type row(*this);
+
+               //clip start position
+               if(row.x_ < 0) { w+=row.x_; row.inc_x(-row.x_); }
+               if(row.y_ < 0) { h+=row.y_; row.inc_y(-row.y_); }
+
+               //clip width and height of copy rect
+               h = std::min(h,h_-y_);
+               w = std::min(w,w_-x_);
+
+               //copy rect
+               for(;h>0;h--,row.inc_y())
+               {
+                       self_type col(row);
+                       col.put_hline(w,v);     //already clipped
+               }
+       }
+
+       void put_block_clip(int h, int w) { put_block(h,w,value_); }
+
+
+       iterator_x operator[](int i)const { assert(data_); return (pointer)(((char*)data_)+i*pitch_); }
+
+       iterator_x x() { assert(data_); return data_; }
+       iterator_x begin_x() { assert(data_); return data_-x_; }
+       iterator_x end_x() { assert(data_); return data_-x_+w_; }
+
+       iterator_y y() { assert(data_); return iterator_y(data_,pitch_); }
+       iterator_y begin_y() { assert(data_); return iterator_y((pointer)((char*)data_ - y_*pitch_),pitch_); }
+       iterator_y end_y() { assert(data_); return iterator_y((pointer)((char*)data_ + (h_-y_)*pitch_),pitch_); }
+
+       operator bool()const { return (bool)data_; }
+       bool operator!()const { return !data_; }
+       bool operator==(const self_type &rhs)const { return data_==rhs.data_; }
+       bool operator!=(const self_type &rhs)const { return data_!=rhs.data_; }
+       bool clipped(int x, int y)const { return !(x_+x>=0 && y_+y>=0 && x_+x<w_ && y_+y<h_); }
+       bool clipped()const { return !(x_>=0 && y_>=0 && x_<w_ && y_<h_); }
+
+       difference_type operator-(const self_type &rhs)const
+       {
+               assert(data_);
+               assert(pitch_==rhs.pitch_);
+               int ptr_diff=(char*)data_-(char*)rhs.data_-1;
+               return difference_type(ptr_diff%pitch_/sizeof(value_type)+1,ptr_diff/pitch_);
+       }
+
+       self_type operator+(const difference_type &rhs)const
+       {
+               assert(data_);
+               self_type ret(*this);
+               ret.move(rhs.x,rhs.y);
+               return ret;
+       }
+
+       difference_type diff_begin()const {return difference_type(-x_,-y_);}
+       difference_type diff_end()const {return difference_type(w_-x_,h_-y_);}
+
+       self_type get_start()const      {return *this + diff_begin(); }
+       self_type get_end()const        {return *this + diff_end(); }
+
+       int get_width()const {return w_;}
+       int get_height()const {return h_;}
+
+       int get_w()const {return w_;}
+       int get_h()const {return h_;}
+       int get_pitch()const {return pitch_;}
+};
+
+template <
+       typename PEN_,
+       typename A_=float,
+       class AFFINE_=affine_combo<typename PEN_::value_type,A_>
+>
+class alpha_pen : public PEN_
+{
+public:
+       typedef A_ alpha_type;
+       typedef AFFINE_ affine_func_type;
+
+       typedef typename PEN_::value_type value_type;
+       typedef alpha_pen self_type;
+
+private:
+       alpha_type alpha_;
+
+protected:
+       affine_func_type affine_func_;
+
+public:
+       using PEN_::get_value;
+       using PEN_::get_pen_value;
+       using PEN_::inc_x;
+       using PEN_::dec_x;
+       using PEN_::inc_y;
+       using PEN_::dec_y;
+       using PEN_::clipped;
+       using PEN_::w_;
+       using PEN_::h_;
+       using PEN_::x_;
+       using PEN_::y_;
+
+       alpha_pen(const alpha_type &a = 1, const affine_func_type &func = affine_func_type()):alpha_(a),affine_func_(func) { }
+       alpha_pen(const PEN_ &x, const alpha_type &a=1, const affine_func_type &func=affine_func_type())
+               :PEN_(x),alpha_(a),affine_func_(func) { }
+
+       const alpha_type& get_alpha()const { return alpha_; }
+       void get_alpha(alpha_type &a) const { a=alpha_; }
+       void set_alpha(alpha_type a) { alpha_=a; }
+
+       void put_value(const value_type &v, alpha_type a=1)const
+               { PEN_::put_value(affine_func_(get_value(),v,alpha_*a)); }
+       void put_value()const { put_value(get_pen_value()); }
+       void put_value_alpha(alpha_type a)const { put_value(get_pen_value(),a); }
+       void put_hline(int l, const alpha_type &a = 1){for(;l>0;l--,inc_x())put_value_alpha(a);}
+
+       void put_value_clip(const value_type &v, alpha_type a=1)const
+               { if(!clipped())PEN_::put_value(affine_func_(get_value(),v,alpha_*a)); }
+       void put_value_clip()const { put_value_clip(get_pen_value()); }
+       void put_value_clip_alpha(alpha_type a)const { put_value_clip(get_pen_value(),a); }
+       void put_hline_clip(int l, const alpha_type &a = 1){l=std::min(l,w_-x_);for(;l>0;l--,inc_x())put_value_clip_alpha(a);}
+
+       //the put_block functions do not modify the pen
+       void put_block(int h, int w, const alpha_type &a = 1)
+       {
+               self_type row(*this);
+               for(;h>0;h--,row.inc_y())
+               {
+                       self_type col(row);
+                       col.put_hline(w,a);
+               }
+       }
+
+       void put_block_clip(int h, int w, const alpha_type &a = 1)
+       {
+               self_type row(*this);
+
+               //clip start position
+               if(row.x_ < 0) { w+=row.x_; row.inc_x(-row.x_); }
+               if(row.y_ < 0) { h+=row.y_; row.inc_y(-row.y_); }
+
+               //clip width and height of copy rect
+               h = std::min(h,h_-y_);
+               w = std::min(w,w_-x_);
+
+               //copy rect
+               for(;h>0;h--,row.inc_y())
+               {
+                       self_type col(row);
+                       col.put_hline(w,a);     //already clipped
+               }
+       }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_random.h b/ETL/tags/0.4.11/ETL/_random.h
new file mode 100644 (file)
index 0000000..c358dfc
--- /dev/null
@@ -0,0 +1,138 @@
+/*! ========================================================================
+** Extended Template and Library
+** Random Number Generator Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__RANDOM_H
+#define __ETL__RANDOM_H
+
+/* === H E A D E R S ======================================================= */
+
+/* === M A C R O S ========================================================= */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+/*
+class rand_source_xor
+{
+public:
+       typedef int seed_type;
+       typedef short value_type;
+
+private:
+       short entropy_pool[256];
+       int pool_index;
+
+public:
+       random()
+       {
+               seed(0);
+               mod=offset=0;
+       }
+
+       void seed(const seed_type &x)
+       { pool_index=0; }
+
+       void add_entropy(value_type entropy)
+       {
+               int i;
+               for(i=0;i<POOL_SIZE;i++)
+                       entropy^=(entropy_pool[i]^=entropy*i);
+       }
+
+       void add_entropy(const value_type *entropy, int size)
+       {
+       }
+
+       short get_short()
+       {
+               if(pool_index>POOL_SIZE)
+                       pool_index=0;
+               if(mod)
+                       return entropy_pool[pool_index++]%mod+offset;
+               return entropy_pool[pool_index++];
+       }
+};
+*/
+
+template <class T,int POOL_SIZE=256>
+class random
+{
+public:
+       typedef T value_type;
+       typedef int seed_type;
+
+private:
+       value_type entropy_pool[POOL_SIZE];
+       int pool_index;
+
+       value_type mod,offset;
+
+public:
+       random()
+       {
+               seed(0);
+               mod=offset=0;
+       }
+
+       void seed(const seed_type &x __attribute__ ((unused)))
+       { pool_index=0; }
+
+       void set_range(const value_type &floor,const value_type &ceil)
+       { mod=ceil-floor; offset=floor; }
+
+       void set_range(const value_type &ceil)
+       { mod=ceil; }
+
+       void add_entropy(value_type entropy)
+       {
+               int i;
+               for(i=0;i<POOL_SIZE;i++)
+                       entropy^=(entropy_pool[i]^=entropy*i);
+       }
+
+       void add_entropy(const char *entropy)
+       {
+       }
+
+       value_type operator()(void)
+       {
+               if(pool_index>POOL_SIZE)
+                       pool_index=0;
+               if(mod)
+                       return entropy_pool[pool_index++]%mod+offset;
+               return entropy_pool[pool_index++];
+       }
+};
+
+/* === T Y P E D E F S ===================================================== */
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
+
diff --git a/ETL/tags/0.4.11/ETL/_rect.h b/ETL/tags/0.4.11/ETL/_rect.h
new file mode 100644 (file)
index 0000000..d9ffe64
--- /dev/null
@@ -0,0 +1,171 @@
+/*! ========================================================================
+** Extended Template Library
+** Rectangle Basic Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Adrian Bentley
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_RECT_H
+#define __ETL_RECT_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <functional>
+#include <algorithm>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template < typename T >
+class rect
+{
+public: //type niceties
+       typedef T       value_type;
+
+public: //representation
+
+       value_type      minx,maxx,miny,maxy;
+
+public: //interface
+
+       rect() {}
+
+       rect(const value_type &x1,const value_type &y1)
+       {
+               set_point(x1,y1);
+       }
+
+       rect(const value_type &x1,const value_type &y1,
+                       const value_type &x2,const value_type &y2)
+       {
+               set_point(x1,y1);
+               expand(x2,y2);
+       }
+
+       rect(const rect<T> &o)
+       :minx(o.minx),maxx(o.maxx),miny(o.miny),maxy(o.maxy)
+       {}
+
+       template < typename U >
+       rect(const rect<U> &o)
+       :minx(o.minx),maxx(o.maxx),miny(o.miny),maxy(o.maxy)
+       {}
+
+       void set_point(const value_type &x1,const value_type &y1)
+       {
+               minx = maxx = x1;
+               miny = maxy = y1;
+       }
+
+       void expand(const value_type &x1,const value_type &y1)
+       {
+               minx = std::min(minx,x1);
+               maxx = std::max(maxx,x1);
+               miny = std::min(miny,y1);
+               maxy = std::max(maxy,y1);
+       }
+
+       void set(const value_type &x1,const value_type &y1,
+                       const value_type &x2,const value_type &y2)
+       {
+               minx = x1; maxx = x2;
+               miny = y1; maxy = y2;
+       }
+
+       //HACK HACK HACK (stupid compiler doesn't like default arguments of any type)
+       bool valid() const
+       {
+               return valid(std::less<T>());
+       }
+
+       template < typename F >
+       bool valid(const F & func) const
+       {
+               return func(minx,maxx) && func(miny,maxy);
+       }
+};
+
+template < typename T, typename F >
+inline bool intersect(const rect<T> &r1, const rect<T> &r2, const F & func)
+{
+       /* We wan to do the edge compare test
+                         |-----|
+               |------|         intersecting
+
+               |-----|
+                               |-----| not intersecting
+
+               So we want to compare the mins of the one against the maxs of the other, and
+               visa versa
+
+               by default (exclude edge sharing) less will not be true if they are equal...
+       */
+
+       return func(r1.minx,r2.maxx) &&
+           func(r2.minx,r1.maxx) &&
+           func(r1.miny,r2.maxy) &&
+           func(r2.miny,r1.maxy);
+}
+
+template < typename T >
+inline bool intersect(const rect<T> &r1, const rect<T> &r2)
+{
+       return intersect(r1,r2,std::less<T>());
+}
+
+template < typename T >
+void set_intersect(rect<T> &rout, const rect<T> &r1, const rect<T> &r2)
+{
+       //takes the intersection of the two rectangles
+       rout.minx = std::max(r1.minx,r2.minx);
+       rout.miny = std::max(r1.miny,r2.miny);
+       rout.maxx = std::min(r1.maxx,r2.maxx);
+       rout.maxy = std::min(r1.maxy,r2.maxy);
+}
+
+template < typename T >
+void set_union(rect<T> &rout, const rect<T> &r1, const rect<T> &r2)
+{
+       //takes the union of the two rectangles (bounds both... will contain extra info, but that's ok)
+       rout.set(
+               std::min(r1.minx,r2.minx),
+               std::min(r1.miny,r2.miny),
+               std::max(r1.maxx,r2.maxx),
+               std::max(r1.maxy,r2.maxy));
+       /*rect<T> local = r1;
+       rout.expand(r2.minx,r2.miny);
+       rout.expand(r2.maxx,r2.maxy);
+       rout = local;*/
+}
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_ref_count.h b/ETL/tags/0.4.11/ETL/_ref_count.h
new file mode 100644 (file)
index 0000000..9f05b46
--- /dev/null
@@ -0,0 +1,158 @@
+/*! ========================================================================
+** Extended Template Library
+**
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_REF_COUNT_H
+#define __ETL_REF_COUNT_H
+
+/* === H E A D E R S ======================================================= */
+
+#include "_curve_func.h"
+#include <cassert>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class weak_reference_counter;
+
+// ========================================================================
+/*!    \class  reference_counter       _ref_count.h    ETL/ref_count
+**     \brief  Reference counter
+**     \see weak_reference_counter
+**     \writeme
+*/
+class reference_counter
+{
+       friend class weak_reference_counter;
+private:
+       int* counter_;
+public:
+
+       reference_counter(const bool &x=true):counter_(x?new int(1):0) { }
+
+       reference_counter(const reference_counter &x):counter_(x.counter_)
+               { if(counter_) (*counter_)++; }
+
+       reference_counter(const weak_reference_counter &x);
+
+       ~reference_counter() { detach(); }
+
+       reference_counter& operator=(const reference_counter &rhs)
+       {
+               detach();
+               counter_=rhs.counter_;
+               if(counter_)
+               {
+                       assert(*counter_>0);
+                       (*counter_)++;
+               }
+               return *this;
+       }
+
+       void detach()
+       {
+               if(counter_)
+               {
+                       assert(*counter_>0);
+                       if(!--(*counter_))
+                               delete counter_;
+                       counter_=0;
+               }
+       }
+
+       void reset()
+       {
+               detach();
+               counter_=new int(1);
+       }
+
+       int count()const { return counter_?*counter_:0; }
+
+       bool unique()const { return counter_?*counter_==1:0; }
+
+       operator int()const { return count(); }
+}; // END of class reference_counter
+
+// ========================================================================
+/*!    \class  weak_reference_counter  _ref_count.h    ETL/ref_count
+**     \brief  Weak Reference counter
+**     \see reference_counter
+**     \writeme
+*/
+class weak_reference_counter
+{
+       friend class reference_counter;
+private:
+       int* counter_;
+public:
+       weak_reference_counter():counter_(0) { }
+
+       weak_reference_counter(const weak_reference_counter &x):counter_(x.counter_) { }
+
+       weak_reference_counter(const reference_counter &x):counter_(x.counter_) { }
+
+       ~weak_reference_counter() { }
+
+       weak_reference_counter& operator=(const reference_counter &rhs)
+       {
+               counter_=rhs.counter_;
+               assert(*counter_>0);
+               return *this;
+       }
+
+       weak_reference_counter& operator=(const weak_reference_counter &rhs)
+       {
+               counter_=rhs.counter_;
+               assert(*counter_>0);
+               return *this;
+       }
+
+       void detach() { counter_=0; }
+
+       int count()const { return counter_?*counter_:0; }
+
+       bool unique()const { return counter_?*counter_==1:0; }
+
+       operator int()const { return count(); }
+}; // END of class weak_reference_counter
+
+inline reference_counter::reference_counter(const weak_reference_counter &x):
+       counter_(x.counter_)
+{
+       if(counter_) (*counter_)++;
+}
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_rwlock.h b/ETL/tags/0.4.11/ETL/_rwlock.h
new file mode 100644 (file)
index 0000000..930db26
--- /dev/null
@@ -0,0 +1,93 @@
+/*! ========================================================================
+** Extended Template and Library
+** Mutex Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__RWLOCK_H_
+#define __ETL__RWLOCK_H_
+
+/* === H E A D E R S ======================================================= */
+
+/* === M A C R O S ========================================================= */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class read_write_lock : private Mutex
+{
+public:
+
+       read_write_lock()
+       {  }
+
+       ~read_write_lock()
+       {  }
+
+       //! Exception-safe read-lock class
+       class read_lock
+       {
+               read_write_lock *_mtx;
+       public:
+               read_lock(read_write_lock &x):_mtx(&x) { _mtx->lock_read(); }
+               ~read_lock() { _mtx->unlock_read(); }
+               read_write_lock &get() { return *_mtx; }
+       };
+
+       //! Exception-safe write-lock class
+       class write_lock
+       {
+               read_write_lock *_mtx;
+       public:
+               write_lock(read_write_lock &x):_mtx(&x) { _mtx->lock_write(); }
+               ~read_lock() { _mtx->unlock_write(); }
+               read_write_lock &get() { return *_mtx; }
+       };
+
+       void lock_read(void)
+       { lock_mutex(); }
+
+       void lock_write(void)
+       { lock_mutex(); }
+
+       bool try_lock_read(void)
+       { return try_lock_mutex(); }
+
+       bool try_lock_write(void)
+       { return try_lock_mutex(); }
+
+       void unlock_write(void)
+       { unlock_mutex(); }
+
+       void unlock_read(void)
+       { unlock_mutex(); }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_smach.h b/ETL/tags/0.4.11/ETL/_smach.h
new file mode 100644 (file)
index 0000000..99a7320
--- /dev/null
@@ -0,0 +1,598 @@
+/*! ========================================================================
+** Extended Template and Library
+** State Machine Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2008 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__SMACH_H_
+#define __ETL__SMACH_H_
+
+/* === H E A D E R S ======================================================= */
+
+#include <vector>
+#include <algorithm>
+#include <stdexcept>
+#include "_mutex_null.h"
+#include "_misc.h"
+
+/* === M A C R O S ========================================================= */
+
+#define SMACH_STATE_STACK_SIZE         (32)
+
+#ifdef _MSC_VER
+#pragma warning (disable:4786)
+#pragma warning (disable:4290) // MSVC6 doesn't like function declarations with exception specs
+#endif
+
+//#define ETL_MUTEX_LOCK()             _mutex::lock lock(mutex)
+#define ETL_MUTEX_LOCK()
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+/*! ========================================================================
+** \class      smach
+** \brief      Templatized State Machine
+**
+** A more detailed description needs to be written.
+*/
+template <typename CON, typename K=int, typename M=mutex_null>
+class smach
+{
+public:
+
+       typedef K event_key;
+       typedef M _mutex;
+       typedef CON context_type;
+
+
+       struct egress_exception { };
+       struct pop_exception { };
+
+
+       //! Result type for event processing
+       enum event_result
+       {
+               // These values are returned by the event
+               // handlers cast to state pointers.
+               RESULT_ERROR,           //!< General error or malfunction
+               RESULT_OK,                      //!< Event has been processed
+               RESULT_ACCEPT,          //!< The event has been explicitly accepted.
+               RESULT_REJECT,          //!< The event has been explicitly rejected.
+
+               RESULT_END                      //!< Not a valid result
+       };
+
+       //template<typename T> class state;
+
+       //! Event base class
+       struct event
+       {
+               event_key key;
+
+               event() { }
+               event(const event_key& key):key(key) { }
+
+               operator event_key()const { return key; }
+       };
+
+       //! Event definition class
+       template<typename T>
+       class event_def_internal
+       {
+               // List our friends
+               friend class smach;
+               //friend class state<T>;
+
+       public:
+               typedef T state_context_type;
+
+               //! Event function type
+               typedef event_result (T::*funcptr)(const event&);
+
+       //private:
+
+               event_key id;           //<! Event ID
+               funcptr handler;        //<! Pointer event handler
+
+       public:
+
+               //! Less-than operator for sorting. Based on event_key value.
+               bool operator<(const event_def_internal &rhs)const
+                       { return id<rhs.id; }
+
+               //! Equal-to operator. Based on event_key value.
+               bool operator==(const event_def_internal &rhs)const
+                       { return id==rhs.id; }
+
+               //! Less-than operator for finding.
+               bool operator<(const event_key &rhs)const
+                       { return id<rhs; }
+
+               //! Equal-to operator. Based on event_key value.
+               bool operator==(const event_key &rhs)const
+                       { return id==rhs; }
+
+               //! Trivial Constructor
+               event_def_internal() { }
+
+               //! Constructor for creating an event_def_internal from the given key and function reference.
+               event_def_internal(event_key a, funcptr b):id(a),handler(b) { }
+
+               //! Copy constructor
+               event_def_internal(const event_def_internal &x):id(x.id),handler(x.handler) { }
+
+       };
+
+       class state_base
+       {
+               // Our parent is our friend
+               friend class smach;
+       public:
+               virtual ~state_base() { }
+
+               virtual void* enter_state(context_type* machine_context)const=0;
+
+               virtual bool leave_state(void* state_context)const=0;
+
+               virtual event_result process_event(void* state_context,const event& id)const=0;
+
+               virtual const char *get_name() const=0;
+       };
+
+       //! State class
+       template<typename T>
+       class state : public state_base
+       {
+               // Our parent is our friend
+               friend class smach;
+
+       public:
+               typedef event_def_internal<T> event_def;
+               typedef T state_context_type;
+
+
+       private:
+
+               std::vector<event_def> event_list;
+
+               smach *nested;          //! Nested machine
+               event_key low,high;     //! Lowest and Highest event values
+               const char *name;       //! Name of the state
+               typename event_def::funcptr default_handler;    //! Default handler for unknown key
+
+       public:
+
+               //! Constructor
+               state(const char *n, smach* nest=0):
+                       nested(nest),name(n),default_handler(NULL)
+               { }
+
+               virtual ~state() { }
+
+               //! Setup a nested state machine
+               /*! A more detailed explanation needs to be written */
+               void set_nested_machine(smach *sm) { nested=sm; }
+
+               //! Sets the default handler
+               void set_default_handler(const typename event_def::funcptr &x) { default_handler=x; }
+
+               //! Returns given the name of the state
+               virtual const char *get_name() const { return name; }
+
+               state_context_type& get_context(smach& machine)
+               {
+                       state_context_type *context(dynamic_cast<state_context_type*>(machine.state_context));
+                       if(context)
+                               return context;
+
+               }
+
+               //! Adds an event_def onto the list and then make sure it is sorted correctly.
+               void
+               insert(const event_def &x)
+               {
+                       // If this is our first event_def,
+                       // setup the high and low values.
+                       if(!event_list.size())
+                               low=high=x.id;
+
+                       // Sort the event_def onto the list
+                       event_list.push_back(x);
+                       sort(event_list.begin(),event_list.end());
+
+                       // Update the low and high markers
+                       if(x.id<low)
+                               low=x.id;
+                       if(high<x.id)
+                               high=x.id;
+               }
+
+               typename std::vector<event_def>::iterator find(const event_key &x) { return binary_find(event_list.begin(),event_list.end(),x); }
+               typename std::vector<event_def>::const_iterator find(const event_key &x)const { return binary_find(event_list.begin(),event_list.end(),x); }
+
+       protected:
+
+               virtual void* enter_state(context_type* machine_context)const
+               {
+                       return new state_context_type(machine_context);
+               }
+
+               virtual bool leave_state(void* x)const
+               {
+                       state_context_type* state_context(reinterpret_cast<state_context_type*>(x));
+                       delete state_context;
+                       return true;
+               }
+
+               virtual event_result
+               process_event(void* x,const event& id)const
+               {
+                       state_context_type* state_context(reinterpret_cast<state_context_type*>(x));
+
+                       // Check for nested machine in state
+                       if(nested)
+                       {
+                               const event_result ret(nested->process_event(id));
+                               if(ret!=RESULT_OK)
+                                       return ret;
+                       }
+
+                       // Quick test to make sure that the
+                       // given event is in the state
+                       if(id.key<low || high<id.key)
+                               return RESULT_OK;
+
+                       // Look for the event
+                       typename std::vector<event_def>::const_iterator iter(find(id.key));
+
+                       // If search results were negative, fail.
+                       if(iter->id!=id.key)
+                               return RESULT_OK;
+
+                       // Execute event function
+                       event_result ret((state_context->*(iter->handler))(id));
+
+                       if(ret==RESULT_OK && default_handler)
+                               ret=(state_context->*(default_handler))(id);
+
+                       return ret;
+               }
+       };
+
+private:
+
+       // Machine data
+       const state_base* curr_state;   //!< Current state of the machine
+       smach* child;                              //!< Child machine
+
+public: // this really should be private
+       void* state_context;            //!< State Context
+private:
+
+       context_type* machine_context;          //!< Machine Context
+
+       const state_base* default_state;
+       void*   default_context;
+
+#ifdef ETL_MUTEX_LOCK
+       _mutex mutex;
+#endif
+
+       //! State stack data
+       const state_base*       state_stack[SMACH_STATE_STACK_SIZE];
+       void*                           state_context_stack[SMACH_STATE_STACK_SIZE];
+       int                             states_on_stack;
+
+public:
+
+       //! Gets the name of the currently active state
+       const char *
+       get_state_name()const
+       {
+#ifdef ETL_MUTEX_LOCK
+               ETL_MUTEX_LOCK();
+#endif
+               if(curr_state)
+                       return curr_state->get_name();
+               if(default_state)
+                       return default_state->get_name();
+               return 0;
+       }
+
+       //! Determines if a given event result is an error
+       /*! This function allows us to quickly see
+               if an event_result contained an error */
+       static bool
+       event_error(const event_result &rhs)
+               { return rhs<=RESULT_ERROR; }
+
+       bool
+       set_default_state(const state_base *nextstate)
+       {
+#ifdef ETL_MUTEX_LOCK
+               ETL_MUTEX_LOCK();
+#endif
+               // Keep track of the current state unless
+               // the state switch fails
+               const state_base *prev_state=default_state;
+
+               // If we are already in a state, leave it and
+               // collapse the state stack
+               if(default_state)
+                       default_state->leave_state(default_context);
+
+               // Set this as our current state
+               default_state=nextstate;
+               default_context=0;
+
+               // Attempt to enter the state
+               if(default_state)
+               {
+                       default_context=default_state->enter_state(machine_context);
+                       if(default_context)
+                               return true;
+               }
+               else
+                       return true;
+
+               // We failed, so attempt to return to previous state
+               default_state=prev_state;
+
+               // If we had a previous state, enter it
+               if(default_state)
+                       default_context=default_state->enter_state(machine_context);
+
+               // At this point we are not in the
+               // requested state, so return failure
+               return false;
+       }
+
+       //! Leaves the current state
+       /*! Effectively makes the state_depth() function return zero. */
+       bool
+       egress()
+       {
+#ifdef ETL_MUTEX_LOCK
+               ETL_MUTEX_LOCK();
+#endif
+
+               // Pop all states off the state stack
+               while(states_on_stack) pop_state();
+
+               // If we are not in a state, then I guess
+               // we were successful.
+               if(!curr_state)
+                       return true;
+
+               // Grab the return value from the exit function
+               bool ret=true;
+
+               const state_base* old_state=curr_state;
+               void *old_context=state_context;
+
+               // Clear out the current state and its state_context
+               curr_state=0;state_context=0;
+
+               // Leave the state
+               return old_state->leave_state(old_context);
+
+               return ret;
+       }
+
+       //! State entry function
+       /*! Attempts to enter the given state,
+               popping off all states on the stack
+               in the process. */
+       bool
+       enter(const state_base *nextstate)
+       {
+#ifdef ETL_MUTEX_LOCK
+               ETL_MUTEX_LOCK();
+#endif
+
+               // Keep track of the current state unless
+               // the state switch fails
+               const state_base *prev_state=curr_state;
+
+               // If we are already in a state, leave it and
+               // collapse the state stack
+               if(curr_state)
+                       egress();
+
+               // Set this as our current state
+               curr_state=nextstate;
+               state_context=0;
+
+               // Attempt to enter the state
+               state_context=curr_state->enter_state(machine_context);
+               if(state_context)
+                       return true;
+
+               // We failed, so attempt to return to previous state
+               curr_state=prev_state;
+
+               // If we had a previous state, enter it
+               if(curr_state)
+                       state_context=curr_state->enter_state(machine_context);
+
+               // At this point we are not in the
+               // requested state, so return failure
+               return false;
+       }
+
+       //! Pushes state onto state stack
+       /*! This allows you to enter a state without
+               leaving your current state.
+               \param   nextstate Pointer to the state to enter
+               \sa      pop_state()
+       */
+       bool
+       push_state(const state_base *nextstate)
+       {
+#ifdef ETL_MUTEX_LOCK
+               ETL_MUTEX_LOCK();
+#endif
+
+               // If there are not enough slots, then throw something.
+               if(states_on_stack==SMACH_STATE_STACK_SIZE)
+                       throw(std::overflow_error("smach<>::push_state(): state stack overflow!"));
+
+               // If there is no current state, nor anything on stack,
+               // just go ahead and enter the given state.
+               if(!curr_state && !states_on_stack)
+                       return enter(nextstate);
+
+               // Push the current state onto the stack
+               state_stack[states_on_stack]=curr_state;
+               state_context_stack[states_on_stack++]=state_context;
+
+               // Make the next state the current state
+               curr_state=nextstate;
+
+               // Try to enter the next state
+               state_context=curr_state->enter_state(machine_context);
+               if(state_context)
+                       return true;
+
+               // Unable to push state, return to old one
+               curr_state=state_stack[--states_on_stack];
+               state_context=state_context_stack[states_on_stack];
+               return false;
+       }
+
+       //! Pops state off of state stack
+       /*! Decreases state depth */
+       void
+       pop_state()
+       {
+#ifdef ETL_MUTEX_LOCK
+               ETL_MUTEX_LOCK();
+#endif
+
+               // If we aren't in a state, then there is nothing
+               // to do.
+               if(!curr_state)
+                       throw(std::underflow_error("smach<>::pop_state(): stack is empty!"));
+
+               if(states_on_stack)
+               {
+                       const state_base* old_state=curr_state;
+                       void *old_context=state_context;
+
+                       // Pop previous state off of stack
+                       --states_on_stack;
+                       curr_state=state_stack[states_on_stack];
+                       state_context=state_context_stack[states_on_stack];
+
+                       old_state->leave_state(old_context);
+               }
+               else // If there are no states on stack, just egress
+                       egress();
+       }
+
+       //! State Machine Constructor
+       /*! A more detailed description needs to be written */
+       smach(context_type* machine_context=0):
+               curr_state(0),
+               child(0),
+               state_context(0),
+               machine_context(machine_context),
+               default_state(0),
+               default_context(0),
+               states_on_stack(0)
+       { }
+
+       //! The destructor
+       ~smach()
+       {
+               egress();
+
+               if(default_state)
+                       default_state->leave_state(default_context);
+       }
+
+       //! Sets up a child state machine
+       /*! A child state machine runs in parallel with
+               its parent, and gets event priority. This
+               mechanism is useful in cases where an inherited
+               object has its own state machine. */
+       void set_child(smach *x)
+       {
+#ifdef ETL_MUTEX_LOCK
+               ETL_MUTEX_LOCK();
+#endif
+               child=x;
+       }
+
+       //! Returns the number states currently active
+       int
+       state_depth()
+               { return curr_state?states_on_stack+1:0; }
+
+       event_result
+       process_event(const event_key& id) { return process_event(event(id)); }
+
+       //! Process an event
+       event_result
+       process_event(const event& id)
+       {
+#ifdef ETL_MUTEX_LOCK
+               ETL_MUTEX_LOCK();
+#endif
+
+               event_result ret(RESULT_OK);
+
+               // Check for child machine
+               if(child)
+               {
+                       ret=child->process_event(id);
+                       if(ret!=RESULT_OK)
+                               return ret;
+               }
+
+               try
+               {
+                       if(curr_state)
+                               ret=curr_state->process_event(state_context,id);
+
+                       if(ret==RESULT_OK)
+                               return default_state->process_event(default_context,id);
+
+                       return ret;
+               }
+               catch(egress_exception) { return egress()?RESULT_ACCEPT:RESULT_ERROR; }
+               catch(pop_exception) { pop_state(); return RESULT_ACCEPT; }
+               catch(const state_base* state) { return enter(state)?RESULT_ACCEPT:RESULT_ERROR; }
+       }
+
+}; // END of template class smach
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_smart_ptr.h b/ETL/tags/0.4.11/ETL/_smart_ptr.h
new file mode 100644 (file)
index 0000000..a34b8dd
--- /dev/null
@@ -0,0 +1,363 @@
+/* ========================================================================
+** Extended Template and Library
+** Template Smart Pointer Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__SMART_PTR_H
+#define __ETL__SMART_PTR_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <cassert>
+#include "_ref_count.h"
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template <class T>
+struct generic_deleter
+{
+       void operator()(T* x)const { delete x; }
+};
+
+template <class T>
+struct array_deleter
+{
+       void operator()(T* x)const { delete [] x; }
+};
+
+// ========================================================================
+/*!    \class  smart_ptr       _smart_ptr.h    ETL/smart_ptr
+**     \brief  Object Smart Pointer
+**     \see loose_smart_ptr
+**     \writeme
+*/
+template <class T, class D=generic_deleter<T> >
+class smart_ptr
+{
+public:
+
+       typedef T value_type;
+       typedef T& reference;
+       typedef const T& const_reference;
+       typedef T* pointer;
+       typedef const T* const_pointer;
+       typedef int count_type;
+       typedef int size_type;
+       typedef D destructor_type;
+
+#ifdef DOXYGEN_SHOULD_SKIP_THIS                // #ifdef is not a typo
+private:
+#endif
+       value_type *obj;                //!< \internal Pointer to object
+       reference_counter refcount;
+
+public:
+       // Private constructor for convenience
+       smart_ptr(value_type* obj,reference_counter refcount):obj(obj),refcount(refcount) {  }
+
+       //! Default constructor - empty smart_ptr
+       smart_ptr():obj(0),refcount(false) {}
+
+       //! Constructor that constructs from a pointer to new object
+       /*! A new smart_ptr is created with a pointer
+               to a newly allocated object. We need
+               to be explicit with this so we don't
+               accidently have two smart_ptrs for one
+               object -- that would be bad.    */
+       explicit smart_ptr(value_type* x):obj(x),refcount(x?true:false) {  }
+
+       //! Template copy constructor
+       /*! This template constructor allows us to cast
+               smart_ptrs much like we would pointers. */
+#ifdef _WIN32
+       template <class U>
+       smart_ptr(const smart_ptr<U> &x):obj((pointer)&*x.obj),refcount(x.refcount())
+               { }
+#endif
+
+       //! Default copy constructor
+       /*! The template above is not good enough
+               for all compilers. We need to explicitly
+               define the copy constructor for this
+               class to work on those compilers. */
+       smart_ptr(const smart_ptr<value_type> &x):obj(x.obj),refcount(x.refcount) {  }
+
+       explicit smart_ptr(const value_type &x):obj(new value_type(x)) { }
+
+       //! smart_ptr is released on deletion
+       ~smart_ptr() { if(refcount.unique()) destructor_type()(obj); }
+
+       //! Template Assignment operator
+       template <class U> const smart_ptr<value_type> &
+       operator=(const smart_ptr<U> &x)
+       {
+               if(x.get()==obj)
+                       return *this;
+
+               reset();
+
+               if(x.obj)
+               {
+                       obj=(pointer)x.get();
+                       refcount=x.refcount;
+               }
+
+               return *this;
+       }
+
+       //! Assignment operator
+       const smart_ptr<value_type> &
+       operator=(const smart_ptr<value_type> &x)
+       {
+               if(x.get()==obj)
+                       return *this;
+
+               reset();
+
+               if(x.obj)
+               {
+
+                       obj=(pointer)x.get();
+                       refcount=x.refcount;
+               }
+
+               return *this;
+       }
+
+       //! smart_ptr reset procedure
+       void
+       reset()
+       {
+               if(obj)
+               {
+                       if(refcount.unique()) destructor_type()(obj);
+                       refcount.detach();
+                       obj=0;
+               }
+       }
+
+       void spawn() { operator=(smart_ptr(new T)); }
+
+       //! Returns number of instances
+       const count_type& count()const { return refcount; }
+
+       //! Returns true if there is only one instance of the object
+       bool unique()const { return refcount.unique(); }
+
+       //! Returns a constant handle to our object
+       smart_ptr<const value_type> constant() { return *this; }
+
+       reference operator*()const { assert(obj); return *obj; }
+
+       pointer operator->()const { assert(obj); return obj; }
+
+
+       operator smart_ptr<const value_type>()const
+       { return smart_ptr<const value_type>(static_cast<const_pointer>(obj)); }
+
+       //! static_cast<> wrapper
+       template <class U> static
+       smart_ptr<T> cast_static(const smart_ptr<U> &x)
+       { if(!x)return NULL; return smart_ptr<T>(static_cast<T*>(x.get()),x.refcount); }
+
+       //! dynamic_cast<> wrapper
+       template <class U> static
+       smart_ptr<T> cast_dynamic(const smart_ptr<U> &x)
+       { if(!x)return 0; return smart_ptr<T>(dynamic_cast<T*>(x.get()),x.refcount); }
+
+       //! const_cast<> wrapper
+       template <class U> static
+       smart_ptr<T> cast_const(const smart_ptr<U> &x)
+       { if(!x)return 0; return smart_ptr<T>(const_cast<T*>(x.get()),x.refcount); }
+
+       pointer get()const { return obj; }
+
+       //! More explicit bool cast
+       operator bool()const { return obj!=0; }
+
+       bool operator!()const { return !obj; }
+
+       //! Overloaded cast operator -- useful for implicit casts
+       template <class U>
+       operator smart_ptr<U>()
+       {
+               // This next line should provide a syntax check
+               // to make sure that this cast makes sense.
+               // If it doesn't, this should have a compiler error.
+               // Otherwise, it should get optimized right out
+               // of the code.
+               //(U*)obj;
+
+               return *reinterpret_cast<smart_ptr<U>*>(this);
+       }
+
+}; // END of template class smart_ptr
+
+// ========================================================================
+/*!    \class  loose_smart_ptr _smart_ptr.h    ETL/smart_ptr
+**     \brief  Loose Object Smart Pointer
+**     \see smart_ptr
+**     \writeme
+*/
+template <class T>
+class loose_smart_ptr
+{
+public:
+
+       typedef T value_type;
+       typedef T& reference;
+       typedef const T& const_reference;
+       typedef T* pointer;
+       typedef const T* const_pointer;
+       typedef int count_type;
+       typedef int size_type;
+
+private:
+       value_type *obj;                //!< \internal Pointer to object
+       weak_reference_counter refcount;        //!< \internal Pointer to object's reference counter
+
+public:
+
+       //! Default constructor - empty smart_ptr
+       loose_smart_ptr():obj(0),refcount(0) {}
+
+       //! Default copy constructor
+       loose_smart_ptr(const loose_smart_ptr<value_type> &x):obj(x.get()),refcount(x.refcount) { }
+
+       loose_smart_ptr(const smart_ptr<value_type> &x):obj(x.get()),refcount(x.refcount) { }
+
+       void reset() { obj=0,refcount=0; }
+
+       operator smart_ptr<value_type>()
+       {
+               return smart_ptr<value_type>(static_cast<pointer>(obj),refcount);
+       }
+
+       operator smart_ptr<const value_type>()
+       {
+               return smart_ptr<const value_type>(static_cast<const_pointer>(obj),refcount);
+       }
+
+       //! Returns number of instances
+       const count_type& count()const { return refcount; }
+
+       bool unique()const { return refcount.unique(); }
+
+       reference operator*()const { assert(obj); return *obj; }
+
+       pointer operator->()const { assert(obj); return obj; }
+
+       pointer get()const { return obj; }
+
+       bool operator!()const { return !obj; }
+};
+
+template <class T,class U> bool
+operator==(const smart_ptr<T> &lhs,const smart_ptr<U> &rhs)
+       { return (lhs.get()==rhs.get()); }
+template <class T,class U> bool
+operator==(const loose_smart_ptr<T> &lhs,const loose_smart_ptr<U> &rhs)
+       { return (lhs.get()==rhs.get()); }
+template <class T,class U> bool
+operator==(const smart_ptr<T> &lhs,const loose_smart_ptr<U> &rhs)
+       { return (lhs.get()==rhs.get()); }
+template <class T,class U> bool
+operator==(const loose_smart_ptr<T> &lhs,const smart_ptr<U> &rhs)
+       { return (lhs.get()==rhs.get()); }
+template <class T> bool
+operator==(const smart_ptr<T> &lhs,const T *rhs)
+       { return (lhs.get()==rhs); }
+template <class T> bool
+operator==(const loose_smart_ptr<T> &lhs,const T *rhs)
+       { return (lhs.get()==rhs); }
+template <class T> bool
+operator==(const T *lhs,const smart_ptr<T> &rhs)
+       { return (lhs==rhs.get()); }
+template <class T> bool
+operator==(const T *lhs,const loose_smart_ptr<T> &rhs)
+       { return (lhs==rhs.get()); }
+
+
+template <class T,class U> bool
+operator!=(const smart_ptr<T> &lhs,const smart_ptr<U> &rhs)
+       { return (lhs.get()!=rhs.get()); }
+template <class T,class U> bool
+operator!=(const loose_smart_ptr<T> &lhs,const loose_smart_ptr<U> &rhs)
+       { return (lhs.get()!=rhs.get()); }
+template <class T,class U> bool
+operator!=(const smart_ptr<T> &lhs,const loose_smart_ptr<U> &rhs)
+       { return (lhs.get()!=rhs.get()); }
+template <class T,class U> bool
+operator!=(const loose_smart_ptr<T> &lhs,const smart_ptr<U> &rhs)
+       { return (lhs.get()!=rhs.get()); }
+template <class T> bool
+operator!=(const smart_ptr<T> &lhs,const T *rhs)
+       { return (lhs.get()!=rhs); }
+template <class T> bool
+operator!=(const loose_smart_ptr<T> &lhs,const T *rhs)
+       { return (lhs.get()!=rhs); }
+template <class T> bool
+operator!=(const T *lhs,const smart_ptr<T> &rhs)
+       { return (lhs!=rhs.get()); }
+template <class T> bool
+operator!=(const T *lhs,const loose_smart_ptr<T> &rhs)
+       { return (lhs!=rhs.get()); }
+
+
+template <class T,class U> bool
+operator<(const smart_ptr<T> &lhs,const smart_ptr<U> &rhs)
+       { return (lhs.get()<rhs.get()); }
+template <class T,class U> bool
+operator<(const loose_smart_ptr<T> &lhs,const loose_smart_ptr<U> &rhs)
+       { return (lhs.get()<rhs.get()); }
+template <class T,class U> bool
+operator<(const smart_ptr<T> &lhs,const loose_smart_ptr<U> &rhs)
+       { return (lhs.get()<rhs.get()); }
+template <class T,class U> bool
+operator<(const loose_smart_ptr<T> &lhs,const smart_ptr<U> &rhs)
+       { return (lhs.get()<rhs.get()); }
+template <class T> bool
+operator<(const smart_ptr<T> &lhs,const T *rhs)
+       { return (lhs.get()<rhs); }
+template <class T> bool
+operator<(const loose_smart_ptr<T> &lhs,const T *rhs)
+       { return (lhs.get()<rhs); }
+template <class T> bool
+operator<(const T *lhs,const smart_ptr<T> &rhs)
+       { return (lhs<rhs.get()); }
+template <class T> bool
+operator<(const T *lhs,const loose_smart_ptr<T> &rhs)
+       { return (lhs<rhs.get()); }
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_status.h b/ETL/tags/0.4.11/ETL/_status.h
new file mode 100644 (file)
index 0000000..eac6178
--- /dev/null
@@ -0,0 +1,69 @@
+#ifdef THIS_CODE_IS_NOT_USED
+/*! ========================================================================
+** Extended Template Library
+** Status Callback Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2007 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_STATUS_H
+#define __ETL_STATUS_H
+
+/* === H E A D E R S ======================================================= */
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+class status
+{
+public:
+       virtual ~ProgressCallback() { }
+
+       virtual bool task(const std::string &task) { return true; }
+
+#warning this task(task) thing looks wrong, but the code isn't used, so let's not worry
+       virtual void push_task(const std::string &task,int start=0, int end=100, int total=100)
+               { task(task); }
+       virtual void pop_task() { return; }
+
+       virtual void warning(const std::string &warn) { return; }
+       virtual void error(const std::string &err) { return; }
+
+       virtual bool amount_complete(int current, int total) { return true; }
+       virtual bool amount_complete(float percent)
+               { return amount_complete((int)(percent*10000),10000); }
+};
+
+_ETL_END_NAMESPACE
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
+#endif /* THIS_CODE_IS_NOT_USED */
diff --git a/ETL/tags/0.4.11/ETL/_stringf.h b/ETL/tags/0.4.11/ETL/_stringf.h
new file mode 100644 (file)
index 0000000..6962799
--- /dev/null
@@ -0,0 +1,390 @@
+/* =========================================================================
+** Extended Template and Library
+** stringf Procedure Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2007 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__STRINGF_H
+#define __ETL__STRINGF_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <string>
+#include <cstdarg>
+#include <cstdlib>
+
+/* === M A C R O S ========================================================= */
+
+#ifndef ETL_STRPRINTF_MAX_LENGTH
+#define ETL_STRPRINTF_MAX_LENGTH       (800)
+#endif
+
+#ifdef WIN32
+#define POPEN_BINARY_READ_TYPE "rb"
+#define POPEN_BINARY_WRITE_TYPE "wb"
+#else
+#define POPEN_BINARY_READ_TYPE "r"
+#define POPEN_BINARY_WRITE_TYPE "w"
+#endif
+
+/* === T Y P E D E F S ===================================================== */
+
+_ETL_BEGIN_CDECLS
+
+#if defined(__APPLE__) || defined(__CYGWIN__) || defined(_WIN32)
+#define ETL_NO_THROW
+#else
+#define ETL_NO_THROW throw()
+#endif
+
+#ifdef HAVE_VASPRINTF  // This is the preferred method
+ extern int vasprintf(char **,const char *,va_list)ETL_NO_THROW;
+#else
+
+# ifdef HAVE_VSNPRINTF // This is the secondary method
+ extern int vsnprintf(char *,size_t,const char*,va_list)ETL_NO_THROW;
+# endif
+
+#endif
+
+#ifdef HAVE_VSSCANF
+extern int vsscanf(const char *,const char *,va_list)ETL_NO_THROW;
+#else
+#define ETL_NO_VSTRSCANF
+#ifdef HAVE_SSCANF
+extern int sscanf(const char *buf, const char *format, ...)ETL_NO_THROW;
+#endif
+#endif
+
+#include <unistd.h>
+
+_ETL_END_CDECLS
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+inline std::string
+vstrprintf(const char *format, va_list args)
+{
+#ifdef HAVE_VASPRINTF  // This is the preferred method (and safest)
+       char *buffer;
+       std::string ret;
+       vasprintf(&buffer,format,args);
+       ret=buffer;
+       free(buffer);
+       return ret;
+#else
+#ifdef HAVE_VSNPRINTF  // This is the secondary method (Safe, but bulky)
+#warning etl::vstrprintf() has a maximum size of ETL_STRPRINTF_MAX_LENGTH in this configuration.
+#ifdef ETL_THREAD_SAFE
+       char buffer[ETL_STRPRINTF_MAX_LENGTH];
+#else
+       static char buffer[ETL_STRPRINTF_MAX_LENGTH];
+#endif
+       vsnprintf(buffer,sizeof(buffer),format,args);
+       return buffer;
+#else                                  // This is the worst method (UNSAFE, but "works")
+#warning Potential for Buffer-overflow bug using vsprintf
+#define ETL_UNSAFE_STRPRINTF   (true)
+// Here, we are doubling the size of the buffer to make this case
+// slightly more safe.
+#ifdef ETL_THREAD_SAFE
+       char buffer[ETL_STRPRINTF_MAX_LENGTH*2];
+#else
+       static char buffer[ETL_STRPRINTF_MAX_LENGTH*2];
+#endif
+       vsprintf(buffer,format,args);
+       return buffer;
+#endif
+#endif
+}
+
+inline std::string
+strprintf(const char *format, ...)
+{
+       va_list args;
+       va_start(args,format);
+       return vstrprintf(format,args);
+}
+
+#ifndef ETL_NO_VSTRSCANF
+inline int
+vstrscanf(const std::string &data, const char*format, va_list args)
+{
+    return vsscanf(data.c_str(),format,args);
+}
+
+inline int
+strscanf(const std::string &data, const char*format, ...)
+{
+       va_list args;
+       va_start(args,format);
+       return vstrscanf(data, format,args);
+}
+#else
+
+#if defined (HAVE_SSCANF) && defined (__GNUC__)
+#define strscanf(data,format,...) sscanf(data.c_str(),format,__VA_ARGS__)
+#endif
+#endif
+
+
+#define stratof(X) (atof((X).c_str()))
+#define stratoi(X) (atoi((X).c_str()))
+
+inline std::string
+basename(const std::string &str)
+{
+       std::string::const_iterator iter;
+
+       if(str.size() == 1 && str[0] == ETL_DIRECTORY_SEPARATOR)
+               return str;
+
+       if(str.end()[-1]==ETL_DIRECTORY_SEPARATOR)
+               iter=str.end()-2;
+       else
+               iter=str.end()-1;
+
+       for(;iter!=str.begin();iter--)
+               if(*iter==ETL_DIRECTORY_SEPARATOR)
+                       break;
+
+       if (*iter==ETL_DIRECTORY_SEPARATOR)
+               iter++;
+
+       if(str.end()[-1]==ETL_DIRECTORY_SEPARATOR)
+               return std::string(iter,str.end()-1);
+
+       return std::string(iter,str.end());
+}
+
+inline std::string
+dirname(const std::string &str)
+{
+       std::string::const_iterator iter;
+
+       if(str.size() == 1 && str[0] == ETL_DIRECTORY_SEPARATOR)
+               return str;
+
+       if(str.end()[-1]==ETL_DIRECTORY_SEPARATOR)
+               iter=str.end()-2;
+       else
+               iter=str.end()-1;
+
+       for(;iter!=str.begin();iter--)
+               if(*iter==ETL_DIRECTORY_SEPARATOR)
+                       break;
+
+       if(iter==str.begin())
+       {
+          if (*iter==ETL_DIRECTORY_SEPARATOR)
+                  return "/";
+          else
+                  return ".";
+       }
+
+       return std::string(str.begin(),iter);
+}
+
+// filename_extension("/f.e/d.c") => ".c"
+inline std::string
+filename_extension(const std::string &str)
+{
+       std::string base = basename(str);
+       std::string::size_type pos = base.find_last_of('.');
+       if (pos == std::string::npos) return std::string();
+       return base.substr(pos);
+}
+
+// filename_sans_extension("/f.e/d.c") => "/f.e/d"
+inline std::string
+filename_sans_extension(const std::string &str)
+{
+       std::string base = basename(str);
+       std::string::size_type pos = base.find_last_of('.');
+       if (pos == std::string::npos) return str;
+       std::string dir = dirname(str);
+       if (dir == ".") return base.substr(0,pos);
+       return dir + ETL_DIRECTORY_SEPARATOR + base.substr(0,pos);
+}
+
+inline bool
+is_absolute_path(const std::string &path)
+{
+#ifdef WIN32
+       if(path.size()>=3 && path[1]==':' && (path[2]=='\\' || path[2]=='/'))
+               return true;
+#endif
+       if(!path.empty() && path[0]==ETL_DIRECTORY_SEPARATOR)
+               return true;
+       return false;
+}
+
+inline std::string
+unix_to_local_path(const std::string &path)
+{
+       std::string ret;
+       std::string::const_iterator iter;
+       for(iter=path.begin();iter!=path.end();iter++)
+               switch(*iter)
+               {
+               case '/':
+                       ret+=ETL_DIRECTORY_SEPARATOR;
+                       break;
+               case '~':
+                       ret+='~';
+                       break;
+               default:
+                       ret+=*iter;
+                       break;
+               }
+       return ret;
+}
+
+inline std::string
+current_working_directory()
+{
+       char dir[256];
+       std::string ret(getcwd(dir,sizeof(dir)));
+       return ret;
+}
+
+inline std::string
+get_root_from_path(std::string path)
+{
+       std::string ret;
+       std::string::const_iterator iter;
+
+       for(iter=path.begin();iter!=path.end();++iter)
+       {
+               if(*iter==ETL_DIRECTORY_SEPARATOR)
+                       break;
+               ret+=*iter;
+       }
+       //if(iter!=path.end())
+               ret+=ETL_DIRECTORY_SEPARATOR;
+       return ret;
+}
+
+inline std::string
+remove_root_from_path(std::string path)
+{
+       while(!path.empty())
+       {
+               if(path[0]==ETL_DIRECTORY_SEPARATOR)
+               {
+                       path.erase(path.begin());
+                       return path;
+               }
+               path.erase(path.begin());
+       }
+       return path;
+}
+
+inline std::string
+cleanup_path(std::string path)
+{
+       std::string ret;
+
+       while(basename(path)=="."&&path.size()!=1)path=dirname(path);
+
+       while(!path.empty())
+       {
+               std::string dir(get_root_from_path(path));
+               if((dir=="../" || dir=="..\\") && ret.size())
+               {
+                       ret=dirname(ret);
+                       if (*(ret.end()-1)!=ETL_DIRECTORY_SEPARATOR)
+                               ret+=ETL_DIRECTORY_SEPARATOR;
+               }
+               else if((dir!="./" && dir!=".\\") && dir!=".")
+                       ret+=dir;
+               path=remove_root_from_path(path);
+       }
+       if (ret.size()==0)ret+='.';
+
+       // Remove any trailing directory separators
+       if(ret.size() && ret[ret.size()-1]==ETL_DIRECTORY_SEPARATOR)
+               ret.erase(ret.begin()+ret.size()-1);
+       return ret;
+}
+
+inline std::string
+absolute_path(std::string path)
+{
+       std::string ret(current_working_directory());
+
+       if(path.empty())
+               return cleanup_path(ret);
+       if(is_absolute_path(path))
+               return cleanup_path(path);
+       return cleanup_path(ret+ETL_DIRECTORY_SEPARATOR+path);
+}
+
+inline std::string
+relative_path(std::string curr_path,std::string dest_path)
+{
+       // If dest_path is already a relative path,
+       // then there is no need to do anything.
+       if(!is_absolute_path(dest_path))
+               dest_path=absolute_path(dest_path);
+       else
+               dest_path=cleanup_path(dest_path);
+
+       if(!is_absolute_path(curr_path))
+               curr_path=absolute_path(curr_path);
+       else
+               curr_path=cleanup_path(curr_path);
+
+#ifdef WIN32
+       // If we are on windows and the dest path is on a different drive,
+       // then there is no way to make a relative path to it.
+       if(dest_path.size()>=3 && dest_path[1]==':' && dest_path[0]!=curr_path[0])
+               return dest_path;
+#endif
+
+       if(curr_path==dirname(dest_path))
+               return basename(dest_path);
+
+       while(!dest_path.empty() && !curr_path.empty() && get_root_from_path(dest_path)==get_root_from_path(curr_path))
+       {
+               dest_path=remove_root_from_path(dest_path);
+               curr_path=remove_root_from_path(curr_path);
+       }
+
+       while(!curr_path.empty())
+       {
+               dest_path=std::string("..")+ETL_DIRECTORY_SEPARATOR+dest_path;
+               curr_path=remove_root_from_path(curr_path);
+       }
+
+       return dest_path;
+}
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_surface.h b/ETL/tags/0.4.11/ETL/_surface.h
new file mode 100644 (file)
index 0000000..d5a32a5
--- /dev/null
@@ -0,0 +1,649 @@
+/*! ========================================================================
+** Extended Template and Library
+** Surface Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2008 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__SURFACE_H
+#define __ETL__SURFACE_H
+
+/* === H E A D E R S ======================================================= */
+
+#include "_pen.h"
+#include "_misc.h"
+#include <algorithm>
+#include <cstring>
+
+/* === M A C R O S ========================================================= */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+template <typename T, typename AT>
+class value_prep
+{
+public:
+       typedef T value_type;
+       typedef AT accumulator_type;
+
+       accumulator_type cook(const value_type& x)const { return (accumulator_type)x; }
+       value_type uncook(const accumulator_type& x)const { return (value_type)x; }
+};
+
+template <typename T, typename AT=T, class VP=value_prep<T,AT> >
+class surface
+{
+public:
+       typedef T value_type;
+       typedef AT accumulator_type;
+       typedef value_type* pointer;
+       typedef const value_type* const_pointer;
+       typedef value_type& reference;
+       typedef generic_pen<value_type,accumulator_type> pen;
+       typedef generic_pen<const value_type,accumulator_type> const_pen;
+       typedef VP value_prep_type;
+
+       typedef alpha_pen<const_pen> const_alpha_pen;
+       typedef alpha_pen<pen> non_const_alpha_pen;
+
+       typedef typename pen::difference_type size_type;
+       typedef typename pen::difference_type difference_type;
+
+       typedef typename pen::iterator_x iterator_x;
+       typedef typename pen::iterator_y iterator_y;
+       typedef typename pen::const_iterator_x const_iterator_x;
+       typedef typename pen::const_iterator_y const_iterator_y;
+
+private:
+       value_type *data_;
+       value_type *zero_pos_;
+       typename difference_type::value_type pitch_;
+       int w_, h_;
+       bool deletable_;
+
+       value_prep_type cooker_;
+
+       void swap(const surface &x)
+       {
+               std::swap(data_,x.data_);
+               std::swap(zero_pos_,x.zero_pos_);
+               std::swap(pitch_,x.pitch_);
+               std::swap(w_,x.w_);
+               std::swap(h_,x.h_);
+               std::swap(deletable_,x.deletable_);
+       }
+
+public:
+       surface():
+               data_(0),
+               zero_pos_(data_),
+               pitch_(0),
+               w_(0),h_(0),
+               deletable_(false) { }
+
+       surface(value_type* data, int w, int h, bool deletable=false):
+               data_(data),
+               zero_pos_(data),
+               pitch_(sizeof(value_type)*w),
+               w_(w),h_(h),
+               deletable_(deletable) { }
+
+       surface(const typename size_type::value_type &w, const typename size_type::value_type &h):
+               data_(new value_type[w*h]),
+               zero_pos_(data_),
+               pitch_(sizeof(value_type)*w),
+               w_(w),h_(h),
+               deletable_(true) { }
+
+       surface(const size_type &s):
+               data_(new value_type[s.x*s.y]),
+               zero_pos_(data_),
+               pitch_(sizeof(value_type)*s.x),
+               w_(s.x),h_(s.y),
+               deletable_(true) { }
+
+       template <typename _pen>
+       surface(const _pen &_begin, const _pen &_end)
+       {
+               typename _pen::difference_type size=_end-_begin;
+
+               data_=new value_type[size.x*size.y];
+               w_=size.x;
+               h_=size.y;
+               zero_pos_=data_;
+               pitch_=sizeof(value_type)*w_;
+               deletable_=true;
+
+               int x,y;
+
+               for(y=0;y<h_;y++)
+                       for(x=0;x<w_;x++)
+                               (*this)[y][x]=_begin.get_value_at(x,y);
+       }
+
+       surface(const surface &s):
+               data_(s.data_?new value_type[s.w_*s.h_]:0),
+               zero_pos_(data_+(s.zero_pos_-s.data_)),
+               pitch_(s.pitch_),
+               w_(s.w_),
+               h_(s.h_),
+               deletable_(s.data_?true:false)
+       {
+               assert(&s);
+               if(s.data_)
+               {
+                       assert(data_);
+                       memcpy(data_,s.data_,abs(pitch_)*h_);
+               }
+       }
+
+public:
+       ~surface()
+       {
+               if(deletable_)
+                       delete [] data_;
+       }
+
+       size_type
+       size()const
+       { return size_type(w_,h_); }
+
+       typename size_type::value_type get_pitch()const { return pitch_; }
+       typename size_type::value_type get_w()const { return w_; }
+       typename size_type::value_type get_h()const { return h_; }
+
+       const surface &mirror(const surface &rhs)
+       {
+               if(deletable_)delete [] data_;
+
+               data_=rhs.data_;
+               zero_pos_=rhs.zero_pos_;
+               pitch_=rhs.pitch_;
+               w_=rhs.w_;
+               h_=rhs.h_;
+               deletable_=false;
+
+               return *this;
+       }
+
+       const surface &operator=(const surface &rhs)
+       {
+               set_wh(rhs.w_,rhs.h_);
+               zero_pos_=data_+(rhs.zero_pos_-rhs.data_);
+               pitch_=rhs.pitch_;
+               deletable_=true;
+
+               memcpy(data_,rhs.data_,pitch_*h_);
+
+               return *this;
+       }
+
+       void
+       set_wh(typename size_type::value_type w, typename size_type::value_type h)
+       {
+               if(data_)
+               {
+                       if(w==w_ && h==h_ && deletable_)
+                               return;
+                       if(deletable_)
+                               delete [] data_;
+               }
+
+               w_=w;
+               h_=h;
+               pitch_=sizeof(value_type)*w_;
+               zero_pos_=data_=new value_type[h_*w_];
+               deletable_=true;
+       }
+
+       void
+       fill(value_type v, int x, int y, int w, int h)
+       {
+               assert(data_);
+               if(w<=0 || h<=0)return;
+               int i;
+               pen PEN(get_pen(x,y));
+               PEN.set_value(v);
+               for(i=0;i<h;i++,PEN.inc_y(),PEN.dec_x(w))
+                       PEN.put_hline(w);
+       }
+
+       template <class _pen> void
+       fill(value_type v, _pen& PEN, int w, int h)
+       {
+               assert(data_);
+               if(w<=0 || h<=0)return;
+               int y;
+               PEN.set_value(v);
+               for(y=0;y<h;y++,PEN.inc_y(),PEN.dec_x(w))
+                       PEN.put_hline(w);
+       }
+
+       void
+       fill(value_type v)
+       {
+               assert(data_);
+               int y;
+               pen pen_=begin();
+               pen_.set_value(v);
+               for(y=0;y<h_;y++,pen_.inc_y(),pen_.dec_x(w_))
+                       pen_.put_hline(w_);
+       }
+
+       template <class _pen> void blit_to(_pen &pen)
+       { return blit_to(pen,0,0, get_w(),get_h()); }
+
+       template <class _pen> void
+       blit_to(_pen &DEST_PEN,
+                       int x, int y, int w, int h) //src param
+       {
+               if(x>=w_ || y>=h_)
+                       return;
+
+               //clip source origin
+               if(x<0)
+               {
+                       w+=x;   //decrease
+                       x=0;
+               }
+
+               if(y<0)
+               {
+                       h+=y;   //decrease
+                       y=0;
+               }
+
+               //clip width against dest width
+               w = std::min((long)w,(long)(DEST_PEN.end_x()-DEST_PEN.x()));
+               h = std::min((long)h,(long)(DEST_PEN.end_y()-DEST_PEN.y()));
+
+               //clip width against src width
+               w = std::min(w,w_-x);
+               h = std::min(h,h_-y);
+
+               if(w<=0 || h<=0)
+                       return;
+
+               pen SOURCE_PEN(get_pen(x,y));
+
+               for(; h>0; h--,DEST_PEN.inc_y(),SOURCE_PEN.inc_y())
+               {
+                       int i;
+                       for(i=0; i<w; i++,DEST_PEN.inc_x(),SOURCE_PEN.inc_x())
+                       {
+                               DEST_PEN.put_value(SOURCE_PEN.get_value());
+                       }
+                       DEST_PEN.dec_x(w);
+                       SOURCE_PEN.dec_x(w);
+               }
+       }
+
+       void
+       clear()
+       {
+               assert(data_);
+               if(pitch_==(signed int)sizeof(value_type)*w_)
+                       memset(data_,0,h_*pitch_);
+               else
+                       fill(value_type());
+       }
+
+       iterator_x
+       operator[](const int &y)
+       { assert(data_); return (pointer)(((char*)zero_pos_)+y*pitch_); }
+
+       const_iterator_x
+       operator[](const int &y)const
+       { assert(data_); return (const_pointer)(((const char*)zero_pos_)+y*pitch_); }
+
+       void
+       flip_v()
+       {
+               assert(data_);
+
+               zero_pos_=(pointer)(((char*)zero_pos_)+pitch_*h_);
+
+               pitch_=-pitch_;
+       }
+
+       bool is_valid()const
+       {
+               return  data_!=0
+                       &&      zero_pos_!=0
+                       &&      w_>0
+                       &&      h_>0
+                       &&      pitch_!=0
+               ;
+       }
+
+       operator bool()const { return is_valid(); }
+
+       pen begin() { assert(data_); return pen(data_,w_,h_,pitch_); }
+       pen get_pen(int x, int y) { assert(data_); return begin().move(x,y); }
+       pen end() { assert(data_); return get_pen(w_,h_); }
+
+       const_pen begin()const { assert(data_); return const_pen(data_,w_,h_,pitch_); }
+       const_pen get_pen(int x, int y)const { assert(data_); return begin().move(x,y); }
+       const_pen end()const { assert(data_); return get_pen(w_,h_); }
+
+       //! Linear sample
+       value_type linear_sample(const float x, const float y)const
+       {
+               int u(floor_to_int(x)), v(floor_to_int(y));
+               float a, b;
+               static const float epsilon(1.0e-6);
+
+               if(x<0.0f)u=0,a=0.0f;
+               else if(x>w_-1)u=w_-1,a=0.0f;
+               else a=x-u;
+
+               if(y<0.0f)v=0,b=0.0f;
+               else if(y>h_-1)v=h_-1,b=0.0f;
+               else b=y-v;
+
+               const float
+                       c(1.0f-a), d(1.0f-b),
+                       e(a*d),f(c*b),g(a*b);
+
+               accumulator_type ret(cooker_.cook((*this)[v][u])*(c*d));
+               if(e>=epsilon)ret+=cooker_.cook((*this)[v][u+1])*e;
+               if(f>=epsilon)ret+=cooker_.cook((*this)[v+1][u])*f;
+               if(g>=epsilon)ret+=cooker_.cook((*this)[v+1][u+1])*g;
+               return cooker_.uncook(ret);
+       }
+
+       //! Cosine sample
+       value_type cosine_sample(const float x, const float y)const
+       {
+               int u(floor_to_int(x)), v(floor_to_int(y));
+               float a, b;
+               static const float epsilon(1.0e-6);
+
+               if(x<0.0f)u=0,a=0.0f;
+               else if(x>w_-1)u=w_-1,a=0.0f;
+               else a=x-u;
+
+               if(y<0.0f)v=0,b=0.0f;
+               else if(y>h_-1)v=h_-1,b=0.0f;
+               else b=y-v;
+
+               a=(1.0f-cos(a*3.1415927f))*0.5f;
+               b=(1.0f-cos(b*3.1415927f))*0.5f;
+
+               const float
+                       c(1.0f-a), d(1.0f-b),
+                       e(a*d),f(c*b),g(a*b);
+
+               accumulator_type ret(cooker_.cook((*this)[v][u])*(c*d));
+               if(e>=epsilon)ret+=cooker_.cook((*this)[v][u+1])*e;
+               if(f>=epsilon)ret+=cooker_.cook((*this)[v+1][u])*f;
+               if(g>=epsilon)ret+=cooker_.cook((*this)[v+1][u+1])*g;
+
+               return cooker_.uncook(ret);
+       }
+
+       //! Cubic sample
+       value_type cubic_sample(float x, float y)const
+       {
+               #if 0
+       #define P(x)    (((x)>=0)?((x)*(x)*(x)):0.0f)
+       #define R(x)    ( P(x+2) - 4.0f*P(x+1) + 6.0f*P(x) - 4.0f*P(x-1) )*(1.0f/6.0f)
+       #define F(i,j)  (cooker_.cook((*this)[max(min(j+v,h_-1),0)][max(min(i+u,w_-1),0)])*(R((i)-a)*R(b-(j))))
+       #define Z(i,j) ret+=F(i,j)
+       #define X(i,j)  // placeholder... To make box more symmetric
+
+               int u(floor_to_int(x)), v(floor_to_int(y));
+               float a, b;
+
+               // Clamp X
+               if(x<0.0f)u=0,a=0.0f;
+               else if(u>w_-1)u=w_-1,a=0.0f;
+               else a=x-u;
+
+               // Clamp Y
+               if(y<0.0f)v=0,b=0.0f;
+               else if(v>h_-1)v=h_-1,b=0.0f;
+               else b=y-v;
+
+               // Interpolate
+               accumulator_type ret(F(0,0));
+               Z(-1,-1); Z(-1, 0); Z(-1, 1); Z(-1, 2);
+               Z( 0,-1); X( 0, 0); Z( 0, 1); Z( 0, 2);
+               Z( 1,-1); Z( 1, 0); Z( 1, 1); Z( 1, 2);
+               Z( 2,-1); Z( 2, 0); Z( 2, 1); Z( 2, 2);
+
+               return cooker_.uncook(ret);
+
+       #undef X
+       #undef Z
+       #undef F
+       #undef P
+       #undef R
+               #else
+
+               #define f(j,i)  (cooker_.cook((*this)[j][i]))
+               //Using catmull rom interpolation because it doesn't blur at all
+               //bezier curve with intermediate ctrl pts: 0.5/3(p(i+1) - p(i-1)) and similar
+               accumulator_type xfa [4];
+
+               //precalculate indices (all clamped) and offset
+               const int xi = x > 0 ? (x < w_ ? (int)floor(x) : w_-1) : 0;
+               const int xa[] = {std::max(0,xi-1),xi,std::min(w_-1,xi+1),std::min(w_-1,xi+2)};
+
+               const int yi = y > 0 ? (y < h_ ? (int)floor(y) : h_-1) : 0;
+               const int ya[] = {std::max(0,yi-1),yi,std::min(h_-1,yi+1),std::min(h_-1,yi+2)};
+
+               const float xf = x-xi;
+               const float yf = y-yi;
+
+               //figure polynomials for each point
+               const float txf[] =
+               {
+                       0.5*xf*(xf*(xf*(-1) + 2) - 1),  //-t + 2t^2 -t^3
+                       0.5*(xf*(xf*(3*xf - 5)) + 2),   //2 - 5t^2 + 3t^3
+                       0.5*xf*(xf*(-3*xf + 4) + 1),    //t + 4t^2 - 3t^3
+                       0.5*xf*xf*(xf-1)                                //-t^2 + t^3
+               };
+
+               const float tyf[] =
+               {
+                       0.5*yf*(yf*(yf*(-1) + 2) - 1),  //-t + 2t^2 -t^3
+                       0.5*(yf*(yf*(3*yf - 5)) + 2),   //2 - 5t^2 + 3t^3
+                       0.5*yf*(yf*(-3*yf + 4) + 1),    //t + 4t^2 - 3t^3
+                       0.5*yf*yf*(yf-1)                                //-t^2 + t^3
+               };
+
+               //evaluate polynomial for each row
+               for(int i = 0; i < 4; ++i)
+               {
+                       xfa[i] = f(ya[i],xa[0])*txf[0] + f(ya[i],xa[1])*txf[1] + f(ya[i],xa[2])*txf[2] + f(ya[i],xa[3])*txf[3];
+               }
+
+               //return the cumulative column evaluation
+               return cooker_.uncook(xfa[0]*tyf[0] + xfa[1]*tyf[1] + xfa[2]*tyf[2] + xfa[3]*tyf[3]);
+#undef f
+#endif
+       }
+
+       value_type      sample_rect(float x0,float y0,float x1,float y1) const
+       {
+               const surface &s = *this;
+
+               //assumes it's clamped to the boundary of the image
+               //force min max relationship for x0,x1 and y0,y1
+               if(x0 > x1) std::swap(x0,x1);
+               if(y0 > y1) std::swap(y0,y1);
+
+               //local variable madness
+               //all things that want to inter-operate should provide a default value constructor for = 0
+               accumulator_type acum = 0;
+               int xi=0,yi=0;
+
+               int     xib=(int)floor(x0),
+                       xie=(int)floor(x1);
+
+               int     yib=(int)floor(y0),
+                       yie=(int)floor(y1);
+
+               //the weight for the pixel should remain the same...
+               float weight = (y1-y0)*(x1-x0);
+               assert(weight != 0);
+
+               float ylast = y0, xlastb = x0;
+               const_pen       pen_ = s.get_pen(xib,yib);
+
+               for(yi = yib; yi < yie; ylast = ++yi, pen_.inc_y())
+               {
+                       const float yweight = yi+1 - ylast;
+
+                       float xlast = xlastb;
+                       for(xi = xib; xi < xie; xlast = ++xi, pen_.inc_x())
+                       {
+                               const float w = yweight*(xi+1 - xlast);
+                               acum += cooker_.cook(pen_.get_value())*w;
+                       }
+
+                       //post... with next being fractional...
+                       const float w = yweight*(x1 - xlast);
+                       acum += cooker_.cook(pen_.get_value())*w;
+
+                       pen_.dec_x(xie-xib);
+               }
+
+               //post in y direction... must have all x...
+               {
+                       const float yweight = y1 - ylast;
+
+                       float xlast = xlastb;
+                       for(xi = xib; xi < xie; xlast = ++xi)
+                       {
+                               const float w = yweight*(xi+1 - xlast);
+
+                               acum += cooker_.cook(pen_.get_value())*w;
+                       }
+
+                       //post... with next being fractional...
+                       const float w = yweight*(x1 - xlast);
+                       acum += cooker_.cook(pen_.get_value())*w;
+               }
+
+               acum *= 1/weight;
+               return cooker_.uncook(acum);
+       }
+
+       value_type      sample_rect_clip(float x0,float y0,float x1,float y1) const
+       {
+               const surface &s = *this;
+
+               //assumes it's clamped to the boundary of the image
+               //force min max relationship for x0,x1 and y0,y1
+               if(x0 > x1) std::swap(x0,x1);
+               if(y0 > y1) std::swap(y0,y1);
+
+               //local variable madness
+               //all things that want to inter-operate should provide a default value constructor for = 0
+               accumulator_type acum = 0;
+               int xi=0,yi=0;
+
+               int     xib=(int)floor(x0),
+                       xie=(int)floor(x1);
+
+               int     yib=(int)floor(y0),
+                       yie=(int)floor(y1);
+
+               //the weight for the pixel should remain the same...
+               float weight = (y1-y0)*(x1-x0);
+
+               assert(weight != 0);
+
+               //clip to the input region
+               if(x0 >= s.get_w() || x1 <= 0) return acum;
+               if(y0 >= s.get_h() || y1 <= 0) return acum;
+
+               if(x0 < 0) { x0 = 0; xib = 0; }
+               if(x1 >= s.get_w())
+               {
+                       x1 = s.get_w(); //want to be just below the last pixel...
+                       xie = s.get_w()-1;
+               }
+
+               if(y0 < 0) { y0 = 0; yib = 0; }
+               if(y1 >= s.get_h())
+               {
+                       y1 = s.get_h(); //want to be just below the last pixel...
+                       yie = s.get_h()-1;
+               }
+
+               float ylast = y0, xlastb = x0;
+               const_pen       pen = s.get_pen(xib,yib);
+
+               for(yi = yib; yi < yie; ylast = ++yi, pen.inc_y())
+               {
+                       const float yweight = yi+1 - ylast;
+
+                       float xlast = xlastb;
+                       for(xi = xib; xi < xie; xlast = ++xi, pen.inc_x())
+                       {
+                               const float w = yweight*(xi+1 - xlast);
+                               acum += cooker_.cook(pen.get_value())*w;
+                       }
+
+                       //post... with next being fractional...
+                       const float w = yweight*(x1 - xlast);
+                       acum += cooker_.cook(pen.get_value())*w;
+
+                       pen.dec_x(xie-xib);
+               }
+
+               //post in y direction... must have all x...
+               {
+                       const float yweight = y1 - ylast;
+
+                       float xlast = xlastb;
+                       for(xi = xib; xi < xie; xlast = ++xi)
+                       {
+                               const float w = yweight*(xi+1 - xlast);
+
+                               acum += cooker_.cook(pen.get_value())*w;
+                       }
+
+                       //post... with next being fractional...
+                       const float w = yweight*(x1 - xlast);
+                       acum += cooker_.cook(pen.get_value())*w;
+               }
+
+               acum *= 1/weight;
+               return cooker_.uncook(acum);
+       }
+};
+
+_ETL_END_NAMESPACE
+
+/* === T Y P E D E F S ===================================================== */
+
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_thread.h b/ETL/tags/0.4.11/ETL/_thread.h
new file mode 100644 (file)
index 0000000..8f70be8
--- /dev/null
@@ -0,0 +1,515 @@
+/*! ========================================================================
+** Extended Template and Library
+** Thread Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL__THREAD_H_
+#define __ETL__THREAD_H_
+
+/* === H E A D E R S ======================================================= */
+
+#define __USE_GNU
+
+#ifdef HAVE_PTHREAD_H
+# include <pthread.h>
+#endif
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+#ifdef HAVE_CREATETHREAD
+# include <windows.h>
+#endif
+
+/* === M A C R O S ========================================================= */
+
+#if ( defined (HAVE_PTHREAD_CREATE) || defined (HAVE_CLONE) || defined (HAVE_CREATETHREAD) ) && !defined (NO_THREADS)
+# define CALLISTO_THREADS
+#endif
+
+#define THREAD_ENTRYPOINT
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+#if defined(CALLISTO_THREADS) && defined(HAVE_PTHREAD_CREATE)
+static inline void Yield(void)
+{
+       sched_yield();
+       pthread_testcancel();
+}
+#else
+#ifdef Yield
+       #undef Yield
+#endif
+inline void Yield(void) { }
+#endif
+
+#ifdef CALLISTO_THREADS
+
+#ifdef HAVE_PTHREAD_CREATE
+
+class Thread
+{
+public:
+       typedef void* entrypoint_return;
+private:
+
+       pthread_t thread;
+       int *references;
+       entrypoint_return (*entrypoint)(void *);
+       void *context;
+public:
+       Thread(void *(*ep)(void *)=NULL,void *context=NULL):
+               references(NULL),entrypoint(ep),context(context) { }
+       Thread(const Thread &t)
+       {
+               thread=t.thread;
+               references=t.references;
+               entrypoint=t.entrypoint;
+               context=t.context;
+               if(references)
+                       (*references)++;
+       }
+       const Thread &operator=(const Thread &rhs)
+       {
+               if(references)
+               {
+                       (*references)--;
+                       if(*references==0)
+                               stop();
+               }
+               thread=rhs.thread;
+               references=rhs.references;
+               entrypoint=rhs.entrypoint;
+               context=rhs.context;
+               if(references)
+                       (*references)++;
+               return *this;
+       }
+
+       void start(void)
+       {
+               references = new int;
+               *references = 1;
+               pthread_create(&thread,NULL,entrypoint,context);
+//             pthread_detach(thread);
+       }
+
+       void stop(void)
+       {
+               delete references;
+               references=NULL;
+               void *exit_status;
+               pthread_cancel(thread);
+               pthread_join(thread,&exit_status);
+       }
+
+       static void TestStop()
+       {
+               pthread_testcancel();
+       }
+
+       static void SyncStop()
+       {
+               int i;
+               pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,&i);
+       }
+
+       static void AsyncStop()
+       {
+               int i;
+               pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,&i);
+       }
+
+       ~Thread()
+       {
+               if(references)
+               {
+                       (*references)--;
+                       if(*references==0)
+                               stop();
+               }
+       }
+};
+
+class Mutex
+{
+       pthread_mutex_t mutex;
+       pthread_t locker;
+       int depth;
+public:
+
+       Mutex()
+       {
+               pthread_mutexattr_t attr;
+               pthread_mutexattr_init(&attr);
+               //#ifdef PTHREAD_PRIO_INHERIT
+               //pthread_mutexattr_setprioceiling(&attr,PTHREAD_PRIO_INHERIT);
+               //#endif
+               #ifdef PTHREAD_MUTEX_RECURSIVE
+               pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
+               #endif
+               pthread_mutex_init(&mutex,&attr);
+               pthread_mutexattr_destroy(&attr);
+               locker=0;
+               depth=0;
+       }
+
+       ~Mutex()
+       { pthread_mutex_destroy(&mutex); }
+
+       void Lock(void)
+       {
+               if(!locker || locker!=pthread_self())
+               {
+                       pthread_mutex_lock(&mutex);
+                       locker=pthread_self();
+                       depth=0;
+                       return;
+               }
+               depth++;
+       }
+
+       bool TryLock(void)
+       { return !(bool) pthread_mutex_trylock(&mutex); }
+
+       void UnLock(void)
+       {
+               if(depth)
+               {
+                       depth--;
+                       return;
+               }
+               pthread_mutex_unlock(&mutex);
+               locker=0;
+       }
+};
+
+#ifdef HAVE_PTHREAD_RW_LOCK_INIT
+class ReadWriteLock
+{
+       pthread_rwlock_t rwlock;
+public:
+
+       ReadWriteLock()
+       { pthread_rwlock_init(&rwlock,NULL); }
+
+       ~ReadWriteLock()
+       { pthread_rwlock_destroy(&rwlock); }
+
+       void LockRead(void)
+       { pthread_rwlock_rdlock(&rwlock); }
+
+       void LockWrite(void)
+       { pthread_rwlock_wrlock(&rwlock); }
+
+       bool TryLockRead(void)
+       { return !(bool)pthread_rwlock_tryrdlock(&rwlock); }
+
+       bool TryLockWrite(void)
+       { return !(bool)pthread_rwlock_trywrlock(&rwlock); }
+
+       void UnLockWrite(void)
+       { pthread_rwlock_unlock(&rwlock); }
+
+       void UnLockRead(void)
+       { pthread_rwlock_unlock(&rwlock); }
+};
+#else
+//*
+class ReadWriteLock : public Mutex
+{
+public:
+
+       ReadWriteLock()
+       {  }
+
+       ~ReadWriteLock()
+       {  }
+
+       void LockRead(void)
+       { Lock(); }
+
+       void LockWrite(void)
+       { Lock(); }
+
+       bool TryLockRead(void)
+       { return TryLock(); }
+
+       bool TryLockWrite(void)
+       { return TryLock(); }
+
+       void UnLockWrite(void)
+       { UnLock(); }
+
+       void UnLockRead(void)
+       { UnLock(); }
+};
+#endif
+
+/*
+class Condition
+{
+       pthread_cond_t cond;
+       pthread_mutex_t mutex;
+public:
+       Condition()
+       { pthread_cond_init(&cond,NULL); pthread_mutex_init(&mutex,NULL); }
+       ~Condition()
+       { pthread_cond_destroy(&cond); pthread_mutex_destroy(&mutex);}
+       void operator()(void)
+       { pthread_cond_signal(&cond); }
+       void Wait(void)
+       {
+               pthread_mutex_lock(&mutex);
+               pthread_cond_wait(&cond,&mutex);
+               pthread_mutex_unlock(&mutex);
+       }
+};
+*/
+
+#else // if defined HAVE_PTHREAD
+#ifdef HAVE_CREATETHREAD
+
+
+#ifdef THREAD_ENTRYPOINT
+#undef THREAD_ENTRYPOINT
+#endif
+#define THREAD_ENTRYPOINT      __stdcall
+class Thread
+{
+public:
+       typedef unsigned long entrypoint_return;
+private:
+
+       unsigned long thread;
+       HANDLE handle;
+       int *references;
+
+       entrypoint_return  (THREAD_ENTRYPOINT *entrypoint)(void *);
+
+       void *context;
+
+       HDC hdc;
+       HGLRC hglrc;
+
+       static entrypoint_return THREAD_ENTRYPOINT thread_prefix(void*data)
+       {
+               Thread *thread=(Thread *)data;
+
+               if(thread->hglrc)
+                       wglMakeCurrent(thread->hdc, thread->hglrc);
+
+               return thread->entrypoint(thread->context);
+       }
+
+public:
+       Thread(entrypoint_return  (THREAD_ENTRYPOINT *ep)(void *)=NULL,void *context=NULL):
+               references(NULL),entrypoint(ep),context(context) { }
+       Thread(const Thread &t)
+       {
+               thread=t.thread;
+               handle=t.handle;
+               references=t.references;
+               entrypoint=t.entrypoint;
+               context=t.context;
+               handle=NULL;
+               if(references)
+                       (*references)++;
+       }
+       const Thread &operator=(const Thread &rhs)
+       {
+               if(references)
+               {
+                       (*references)--;
+                       if(*references==0)
+                               stop();
+               }
+               thread=rhs.thread;
+               handle=rhs.handle;
+               references=rhs.references;
+               entrypoint=rhs.entrypoint;
+               context=rhs.context;
+               if(references)
+                       (*references)++;
+               return *this;
+       }
+
+       void start(void)
+       {
+               references = new int;
+               *references = 1;
+
+               hglrc=wglGetCurrentContext();
+               hdc=wglGetCurrentDC();
+
+               handle=CreateThread(
+                       NULL,           // Security stuff
+                       0,      // STACK
+                       thread_prefix,    // thread function
+                       (void*)this,                       // thread argument
+                       0,                    // creation option
+                       &thread                        // thread identifier
+               );
+       }
+
+       void stop(void)
+       {
+               delete references;
+               references=NULL;
+
+               TerminateThread(handle, FALSE);
+       }
+
+       int wait(void)
+       {
+               if(handle)
+               {
+                       WaitForSingleObject(handle, INFINITE);
+                       CloseHandle(handle);
+               }
+               return 0;
+       }
+
+       static void TestStop()
+       {
+       }
+
+       static void SyncStop()
+       {
+       }
+
+       static void AsyncStop()
+       {
+       }
+
+       ~Thread()
+       {
+               if(references)
+               {
+                       (*references)--;
+                       if(*references==0)
+                               stop();
+               }
+       }
+};
+
+class Mutex
+{
+       HANDLE handle;
+public:
+
+       Mutex()
+       {
+               handle = CreateMutex(NULL, FALSE, NULL);
+       }
+
+       ~Mutex()
+       {
+               CloseHandle(handle);
+       }
+
+       void Lock(void)
+       {
+               WaitForSingleObject(handle, INFINITE);
+       }
+
+       bool TryLock(void)
+       {
+               return WaitForSingleObject(handle, INFINITE)==WAIT_FAILED;
+       }
+
+       void UnLock(void)
+       {
+               ReleaseMutex(handle);
+       }
+};
+
+
+#endif // if defined HAVE_CREATETHREAD
+#endif // if defined HAVE_PTHREAD_CREATE
+#endif // if defined CALLISTO_THREADS
+
+
+#if !defined(CALLISTO_THREADS)
+// Dummy object used when not threading
+class ReadWriteLock
+{
+public:
+
+       ReadWriteLock() {}
+       ~ReadWriteLock() {}
+       void LockRead(void) {}
+       void LockWrite(void) {}
+       bool TryLockRead(void) {return true;}
+       bool TryLockWrite(void) {return true;}
+       void UnLockRead(void) {}
+       void UnLockWrite(void) {}
+};
+
+class Mutex
+{
+public:
+
+       Mutex(){}
+       ~Mutex(){}
+       void Lock(void){}
+       bool TryLock(void){return true;}
+       void UnLock(void){}
+};
+
+#endif
+
+class Condition : private Mutex
+{
+       bool flag;
+public:
+       Condition()
+       { flag=false; }
+       ~Condition()
+       { }
+       void operator()(void)
+       { flag=true; }
+       void Wait(void)
+       {
+               Lock();
+               while(!flag)Yield();
+               flag=false;
+               UnLock();
+       }
+       void WaitNext(void)
+       {
+               Lock();
+               flag=false;
+               while(!flag)Yield();
+               UnLock();
+       }
+};
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_trivial.h b/ETL/tags/0.4.11/ETL/_trivial.h
new file mode 100644 (file)
index 0000000..049b268
--- /dev/null
@@ -0,0 +1,164 @@
+/*! ========================================================================
+** Extended Template Library
+** Trivializing Template Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_TRIVIAL_H
+#define __ETL_TRIVIAL_H
+
+/* === H E A D E R S ======================================================= */
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+_ETL_BEGIN_NAMESPACE
+
+/*! ========================================================================
+** \class      Trivial
+** \brief      Trivializes the constructor of a given class
+**
+** This class makes the given type 'trivial',
+** effectively disabling the constructor and
+** destructor. (This is useful for unions)
+** Some extra casting may be necessary to get
+** it to work properly.
+*/
+template <class T>
+class trivial
+{
+       typedef T value_type;
+       typedef T& reference;
+       typedef const T& const_reference;
+       typedef T* pointer;
+       typedef const T* const_pointer;
+
+       char data[sizeof(T)];
+public:
+       operator reference()
+       { return *reinterpret_cast<pointer>(data); }
+
+       // HACK - Rather dangerous
+       //operator reference()const
+       //{ return *reinterpret_cast<pointer>(const_cast<char *>(data)); }
+
+       operator const_reference()const
+       { return *reinterpret_cast<const_pointer>(data); }
+
+       reference get()
+       { return *reinterpret_cast<pointer>(data); }
+
+       const_reference get()const
+       { return *reinterpret_cast<const_pointer>(data); }
+
+       void construct()
+       { new(&get()) value_type(); }
+
+       void destruct()
+       { get().~value_type(); }
+
+       void destroy() { destruct(); }
+
+       template<class U> reference
+       operator=(const U &rhs)
+       { return get()=rhs; }
+
+       template<class U>reference
+       operator=(const trivial<U> &rhs)
+       { return get()=rhs.get(); }
+
+       template<class U> reference
+       operator+=(const U &rhs)
+       { return get()+=rhs; }
+
+       template<class U> reference
+       operator-=(const U &rhs)
+       { return get()-=rhs; }
+
+       template<class U> reference
+       operator*=(const U &rhs)
+       { return get()*=rhs; }
+
+       template<class U> reference
+       operator/=(const U &rhs)
+       { return get()/=rhs; }
+
+       template<class U> reference
+       operator%=(const U &rhs)
+       { return get()%=rhs; }
+
+       template<class U> reference
+       operator^=(const U &rhs)
+       { return get()^=rhs; }
+
+       template<class U> reference
+       operator&=(const U &rhs)
+       { return get()&=rhs; }
+
+       template<class U> reference
+       operator>>=(const U &rhs)
+       { return get()>>=rhs; }
+
+       template<class U> reference
+       operator<<=(const U &rhs)
+       { return get()<<=rhs; }
+
+       operator bool()const
+       { return get(); }
+
+       bool operator!()const
+       { return !get(); }
+}; // END of template class trivial
+
+_ETL_END_NAMESPACE
+
+//#include <iostream>
+
+/*
+template<typename T, typename _CharT, class _Traits> std::basic_istream<_CharT, _Traits>&
+operator>>(std::basic_istream<_CharT, _Traits>& s, etl::trivial<T>& rhs)
+{ return s>>(T)(rhs); }
+
+template<typename T,typename _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>&
+operator<<(std::basic_ostream<_CharT, _Traits>& s, const etl::trivial<T>& rhs)
+{ return s<<(T)(rhs); }
+*/
+
+/*
+template<typename T> std::istream&
+operator>>(std::istream& s, etl::trivial<T>& rhs)
+{ return s>>(T)(rhs); }
+
+template<typename T> std::ostream&
+operator<<(std::ostream& s, const etl::trivial<T>& rhs)
+{ return s<<(T)(rhs); }
+*/
+
+/* === E X T E R N S ======================================================= */
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/_value.h b/ETL/tags/0.4.11/ETL/_value.h
new file mode 100644 (file)
index 0000000..a52567e
--- /dev/null
@@ -0,0 +1,237 @@
+/* ========================================================================
+** Extended Template and Library
+** Abstraction for a Generic Value Type
+** $Id$
+**
+** Copyright (c) 2002 Adrian Bentley
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** This is an internal header file, included by other ETL headers.
+** You should not attempt to use it directly.
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ETL_VALUE_H
+#define __ETL_VALUE_H
+
+/* === H E A D E R S ======================================================= */
+#include <algorithm>
+#include <typeinfo>
+#include <cassert>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+/*!    \note   This class may be specialized to support binary compatibility
+                       for desired objects (e.g. point3,vector3,float[3]).
+                       However it MUST be declared within scope that you are using the
+                       values....
+
+       \warning        If you specialize this class for something that isn't binary
+                               compatible, then your values could easily report belonging to
+                               the wrong types.
+*/
+template < typename T >
+class value_store_type
+{
+public:
+       typedef T                                               value_type;
+};
+
+_ETL_BEGIN_NAMESPACE
+
+/*!    \class  value   _value.h        ETL/value
+       \brief  Abstraction of the concept of a generic value
+
+       Modified from ideas for the boost::any type.  Added binary compatibility
+       structure
+*/
+class value
+{
+       struct contentholder
+       {
+               virtual ~contentholder() {}
+               virtual contentholder *clone() const = 0;
+               virtual const std::type_info &type() const = 0;
+       };
+
+       contentholder   *content;
+
+public:        //constructor interface
+       value()
+               :content(0)
+       {
+       }
+
+       value(const value &v)
+               :content( v.content ? v.content->clone() : 0 )
+       {
+       }
+
+       /* Copies the object passed to it
+       */
+       template < typename T >
+       value(const T &v)
+               :content( new holder< typename value_store_type<T>::value_type >
+                                               (reinterpret_cast<const typename value_store_type<T>::value_type &>(v)) )
+       {
+       }
+
+public: //modifier interface
+
+       value & swap(value & rhs)
+       {
+               std::swap(content, rhs.content);
+               return *this;
+       }
+
+       template<typename ValueType>
+       value & operator=(const ValueType & rhs)
+       {
+               value(rhs).swap(*this);
+               return *this;
+       }
+
+       value & operator=(const value & rhs)
+       {
+               value(rhs).swap(*this);
+               return *this;
+       }
+
+public: //query interface
+
+       bool empty() const
+       {
+               return content == 0;
+       }
+
+       const std::type_info & type() const
+       {
+               return content ? content->type() : typeid(void);
+       }
+
+private: //implementation interface
+
+       template < typename T >
+       class holder : public contentholder
+       {
+       public: //representation
+               T       obj;
+
+       public: //constructor interface
+
+               holder(const T &o)
+                       :obj(o)
+               {
+               }
+
+               holder(const holder<T> &h)
+                       :obj(h.obj)
+               {
+               }
+
+       public: //accessor interface
+               virtual contentholder *clone() const
+               {
+                       return new holder(*this);
+               }
+
+               virtual const std::type_info &type() const
+               {
+                       return typeid(T);
+               }
+
+       public: //allocation interface
+               void *operator new(unsigned int size)
+               {
+                       assert(size == sizeof(holder<T>));
+
+                       //use pool allocation at some point
+                       return malloc(size);
+               }
+
+               void operator delete(void *p)
+               {
+                       assert(p);
+                       //use pool allocation at some point
+                       return free(p);
+               }
+       };
+
+       template < typename ValueType >
+       friend ValueType *value_cast(value *v);
+};
+
+/*!    Is thrown for bad value_casts (when using a reference...)
+*/
+class bad_value_cast : public std::bad_cast
+{
+public:
+       virtual const char * what() const throw()
+       {
+               return "etl::bad_value_cast: " "failed conversion using boost::value_cast";
+       }
+};
+
+/*!    Returns a pointer to the desired value type if the value_type and the internal
+       binary format agree (mediated by using the value_store_type class), otherwise
+       it returns 0.
+
+       \see value_store_type
+*/
+template < typename ValueType >
+ValueType *value_cast(value *v)
+{
+       assert(v);
+
+       return ( typeid(typename value_store_type<ValueType>::value_type) == v->type() )
+                       ? &static_cast<value::holder<ValueType> *>(v->content)->obj
+                       : 0;
+}
+
+/*!    Same as above except tweaked to allow const cast (possibly for purposes involving
+       type agreement... if const impacts a typeid call I do not know...)
+*/
+template < typename ValueType >
+const ValueType * value_cast(const value *v)
+{
+       return value_cast<ValueType>(const_cast<value *>(v));
+}
+
+/*!    Extract a copy of the internal object and will throw a bad_value_cast exception
+       if the types do not agree.
+
+       \note   I'm not sure why boost::any didn't use a reference here... there must be a reason...
+
+       \see bad_value_cast
+*/
+template < typename ValueType >
+ValueType value_cast(const value &v)
+{
+       const ValueType * result = value_cast<ValueType>(&v);
+       if(!result)
+               throw bad_value_cast();
+       return *result;
+}
+
+_ETL_END_NAMESPACE
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/angle b/ETL/tags/0.4.11/ETL/angle
new file mode 100644 (file)
index 0000000..b58aef8
--- /dev/null
@@ -0,0 +1,48 @@
+// <angle> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Angle Abstraction Class Implementation
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __ANGLE__
+#define __ANGLE__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+#include "_curve_func.h"
+
+#ifdef ETL_FASTANGLE
+#include "_fastangle.h"
+_ETL_BEGIN_NAMESPACE
+typedef fastangle angle;
+_ETL_END_NAMESPACE
+#else
+# include "_angle.h"
+#endif
+
+#ifdef __BEZIER__
+#include "_bezier_angle.h"
+#endif
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/bezier b/ETL/tags/0.4.11/ETL/bezier
new file mode 100644 (file)
index 0000000..22be24a
--- /dev/null
@@ -0,0 +1,40 @@
+// <bezier> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Bezier Curve Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __BEZIER__
+#define __BEZIER__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_bezier.h"
+
+#ifdef __ANGLE__
+#include "_bezier_angle.h"
+#endif
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/boxblur b/ETL/tags/0.4.11/ETL/boxblur
new file mode 100644 (file)
index 0000000..e56316b
--- /dev/null
@@ -0,0 +1,36 @@
+// <boxblur> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Box Blur Template
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __BOXBLUR__
+#define __BOXBLUR__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_boxblur.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/calculus b/ETL/tags/0.4.11/ETL/calculus
new file mode 100644 (file)
index 0000000..06b8928
--- /dev/null
@@ -0,0 +1,36 @@
+// <calculus> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Calculus Functional Classes
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __CALCULUS__
+#define __CALCULUS__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_calculus.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/clock b/ETL/tags/0.4.11/ETL/clock
new file mode 100644 (file)
index 0000000..76a694e
--- /dev/null
@@ -0,0 +1,104 @@
+// <clock> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Clock Abstraction
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __CLOCK__
+#define __CLOCK__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#ifdef HAVE_GETTIMEOFDAY
+#include "_clock_gettimeofday.h"
+#ifndef ETL_CLOCK_DEFAULT_DESC_CLASS
+#define ETL_CLOCK_DEFAULT_DESC_CLASS   _ETL::clock_desc_gettimeofday
+#endif
+#ifndef ETL_CLOCK_REALTIME_DESC_CLASS
+#define ETL_CLOCK_REALTIME_DESC_CLASS  _ETL::clock_desc_gettimeofday
+#endif
+#endif
+
+#ifdef _WIN32
+#include "_clock_win32hpcount.h"
+#ifndef ETL_CLOCK_DEFAULT_DESC_CLASS
+#define ETL_CLOCK_DEFAULT_DESC_CLASS   _ETL::clock_desc_win32hpcount
+#endif
+#ifndef ETL_CLOCK_REALTIME_DESC_CLASS
+#define ETL_CLOCK_REALTIME_DESC_CLASS  _ETL::clock_desc_win32hpcount
+#endif
+#endif
+
+// If we could not find ourselves a better
+// clock description, go ahead and use the
+// standard clock() implementation. 
+// (Better than nothing...)
+#include "_clock_system.h"
+#ifndef ETL_CLOCK_DEFAULT_DESC_CLASS
+#define ETL_CLOCK_DEFAULT_DESC_CLASS   _ETL::clock_desc_sys_clock
+#endif
+#ifndef ETL_CLOCK_PROCTIME_DESC_CLASS
+#define ETL_CLOCK_PROCTIME_DESC_CLASS  _ETL::clock_desc_sys_clock
+#endif
+#ifndef ETL_CLOCK_REALTIME_DESC_CLASS
+#define ETL_CLOCK_REALTIME_DESC_CLASS  _ETL::clock_desc_sys_time
+#endif
+
+#include "_clock_base.h"
+
+_ETL_BEGIN_NAMESPACE
+
+#if 0
+       typedef _ETL::clock_base<ETL_CLOCK_DEFAULT_DESC_CLASS> clock;
+       #ifdef ETL_CLOCK_PROCTIME_DESC_CLASS
+               #define ETL_CLOCK_PROCTIME
+               typedef clock_base<ETL_CLOCK_PROCTIME_DESC_CLASS> clock_proctime;
+       #endif
+       #ifdef ETL_CLOCK_REALTIME_DESC_CLASS
+               #define ETL_CLOCK_REALTIME
+               typedef clock_base<ETL_CLOCK_REALTIME_DESC_CLASS> clock_realtime;
+       #else
+               #warning No realtime clock description found.
+       #endif
+       
+#else
+       class clock : public _ETL::clock_base<ETL_CLOCK_DEFAULT_DESC_CLASS> { };
+       #ifdef ETL_CLOCK_PROCTIME_DESC_CLASS
+               #define ETL_CLOCK_PROCTIME
+               class clock_proctime : public _ETL::clock_base<ETL_CLOCK_PROCTIME_DESC_CLASS> { };
+       #endif
+       #ifdef ETL_CLOCK_REALTIME_DESC_CLASS
+               #define ETL_CLOCK_REALTIME
+               class clock_realtime : public _ETL::clock_base<ETL_CLOCK_REALTIME_DESC_CLASS> { };
+       #else
+               #warning No realtime clock description found.
+       #endif
+#endif
+
+_ETL_END_NAMESPACE
+
+//using etl::clock;
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/etl_config.h b/ETL/tags/0.4.11/ETL/etl_config.h
new file mode 100644 (file)
index 0000000..9be9f00
--- /dev/null
@@ -0,0 +1,70 @@
+
+
+#ifndef __ETL_CONFIG_H
+#define __ETL_CONFIG_H
+
+#include "etl_profile.h"
+#include <utility>
+
+#ifndef ETL_NAMESPACE
+# define ETL_NAMESPACE                         etl
+#endif
+
+#if defined(WORDS_BIGENDIAN) && !defined(ETL_BIGENDIAN)
+#define ETL_BIGENDIAN
+#endif
+
+#ifdef WIN32
+#define ETL_DIRECTORY_SEPARATOR                '\\'
+#else
+#define ETL_DIRECTORY_SEPARATOR                '/'
+#endif
+
+#ifndef ETL_FLAG_NONAMESPACE
+# define _ETL                                  ETL_NAMESPACE
+# define _ETL_BEGIN_NAMESPACE  namespace _ETL {
+# define _ETL_END_NAMESPACE            };
+# define _STD_BEGIN_NAMESPACE  namespace std {
+# define _STD_END_NAMESPACE            };
+#else
+# define _ETL
+# define _ETL_BEGIN_NAMESPACE
+# define _ETL_END_NAMESPACE
+# define _STD_BEGIN_NAMESPACE
+# define _STD_END_NAMESPACE
+#endif
+
+#define _ETL_BEGIN_CDECLS              extern "C" {
+#define _ETL_END_CDECLS                        }
+
+#ifdef _REENTRANT
+#define ETL_REENTRANT  1
+#endif
+
+/* If __FUNC__ is not defined,
+** try to define it. If we cannot,
+** then just leave it undefined.
+*/
+#ifndef __FUNC__
+/*
+ * # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
+#   define __FUNC__    __PRETTY_FUNCTION__
+# else
+#  if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#   define __FUNC__    __func__
+#  endif
+# endif
+*/
+#endif
+
+#ifdef __GNUG__
+#define ETL_DEPRECATED_FUNCTION                __attribute__ ((deprecated))
+#else
+#define ETL_DEPRECATED_FUNCTION
+#endif
+
+#ifndef NULL
+#define NULL   0
+#endif
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/etl_profile_.h.in b/ETL/tags/0.4.11/ETL/etl_profile_.h.in
new file mode 100644 (file)
index 0000000..6b21634
--- /dev/null
@@ -0,0 +1,138 @@
+/* ETL/etl_profile_.h.in.  Generated from configure.ac by autoheader.  */
+
+
+// We want to be autoconf/autoheader friendly, so 
+// if the developer has already included an
+// autoheader-generated configuration script, 
+// we can assume that the user knew what they
+// were doing and let them use their own config.h.
+//#ifndef PACKAGE_TARNAME
+
+
+/* Define to 1 if you have the `CreateThread' function. */
+#undef HAVE_CREATETHREAD
+
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `kill' function. */
+#undef HAVE_KILL
+
+/* Define to 1 if you have the `kernel32' library (-lkernel32). */
+#undef HAVE_LIBKERNEL32
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+#undef HAVE_LIBPTHREAD
+
+/* Define to 1 if you have the `user32' library (-luser32). */
+#undef HAVE_LIBUSER32
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `pipe' function. */
+#undef HAVE_PIPE
+
+/* Define to 1 if you have the `pthread_create' function. */
+#undef HAVE_PTHREAD_CREATE
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if you have the `pthread_rwlock_init' function. */
+#undef HAVE_PTHREAD_RWLOCK_INIT
+
+/* Define to 1 if you have the `pthread_yield' function. */
+#undef HAVE_PTHREAD_YIELD
+
+/* Define to 1 if you have the `QueryPerformanceCounter' function. */
+#undef HAVE_QUERYPERFORMANCECOUNTER
+
+/* Define to 1 if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
+/* Define to 1 if you have the `sched_yield' function. */
+#undef HAVE_SCHED_YIELD
+
+/* Define to 1 if you have the `sscanf' function. */
+#undef HAVE_SSCANF
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/times.h> header file. */
+#undef HAVE_SYS_TIMES_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Define to 1 if you have the `vsprintf' function. */
+#undef HAVE_VSPRINTF
+
+/* Define to 1 if you have the `vsscanf' function. */
+#undef HAVE_VSSCANF
+
+/* Define to 1 if you have the <windows.h> header file. */
+#undef HAVE_WINDOWS_H
+
+/* Define to 1 if you have the `__clone' function. */
+#undef HAVE___CLONE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* define if the vsnprintf function is mangled */
+#undef vsnprintf
+
+
+//#endif // ifndef PACKAGE_TARNAME
+
diff --git a/ETL/tags/0.4.11/ETL/fastangle b/ETL/tags/0.4.11/ETL/fastangle
new file mode 100644 (file)
index 0000000..5f586a6
--- /dev/null
@@ -0,0 +1,36 @@
+// <fastangle> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Fast Angle Abstraction Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __FASTANGLE__
+#define __FASTANGLE__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_fastangle.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/fixed b/ETL/tags/0.4.11/ETL/fixed
new file mode 100644 (file)
index 0000000..3e83c41
--- /dev/null
@@ -0,0 +1,36 @@
+// <fixed> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Fixed-Point Math Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __FIXED__
+#define __FIXED__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_fixed.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/gaussian b/ETL/tags/0.4.11/ETL/gaussian
new file mode 100644 (file)
index 0000000..35d2ae8
--- /dev/null
@@ -0,0 +1,36 @@
+// <gaussian> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Gaussian Blur Template
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __GAUSSIAN__
+#define __GAUSSIAN__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_gaussian.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/handle b/ETL/tags/0.4.11/ETL/handle
new file mode 100644 (file)
index 0000000..d957f76
--- /dev/null
@@ -0,0 +1,47 @@
+// <handle> -*- C++ -*-
+/* === E T L =============================================================== */
+/*!    \file handle
+**     $Id$
+**     \brief Template Object Handle
+**
+**     \legal
+**     Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**     Copyright (c) 2008 Chris Moore
+**
+**     This package is free software; you can redistribute it and/or
+**     modify it under the terms of the GNU General Public License as
+**     published by the Free Software Foundation; either version 2 of
+**     the License, or (at your option) any later version.
+**
+**     This package is distributed in the hope that it will be useful,
+**     but WITHOUT ANY WARRANTY; without even the implied warranty of
+**     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+**     General Public License for more details.
+**     \endlegal
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __HANDLE__
+#define __HANDLE__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+// include the next line in an attempt to increase stability
+// it seems to make things much *less* stable on MS Windows
+#ifndef _WIN32
+#define ETL_LOCK_REFCOUNTS
+#endif
+
+#ifdef ETL_LOCK_REFCOUNTS
+#  include "mutex"
+#endif
+
+#include "_handle.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/hermite b/ETL/tags/0.4.11/ETL/hermite
new file mode 100644 (file)
index 0000000..d6b803a
--- /dev/null
@@ -0,0 +1,36 @@
+// <hermite> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Hermite Curve Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __HERMITE__
+#define __HERMITE__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_hermite.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/ipc b/ETL/tags/0.4.11/ETL/ipc
new file mode 100644 (file)
index 0000000..3a6c168
--- /dev/null
@@ -0,0 +1,41 @@
+// <ipc> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Inter-Process Commumnication Classes
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __IPC__
+#define __IPC__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_mutex_null.h"
+
+#include "_mutex_pthreads.h"
+
+#include "_condition.h"
+#include "_rwlock.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/misc b/ETL/tags/0.4.11/ETL/misc
new file mode 100644 (file)
index 0000000..239862f
--- /dev/null
@@ -0,0 +1,36 @@
+// <misc> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Misc
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __MISC__
+#define __MISC__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_misc.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/mutex b/ETL/tags/0.4.11/ETL/mutex
new file mode 100644 (file)
index 0000000..f7a9939
--- /dev/null
@@ -0,0 +1,42 @@
+// <mutex> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Mutex Classes
+** $Id$
+**
+** Copyright (c) 2008 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __MUTEX__
+#define __MUTEX__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#ifdef HAVE_LIBPTHREAD
+#  include "_mutex_pthreads_simple.h"
+#else
+#ifdef _WIN32
+#  include "_mutex_win32.h"
+#endif
+#endif
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/pen b/ETL/tags/0.4.11/ETL/pen
new file mode 100644 (file)
index 0000000..78c32c3
--- /dev/null
@@ -0,0 +1,36 @@
+// <pen> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Pen Template Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __PEN__
+#define __PEN__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_pen.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/random b/ETL/tags/0.4.11/ETL/random
new file mode 100644 (file)
index 0000000..7bd681a
--- /dev/null
@@ -0,0 +1,36 @@
+// <random> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Random Number Generator Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __RANDOM__
+#define __RANDOM__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_random.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/rect b/ETL/tags/0.4.11/ETL/rect
new file mode 100644 (file)
index 0000000..2c8b5c5
--- /dev/null
@@ -0,0 +1,36 @@
+// <rect> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Rect
+** $Id$
+**
+** Copyright (c) 2002 Adrian Bentley
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __RECT__
+#define __RECT__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_rect.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/ref_count b/ETL/tags/0.4.11/ETL/ref_count
new file mode 100644 (file)
index 0000000..1df6fc0
--- /dev/null
@@ -0,0 +1,36 @@
+// <ref_count> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** 
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __REF_COUNT__
+#define __REF_COUNT__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_ref_count.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/smach b/ETL/tags/0.4.11/ETL/smach
new file mode 100644 (file)
index 0000000..32bd45c
--- /dev/null
@@ -0,0 +1,36 @@
+// <smach> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** State Machine Abstraction Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SMACH__
+#define __SMACH__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_smach.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/smart_ptr b/ETL/tags/0.4.11/ETL/smart_ptr
new file mode 100644 (file)
index 0000000..9209811
--- /dev/null
@@ -0,0 +1,36 @@
+// <smart_ptr> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Template Smart Pointer
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SMART_PTR__
+#define __SMART_PTR__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_smart_ptr.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/spline b/ETL/tags/0.4.11/ETL/spline
new file mode 100644 (file)
index 0000000..9c8452e
--- /dev/null
@@ -0,0 +1,37 @@
+// <spline> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Spline Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SPLINE__
+#define __SPLINE__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_bspline.h"
+#include "_curve.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/status b/ETL/tags/0.4.11/ETL/status
new file mode 100644 (file)
index 0000000..f17161d
--- /dev/null
@@ -0,0 +1,38 @@
+#ifdef THIS_CODE_IS_NOT_USED
+// <status> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Status Callback Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __STATUS__
+#define __STATUS__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_status.h"
+
+/* === E N D =============================================================== */
+
+#endif
+#endif /* THIS_CODE_IS_NOT_USED */
diff --git a/ETL/tags/0.4.11/ETL/stringf b/ETL/tags/0.4.11/ETL/stringf
new file mode 100644 (file)
index 0000000..36ae4be
--- /dev/null
@@ -0,0 +1,36 @@
+// <stringf> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** stringf Procedure
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __STRINGF__
+#define __STRINGF__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_stringf.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/surface b/ETL/tags/0.4.11/ETL/surface
new file mode 100644 (file)
index 0000000..79f484b
--- /dev/null
@@ -0,0 +1,36 @@
+// <surface> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Surface Abstraction Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SURFACE__
+#define __SURFACE__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_surface.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/thread b/ETL/tags/0.4.11/ETL/thread
new file mode 100644 (file)
index 0000000..6aeb221
--- /dev/null
@@ -0,0 +1,36 @@
+// <thread> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Thread Abstraction Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __THREAD__
+#define __THREAD__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_thread.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/trivial b/ETL/tags/0.4.11/ETL/trivial
new file mode 100644 (file)
index 0000000..efc7ebc
--- /dev/null
@@ -0,0 +1,36 @@
+// <trivial> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Trivial Template Class
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __TRIVIAL__
+#define __TRIVIAL__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_trivial.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/ETL/value b/ETL/tags/0.4.11/ETL/value
new file mode 100644 (file)
index 0000000..b19739c
--- /dev/null
@@ -0,0 +1,36 @@
+// <value> -*- C++ -*-
+/*! ========================================================================
+** Extended Template and Library
+** Generic Value Template
+** $Id$
+**
+** Copyright (c) 2002 Adrian Bentley
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __VALUE__
+#define __VALUE__
+
+/* === H E A D E R S ======================================================= */
+
+#include "etl_config.h"
+
+#include "_value.h"
+
+/* === E N D =============================================================== */
+
+#endif
diff --git a/ETL/tags/0.4.11/Makefile.am b/ETL/tags/0.4.11/Makefile.am
new file mode 100644 (file)
index 0000000..84d0c4e
--- /dev/null
@@ -0,0 +1,78 @@
+# $Id$
+
+MAINTAINERCLEANFILES=COPYING INSTALL config/config.guess config/config.sub config/ltmain.sh config/install-sh config/mkinstalldirs config/aclocal.m4 config/missing config/texinfo.tex config/depcomp aclocal.m4 config.h.in configure stamp-h.in Makefile.in config.log config.status .doc_stamp .DS_Store include/etl_profile.h.in doxygen.cfg
+
+SUBDIRS=ETL test
+
+# Install the pkg-config file:
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = ETL.pc
+
+#Install the -config/m4 alternative to pkg-config:
+bin_SCRIPTS=ETL-config
+aclocaldir = $(prefix)/share/aclocal
+
+ACLOCAL_AMFLAGS = -I m4
+
+EXTRA_DIST=COPYING m4/subs.m4 config/depcomp m4/cxx_macros.m4 ETL.pbproj/project.pbxproj ETL.pbproj/etl_profile.h ETL.pbproj/frameworkfix.cpp ETL-config.in m4/ETL.m4 doxygen.cfg.in doxygen.cfg ETL.pc.in
+
+CVS=cvs
+SVN=svn
+TAG=@PACKAGE_TARNAME@_@VERSION_MAJ@_@VERSION_MIN@_@VERSION_REV@
+
+GREP=grep
+
+PRINTF=printf
+
+SH=sh
+
+DOXYGEN=doxygen
+
+stats:
+       -@echo
+       -@echo  -- Stats
+       -@echo
+       -@$(PRINTF) "Total lines: "
+       -@wc -l $(shell find $(top_srcdir)/ETL -name '*.[ch]*') | $(GREP) total
+       -@$(PRINTF) "Total size: "
+       -@du -hcs $(shell find $(top_srcdir)/ETL -name '*.[ch]*') | $(GREP) total
+       -@echo 
+
+tagstable:
+       -$(SVN) delete $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Removing old tag"
+       $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Copying everything over"
+
+tagrelease:
+       $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/$(TAG) -m "Release $(TAG)"
+
+ChangeLog:
+       -svn update
+       svn2cl --include-rev || touch ChangeLog
+
+listfixmes:
+       -@echo
+       -@echo  -- List of pending FIXMEs
+       -@echo
+       -@$(GREP) FIXME -n $(shell find $(top_srcdir) -name '*.[ch]*')
+       -@echo
+
+listhacks:
+       -@echo
+       -@echo  -- List of pending HACKs
+       -@echo
+       -@$(GREP) HACK -n $(shell find $(top_srcdir) -name '*.[ch]*')
+       -@echo
+
+run: check
+
+.doc_stamp: doxygen.cfg
+       $(DOXYGEN) doxygen.cfg
+       touch .doc_stamp
+
+html: .doc_stamp
+
+rtf: .doc_stamp
+
+docs: html
+
+.PHONY: stats tagstable tagrelease listfixmes listhacks check docs pdf html rtf
diff --git a/ETL/tags/0.4.11/NEWS b/ETL/tags/0.4.11/NEWS
new file mode 100644 (file)
index 0000000..6b4ca1a
--- /dev/null
@@ -0,0 +1,45 @@
+              ETL releases
+
+More detailed notes are available on the releases page:
+
+http://synfig.org/Releases
+
+ 0.04.11 (SVN 1837) - March 3, 2008 - Bug fixes
+
+ * Update the website URL to synfig.org instead of synfig.com
+ * Removed the 'bootstrap' script for building.  Use autoreconf instead
+ * Fixed errors and warnings detected by a pre-release version of GCC 4.3
+ * Make ETL-config a wrapper around pkg-config.
+ * Wrap the refcounting stuff in mutexes
+ * Don't wrap angles by 360 degrees
+ * Minor cleanups and typo fixes
+ 0.04.10 (SVN 878) - October 10, 2007 - Bug fixes
+
+  * Fix dirname for absolute paths (#1793306)
+  * Fix minor issues and typos
+  * Various changes to the 'angle' code.  89+360 < 90;  90 == 90+360, !360 is true, etc.
+  * Resolve confusion about whether angles are clockwise, and whether they're stored in radians.
+  * Fix 'make check' for 'fixed' so that it doesn't fail.  Tidy the output, too.
+
+ 0.04.09 (SVN 530) - June 20, 2006 - Bug fixes
+
+  * Fix amd64 issue
+  * Some tests fixes
+  * Misc bug fixes
+  * Add better code for finding closest point to a bezier  (#1672033)
+
+ 0.04.08 (SVN 139) - February 27, 2006 - Bug fixes
+
+  * Update doxygen configuration
+  * Misc bug fixes
+
+ 0.04.07 (SVN 52) - November 6, 2005 - Bug fixes
+
+  * Add ./configure options for debug, warnings, optimisation, profiling
+  * Misc bug fixes
+
+ 0.04.06 - November 3, 2005 - First release!
+
+  * First release!
+
diff --git a/ETL/tags/0.4.11/README b/ETL/tags/0.4.11/README
new file mode 100644 (file)
index 0000000..90e4fdd
--- /dev/null
@@ -0,0 +1,36 @@
+              ETL -- Extended Template Library
+
+ETL is a multi-platform class and template library designed to add
+new datatypes and functions which combine well with the existing
+types and functions from the C++ Standard Template Library (STL).
+
+Web:  http://synfig.org/
+SVN:  http://svn.voria.com/code/ETL/
+Proj: http://sf.net/projects/synfig/
+IRC:  irc://irc.freenode.net/synfig
+
+Please use the IRC channel and the sf.net tracker to get support and
+report bugs, request features and submit patches.
+
+Copyright
+
+Copyright 2002 Robert B. Quattlebaum Jr.
+Copyright 2002 Adrian Bentley
+Copyright 2007 Chris Moore
+
+Licence
+
+This package is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of
+the License, or (at your option) any later version.
+
+This package is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+or visit http://www.gnu.org/licenses/gpl.html
diff --git a/ETL/tags/0.4.11/config/pkg-support/ETL-devel.info b/ETL/tags/0.4.11/config/pkg-support/ETL-devel.info
new file mode 100755 (executable)
index 0000000..4ba67fd
--- /dev/null
@@ -0,0 +1,14 @@
+Title @_PACKAGE_@ @_VERSION_@
+Version @_RELEASE_@
+Description @_PACKAGE_NAME_@
+DefaultLocation /Library/Frameworks
+DeleteWarning 
+NeedsAuthorization YES
+DisableStop NO
+UseUserMask YES
+Application NO
+Relocatable YES
+Required NO
+InstallOnly NO
+RequiresReboot NO
+InstallFat NO
diff --git a/ETL/tags/0.4.11/config/pkg-support/devel-resources/License.rtf b/ETL/tags/0.4.11/config/pkg-support/devel-resources/License.rtf
new file mode 100755 (executable)
index 0000000..52701d7
--- /dev/null
@@ -0,0 +1,10 @@
+{\rtf1\mac\ansicpg10000\cocoartf102
+{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\vieww9000\viewh9000\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+
+\f0\b\fs36 \cf0 This will be the license.
+\f1\b0\fs24 \
+\
+I intend to licence this software under the LGPL. }
\ No newline at end of file
diff --git a/ETL/tags/0.4.11/config/pkg-support/devel-resources/ReadMe.rtf b/ETL/tags/0.4.11/config/pkg-support/devel-resources/ReadMe.rtf
new file mode 100755 (executable)
index 0000000..17874b1
--- /dev/null
@@ -0,0 +1,7 @@
+{\rtf1\mac\ansicpg10000\cocoartf102
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\margl1440\margr1440\vieww9000\viewh9000\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+
+\f0\fs24 \cf0 This is the readme.}
\ No newline at end of file
diff --git a/ETL/tags/0.4.11/config/pkg-support/devel-resources/Welcome.rtf b/ETL/tags/0.4.11/config/pkg-support/devel-resources/Welcome.rtf
new file mode 100755 (executable)
index 0000000..50c42a5
--- /dev/null
@@ -0,0 +1,6 @@
+{\rtf1\mac\ansicpg10000\cocoartf102
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+
+\f0\fs24 \cf0 This is the welcome file.}
\ No newline at end of file
diff --git a/ETL/tags/0.4.11/config/pkg-support/devel-resources/install.sh b/ETL/tags/0.4.11/config/pkg-support/devel-resources/install.sh
new file mode 100755 (executable)
index 0000000..7cb2058
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+# finish up the installation
+# this script should be executed using the sudo command
+# this file is copied to ETL-devel.post_install and ETL-devel.post_upgrade
+# inside the .pkg bundle
+echo "Running post-install script"
+umask 022
+sleep 1
+
+RESOURCE_DIR=`dirname $0`
+
+cd RESOURCE_DIR
+
+echo "Creating ETL-config script"
+sleep 1
+[ -d /usr/local ] || mkdir /usr/local
+[ -d /usr/local/bin ] || mkdir /usr/local/bin
+[ -d /usr/local/include ] || mkdir /usr/local/include
+[ -d /usr/local/lib ] || mkdir /usr/local/lib
+[ -d /usr/local/sbin ] || mkdir /usr/local/sbin
+
+# If we already have a directory called ETL in our include directory, nuke it
+[ -d /usr/local/include/ETL ] && rm -fr /usr/local/include/ETL
+
+ln -s /usr/local/include/ETL /Library/Frameworks/ETL.framework/Headers
+sed '
+s:@exec_prefix@:/usr/local:g;
+s:@prefix@:/usr/local:g;
+s:@bindir@:$exec_prefix/bin:g;
+s:@libdir@:$exec_prefix/lib:g;
+s:@includedir@:$prefix/include:g;
+s:@VERSION@:@_VERSION_@:g;
+s:@PACKAGE@:@_PACKAGE_@:g;
+s:@LIBS@::g;
+' < $RESOURCE_DIR/ETL-config.in > /usr/local/bin/ETL-config
+chmod 775 /usr/local/bin/ETL-config
+
+echo "Done with shell script"
+sleep 1
+
+exit 0
+
+
+#echo "Precompiling Headers"
+#/usr/bin/cc -precomp ~/Library/Frameworks/SDL.framework/Headers/SDL.h -o ~/Library/Frameworks/SDL.framework/Headers/SDL.p
+
+# open up the README file
+#open ~/"Readme SDL Developer.txt"
diff --git a/ETL/tags/0.4.11/configure.ac b/ETL/tags/0.4.11/configure.ac
new file mode 100644 (file)
index 0000000..cb7fdaa
--- /dev/null
@@ -0,0 +1,97 @@
+# $Id$
+
+# -- I N I T --------------------------------------------------
+
+AC_INIT([Extended Template Library],[0.4.11],[http://synfig.org/Bugs],[ETL])
+AC_REVISION
+
+AC_CONFIG_AUX_DIR(config)
+AM_CONFIG_HEADER(ETL/etl_profile_.h)
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+
+AM_INIT_AUTOMAKE([ no-define ])
+AM_MAINTAINER_MODE
+
+# -- V A R I A B L E S ----------------------------------------
+
+debug="no"
+
+SVN_REPOSITORY=http://svn.voria.com/code/ETL
+AC_SUBST(SVN_REPOSITORY)
+
+# -- A R G U M E N T S ----------------------------------------
+
+
+# -- P R O G R A M S ------------------------------------------
+
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+
+AC_LANG_CPLUSPLUS
+
+AC_ARG_WARNINGS
+AC_ARG_DEBUG
+AC_ARG_OPTIMIZATION
+AC_ARG_PROFILING
+
+AC_WIN32_QUIRKS
+
+# -- L I B R A R I E S ----------------------------------------
+
+# -- H E A D E R S --------------------------------------------
+
+AH_TOP([
+// We want to be autoconf/autoheader friendly, so 
+// if the developer has already included an
+// autoheader-generated configuration script, 
+// we can assume that the user knew what they
+// were doing and let them use their own config.h.
+//#ifndef PACKAGE_TARNAME
+])
+
+AH_BOTTOM([
+//#endif // ifndef PACKAGE_TARNAME
+])
+
+
+# -- T Y P E S & S T R U C T S --------------------------------
+
+# -- F U N C T I O N S ----------------------------------------
+
+ETL_DEPS
+AC_CHECK_FUNCS([fork])
+AC_CHECK_FUNCS([kill])
+AC_CHECK_FUNCS([pipe])
+
+# -- O U T P U T ----------------------------------------------
+
+AC_SUBST(CFLAGS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(LDFLAGS)
+
+AC_OUTPUT(
+ETL-config
+Makefile
+ETL/Makefile
+test/Makefile
+ETL.pc
+doxygen.cfg
+)
+
+# -- S U M M A R Y --------------------------------------------
+
+echo "
+$PACKAGE_NAME v.$VERSION
+Configuration Summary
+- - - - - -
+
+Install Prefix -------------------> $prefix
+Target Platform ------------------> $host
+Debug Mode -----------------------> $debug
+
+"'$'"CXX ------------------------------> '$CXX'
+"'$'"CXXFLAGS -------------------------> '$CXXFLAGS'
+"
diff --git a/ETL/tags/0.4.11/doxygen.cfg.in b/ETL/tags/0.4.11/doxygen.cfg.in
new file mode 100644 (file)
index 0000000..3ac5c4e
--- /dev/null
@@ -0,0 +1,1220 @@
+# Doxyfile 1.4.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = @PACKAGE@
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = @VERSION@
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, 
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, 
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, 
+# Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like the Qt-style comments (thus requiring an 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = "legal=\if legal" \
+                         endlegal=\endif \
+                         "writeme=\todo This needs to be documented" \
+                         "stub=\todo this is a stub"
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
+# include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = ETL
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+
+FILE_PATTERNS          = *.cpp \
+                         *.h \
+                         *.cxx \
+                         *.hxx \
+                         *.hpp
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = ETL_NO_DEPRECATED \
+                         DOXYGEN_SHOULD_SKIP_THIS \
+                         DOXYGEN_IS_RUNNING
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = gif
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that a graph may be further truncated if the graph's 
+# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH 
+# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), 
+# the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
diff --git a/ETL/tags/0.4.11/m4/ETL.m4 b/ETL/tags/0.4.11/m4/ETL.m4
new file mode 100644 (file)
index 0000000..7c807dd
--- /dev/null
@@ -0,0 +1,74 @@
+# ETL M4 Macro
+# For GNU Autotools
+# $Id$
+#
+# By Robert B. Quattlebaum Jr. <darco@users.sf.net>
+#
+
+AC_DEFUN([ETL_DEPS],
+[
+       AC_C_BIGENDIAN
+       
+       AC_CHECK_LIB(user32, main)
+       AC_CHECK_LIB(kernel32, main)
+       AC_CHECK_LIB(pthread, main)
+               
+       AC_HEADER_STDC
+       
+       AC_CHECK_HEADERS(pthread.h)
+       AC_CHECK_HEADERS(sched.h)
+       AC_CHECK_HEADERS(sys/times.h)
+       AC_CHECK_HEADERS(sys/time.h)
+       AC_CHECK_HEADERS(unistd.h)
+       AC_CHECK_HEADERS(windows.h)
+       AC_CHECK_FUNCS([pthread_create])
+       AC_CHECK_FUNCS([pthread_rwlock_init])
+       AC_CHECK_FUNCS([pthread_yield])
+       AC_CHECK_FUNCS([sched_yield])
+       AC_CHECK_FUNCS([CreateThread])
+       AC_CHECK_FUNCS([__clone])
+       AC_CHECK_FUNCS([QueryPerformanceCounter])
+       
+       AC_CHECK_FUNCS([gettimeofday])
+       AC_CHECK_FUNCS([sscanf])
+       AC_CHECK_FUNCS([vsscanf])
+       AC_CHECK_FUNCS([vsprintf])
+       AC_CHECK_FUNCS([vasprintf])
+       AC_CHECK_FUNCS([vsnprintf],[],[
+               AC_CHECK_FUNC([_vsnprintf],[
+                       AC_DEFINE(vsnprintf,_vsnprintf,[define if the vsnprintf function is mangled])
+                       AC_DEFINE(HAVE_VSNPRINTF,1)
+               ])
+       ])
+])
+
+AC_DEFUN([USING_ETL],
+[
+       AC_ARG_WITH(ETL-includes,
+       [  --with-ETL-includes    Specify location of ETL headers],[
+       CXXFLAGS="$CXXFLAGS -I$withval"
+       ])
+
+       AC_PATH_PROG(ETL_CONFIG,ETL-config,no)
+
+       if test "$ETL_CONFIG" = "no"; then
+               no_ETL_config="yes"
+               $2
+       else
+               AC_MSG_CHECKING([if $ETL_CONFIG works])
+               if $ETL_CONFIG --libs >/dev/null 2>&1; then
+                       ETL_VERSION="`$ETL_CONFIG --version`"
+                       AC_MSG_RESULT([yes, $ETL_VERSION])
+                       CXXFLAGS="$CXXFLAGS `$ETL_CONFIG --cxxflags`"
+                       $1
+               else
+                       AC_MSG_RESULT(no)
+                       no_ETL_config="yes"
+                       $2
+               fi
+       fi
+
+       ETL_DEPS
+])
+
+
diff --git a/ETL/tags/0.4.11/m4/cxx_macros.m4 b/ETL/tags/0.4.11/m4/cxx_macros.m4
new file mode 100644 (file)
index 0000000..8fc247a
--- /dev/null
@@ -0,0 +1,88 @@
+AC_DEFUN([AC_CXX_FUNCTION_NONTYPE_PARAMETERS],
+[AC_CACHE_CHECK(whether the compiler supports function templates with non-type parameters,
+ac_cv_cxx_function_nontype_parameters,
+[AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+template<class T, int N> class A {};
+template<class T, int N> int f(const A<T,N>& x) { return 0; }
+],[A<double, 17> z; return f(z);],
+ ac_cv_cxx_function_nontype_parameters=yes, ac_cv_cxx_function_nontype_parameters=no)
+ AC_LANG_RESTORE
+])
+if test "$ac_cv_cxx_function_nontype_parameters" = yes; then
+  AC_DEFINE(HAVE_FUNCTION_NONTYPE_PARAMETERS,,
+            [define if the compiler supports function templates with non-type parameters])
+fi
+])
+
+AC_DEFUN([AC_CXX_NAMESPACES],
+[AC_CACHE_CHECK(whether the compiler implements namespaces,
+ac_cv_cxx_namespaces,
+[AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
+                [using namespace Outer::Inner; return i;],
+ ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
+ AC_LANG_RESTORE
+])
+if test "$ac_cv_cxx_namespaces" = yes; then
+  AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
+fi
+])
+
+AC_DEFUN([AC_CXX_HAVE_COMPLEX],
+[AC_CACHE_CHECK(whether the compiler has complex<T>,
+ac_cv_cxx_have_complex,
+[AC_REQUIRE([AC_CXX_NAMESPACES])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <complex>
+#ifdef HAVE_NAMESPACES
+using namespace std;
+#endif],[complex<float> a; complex<double> b; return 0;],
+ ac_cv_cxx_have_complex=yes, ac_cv_cxx_have_complex=no)
+ AC_LANG_RESTORE
+])
+if test "$ac_cv_cxx_have_complex" = yes; then
+  AC_DEFINE(HAVE_COMPLEX,,[define if the compiler has complex<T>])
+fi
+])
+
+AC_DEFUN([AC_CXX_HAVE_SSTREAM],
+[AC_CACHE_CHECK(whether the compiler has stringstream,
+ac_cv_cxx_have_sstream,
+[AC_REQUIRE([AC_CXX_NAMESPACES])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <sstream>
+#ifdef HAVE_NAMESPACES
+using namespace std;
+#endif],[stringstream message; message << "Hello"; return 0;],
+ ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no)
+ AC_LANG_RESTORE
+])
+if test "$ac_cv_cxx_have_sstream" = yes; then
+  AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream])
+fi
+])
+
+AC_DEFUN([AC_CXX_MUTABLE],
+[AC_CACHE_CHECK(whether the compiler supports the mutable keyword,
+ac_cv_cxx_mutable,
+[AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+class A { mutable int i;
+          public:
+          int f (int n) const { i = n; return i; }
+        };
+],[A a; return a.f (1);],
+ ac_cv_cxx_mutable=yes, ac_cv_cxx_mutable=no)
+ AC_LANG_RESTORE
+])
+if test "$ac_cv_cxx_mutable" = yes; then
+  AC_DEFINE(HAVE_MUTABLE,,[define if the compiler supports the mutable keyword])
+fi
+])
+
diff --git a/ETL/tags/0.4.11/m4/subs.m4 b/ETL/tags/0.4.11/m4/subs.m4
new file mode 100644 (file)
index 0000000..640dd02
--- /dev/null
@@ -0,0 +1,244 @@
+
+## AC_ARG_WARNINGS()
+##
+## Provide the --enable-warnings configure argument, set to 'minimum'
+## by default.
+##
+AC_DEFUN([AC_ARG_WARNINGS],
+[
+  AC_ARG_ENABLE([warnings],
+      [  --enable-warnings=[[none|minimum|maximum|hardcore]]
+                          Control compiler pickyness.  [[default=maximum]]],
+      [gtkmm_enable_warnings="$enableval"],
+      gtkmm_enable_warnings="maximum")
+
+  AC_MSG_CHECKING([for compiler warning flags to use])
+
+  gtkmm_warning_flags=''
+
+  case "$gtkmm_enable_warnings" in
+    none|no)     gtkmm_warning_flags='';;
+    minimum|yes) gtkmm_warning_flags='-Wall -Wno-unused-parameter';;
+    maximum)     gtkmm_warning_flags='-W -Wall';;
+    hardcore)    gtkmm_warning_flags='-W -Wall -Werror';;
+  esac
+
+  gtkmm_use_flags=''
+
+  if test "x$gtkmm_warning_flags" != "x"
+  then
+    echo 'int foo() { return 0; }' > conftest.cc
+
+    for flag in $gtkmm_warning_flags
+    do
+      # Test whether the compiler accepts the flag.  GCC doesn't bail
+      # out when given an unsupported flag but prints a warning, so
+      # check the compiler output instead.
+      gtkmm_cxx_out="`$CXX $flag -c conftest.cc 2>&1`"
+      rm -f conftest.$OBJEXT
+      test "x${gtkmm_cxx_out}" = "x" && \
+        gtkmm_use_flags="${gtkmm_use_flags:+$gtkmm_use_flags }$flag"
+    done
+
+    rm -f conftest.cc
+    gtkmm_cxx_out=''
+  fi
+
+  if test "x$gtkmm_use_flags" != "x"
+  then
+    for flag in $gtkmm_use_flags
+    do
+      case " $CXXFLAGS " in
+        *" $flag "*) ;; # don't add flags twice
+        *)           CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$flag";;
+      esac
+    done
+  else
+    gtkmm_use_flags='none'
+  fi
+
+  AC_MSG_RESULT([$gtkmm_use_flags])
+])
+
+
+
+
+AC_DEFUN([AC_ARG_DEBUG],
+[
+       AC_MSG_CHECKING([for debug flags])
+
+       AC_ARG_ENABLE(debug,[  --enable-debug           Build in debugging mode],[
+               debug=$enableval
+       ],[
+               debug="no"
+       ])
+       debug_flags=''
+
+       case "$debug" in
+               yes)
+                       debug_flags="-D_DEBUG -g"
+               ;;
+               half)
+                       debug_flags="-DNDEBUG -g"
+               ;;
+               no|*)
+                       debug_flags="-DNDEBUG -Wno-deprecated"
+               ;;
+       esac
+
+
+       CXXFLAGS="`echo $CXXFLAGS | sed s:-g::` $debug_flags"
+       CFLAGS="`echo $CFLAGS | sed s:-g::` $debug_flags"
+
+       AC_MSG_RESULT([$debug_flags])
+])
+
+
+
+
+AC_DEFUN([AC_ARG_OPTIMIZATION],
+[
+       AC_MSG_CHECKING([for optimization flags])
+
+       AC_ARG_ENABLE(optimization,[  --enable-optimization=[[0,1,2,3,4]] Select optimization level (default=2)],[
+               optimization=$enableval
+       ],[
+               optimization="2"
+       ])
+       optimization_flags=''
+       case "$optimization" in
+               0|no)   optimization_flags="-O0";;
+               1)              optimization_flags="-O1";;
+               2|yes)  optimization_flags="-O2";;
+               pass1)  optimization_flags="-O2 -fprofile-arcs";;
+               pass2)  optimization_flags="-O2 -fbranch-probabilities";;
+               3)              optimization_flags="-O3";;
+               *)              optimization_flags="-O4";;
+       esac
+       CXXFLAGS="`echo $CXXFLAGS | sed 's:-O.::g'` $optimization_flags"
+       CFLAGS="`echo $CFLAGS | sed 's:-O.::g'` $optimization_flags"
+       AC_MSG_RESULT([$optimization_flags])    
+])
+
+AC_DEFUN([AC_ARG_PROFILE_ARCS],
+[
+       AC_MSG_CHECKING([for arc profiling])
+
+       AC_ARG_ENABLE(profile-arcs,[  --enable-profile-arcs      Enable arc profiling],[
+               profile_arcs=$enableval
+       ],[
+               profile_arcs=no
+       ])
+       
+       if test $profile_arcs = "yes" ; then {
+               CXXFLAGS="$CXXFLAGS -fprofile-arcs";
+               CFLAGS="$CFLAGS -fprofile-arcs";
+       } ; fi
+               
+       AC_MSG_RESULT([$profile_arcs])  
+])
+
+AC_DEFUN([AC_ARG_BRANCH_PROBABILITIES],
+[
+       AC_MSG_CHECKING([for branch-probabilities])
+
+       AC_ARG_ENABLE(branch-probabilities,[  --enable-branch-probabilities      Enable branch-probabilities],[
+               branch_probabilities=$enableval
+       ],[
+               branch_probabilities=no
+       ])
+       
+       if test $branch_probabilities = "yes" ; then {
+               CXXFLAGS="$CXXFLAGS -fbranch-probabilities";
+               CFLAGS="$CFLAGS -fbranch-probabilities";
+       } ; fi
+               
+       AC_MSG_RESULT([$branch_probabilities])  
+])
+
+AC_DEFUN([AC_ARG_PROFILING],
+[
+       AC_MSG_CHECKING([for profiling])
+
+       AC_ARG_ENABLE(profiling,[  --enable-profiling      Enable profiling using gprof],[
+               profiling=$enableval
+       ],[
+               profiling=no
+       ])
+       
+       if test $profiling = "yes" ; then {
+               CFLAGS="$CFLAGS -pg";
+               CXXFLAGS="$CXXFLAGS -pg";
+               LDFLAGS="$LDFLAGS -pg";
+               LIBS="$LIBS";
+       } ; fi
+               
+       AC_MSG_RESULT([$profiling])     
+])
+
+MINGW_FLAGS="-mno-cygwin"
+
+
+AC_DEFUN([AC_WIN32_QUIRKS],
+[
+
+case "$host" in
+  *mingw*)
+    AC_MSG_CHECKING([the flavor of the compiler])
+    if ( $CC --version | grep -q mingw ) ; then {
+        AC_MSG_RESULT([compiler is mingw special])
+        LIBTOOL_PATCH_SED="
+            s/dir=\"\$absdir\"/dir=\`cygpath -d -m \"\$absdir\"\`/;
+            s/absdir=\`cd \"\$dir\" && pwd\`/absdir=\`cygpath -d -m \"\$dir\"\`/;
+            s/# We need an absolute path/dir=\`cygpath -d -m \"\$dir\"\` # We need an absolute path/;
+            s- /usr/lib- C:/mingw/lib-g;
+            s-\"/lib -\"C:/mingw/lib -g;
+            s- /lib/ - -g;
+        ";
+        sys_lib_dlsearch_path_spec="C:/mingw/lib"
+        ac_default_prefix=`cygpath -d -m "$ac_default_prefix"`;
+    } else {
+    AC_MSG_RESULT([compiler is cygwin stock, adding -mno-cygwin])
+    CPP="$CPP $MINGW_FLAGS"
+    CC="$CC $MINGW_FLAGS"
+    CXX="$CXX $MINGW_FLAGS -L/usr/$host/lib -I/usr/include/c++/3.3.3/$host"
+    CXXCPP="$CXXCPP $MINGW_FLAGS"
+
+
+} ; fi
+
+    LTCC="gcc"
+    CXXFLAGS="$CXXFLAGS -LC:/GTK/lib"
+    CFLAGS="$CFLAGS -LC:/GTK/lib"
+    LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" 
+dnl    LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc"
+    ;;
+  *cygwin*)
+    LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols"
+dnl    LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console"
+    CXXFLAGS="$CXXFLAGS -I/target/include"
+    CFLAGS="$CFLAGS -I/target/include"
+    ;;
+  powerpc-apple*)
+    echo Adding mac-specific optimization flags. . .
+    CXXFLAGS="$CXXFLAGS $G5OPTFLAGS"
+    ;;
+esac
+
+
+])
+
+AC_DEFUN([AC_LIBTOOL_PATCH],
+[
+
+if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then {
+    printf "Patching libtool... "
+    cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2
+    rm libtool
+    mv libtool2 libtool
+    chmod +x libtool
+    AC_MSG_RESULT([patched])
+} fi ;
+
+
+])
diff --git a/ETL/tags/0.4.11/test/Makefile.am b/ETL/tags/0.4.11/test/Makefile.am
new file mode 100644 (file)
index 0000000..b598a8e
--- /dev/null
@@ -0,0 +1,28 @@
+# $Id$
+
+MAINTAINERCLEANFILES=Makefile.in
+AM_CXXFLAGS=@CXXFLAGS@ -I$(top_srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES=-I$(top_srcdir) -I$(top_builddir)
+#TESTS=fixed clock handle angle random hermite stringf pen surface smart_ptr benchmark spline value
+TESTS=fixed clock handle angle random hermite stringf pen surface smart_ptr benchmark
+
+#check_PROGRAMS=fixed handle clock angle random hermite stringf pen surface smart_ptr benchmark smach spline value
+check_PROGRAMS=fixed handle clock angle random hermite stringf pen surface smart_ptr benchmark smach
+
+benchmark_SOURCES=benchmark.cpp
+smart_ptr_SOURCES=smart_ptr.cpp
+surface_SOURCES=surface.cpp
+pen_SOURCES=pen.cpp
+handle_SOURCES=handle.cpp
+angle_SOURCES=angle.cpp
+random_SOURCES=random.cpp
+fixed_SOURCES=fixed.cpp
+smach_SOURCES=smach.cpp
+clock_SOURCES=clock.cpp
+hermite_SOURCES=hermite.cpp
+#spline_SOURCES=spline.cpp
+stringf_SOURCES=stringf.cpp
+#value_SOURCES=value.cpp
+
+# FIXME: fix compiler errors for the spline and value tests.
+EXTRA_DIST=spline.cpp value.cpp
diff --git a/ETL/tags/0.4.11/test/angle.cpp b/ETL/tags/0.4.11/test/angle.cpp
new file mode 100644 (file)
index 0000000..a0ecac6
--- /dev/null
@@ -0,0 +1,528 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Angle Class Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2008 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <stdio.h>
+#include <ETL/angle>
+#include <ETL/fastangle>
+#include <ETL/clock>
+#include <ETL/bezier>
+#include <ETL/hermite>
+
+/* === M A C R O S ========================================================= */
+
+ETL_FASTANGLE_INIT();
+
+using namespace std;
+using namespace etl;
+
+/* === C L A S S E S ======================================================= */
+
+int fastangle_test(void)
+{
+       int ret=0;
+       float largest_error;
+
+       {
+               angle theta;
+               fastangle theta2;
+               float error;
+               largest_error=0.0f;
+
+               for(
+                       theta=angle::degrees(0),theta2=fastangle::degrees(0);
+                       theta<=angle::degrees(360);
+                       theta+=angle::degrees(10),theta2+=fastangle::degrees(10)
+               )
+               {
+                       error=(float)angle::sin(theta).get() -(float)fastangle::sin(theta2).get();
+                       /*
+                       fprintf(stderr,"angle: sin(%d)=%f ;\tfastangle: sin(%d)=%f ;\t diff: %f\n",
+                               (int)angle::degrees(theta),
+                               (float)angle::sin(theta),
+                               (int)fastangle::degrees(theta2),
+                               (float)fastangle::sin(theta2),
+                               error
+                               );
+                       */
+                       if(error > largest_error)
+                               largest_error=error;
+                       if(error < -largest_error)
+                               largest_error=-error;
+
+               }
+       }
+       printf("fastangle: Largest SIN error: (+/-)%f\n",largest_error);
+       if(largest_error>0.075)ret++;
+
+       {
+               angle theta;
+               fastangle theta2;
+               float error;
+               largest_error=0.0f;
+
+               for(
+                       theta=angle::degrees(0),theta2=fastangle::degrees(0);
+                       theta<=angle::degrees(360);
+                       theta+=angle::degrees(10),theta2+=fastangle::degrees(10)
+               )
+               {
+                       error=(float)angle::cos(theta).get() -(float)fastangle::cos(theta2).get();
+                       /*
+                       fprintf(stderr,"angle: cos(%d)=%f ;\tfastangle: cos(%d)=%f ;\t diff: %f\n",
+                               (int)angle::degrees(theta),
+                               (float)angle::cos(theta),
+                               (int)fastangle::degrees(theta2),
+                               (float)fastangle::cos(theta2),
+                               error
+                               );
+                       */
+                       if(error > largest_error)
+                               largest_error=error;
+                       if(error < -largest_error)
+                               largest_error=-error;
+
+               }
+       }
+       printf("fastangle: Largest COS error: (+/-)%f\n",largest_error);
+       if(largest_error>0.075)ret++;
+
+       {
+               double val;
+               float error;
+               largest_error=0.0f;
+
+               for(
+                       val=-1.0f;
+                       val<1.0f;
+                       val+=0.01
+               )
+               {
+                       error=angle::radians(angle::sin(val)).get() -fastangle::radians(fastangle::sin(val)).get();
+                       /*
+                       fprintf(stderr,"angle: asin(%f)=%frad ;\tfastangle: asin(%f)=%frad ;\t diff: %f\n",
+                               val,
+                               (float)(angle::radians)angle::sin(val),
+                               val,
+                               (float)(fastangle::radians)fastangle::sin(val),
+                               error
+                               );
+                       */
+                       if(error > largest_error)
+                               largest_error=error;
+                       if(error < -largest_error)
+                               largest_error=-error;
+
+               }
+       }
+       printf("fastangle: Largest ASIN error: (+/-)%frad\n",largest_error);
+       if(largest_error>0.075)ret++;
+
+
+       {
+               double val;
+               float error;
+               largest_error=0.0f;
+
+               for(
+                       val=-1.0f;
+                       val<1.0f;
+                       val+=0.01
+               )
+               {
+                       error=angle::radians(angle::cos(val)).get() -fastangle::radians(fastangle::cos(val)).get();
+                       /*
+                       fprintf(stderr,"angle: acos(%f)=%frad ;\tfastangle: acos(%f)=%frad ;\t diff: %f\n",
+                               val,
+                               (float)(angle::radians)angle::cos(val),
+                               val,
+                               (float)(fastangle::radians)fastangle::cos(val),
+                               error
+                               );
+                       */
+                       if(error > largest_error)
+                               largest_error=error;
+                       if(error < -largest_error)
+                               largest_error=-error;
+
+               }
+       }
+       printf("fastangle: Largest ACOS error: (+/-)%frad\n",largest_error);
+       if(largest_error>0.075)ret++;
+
+
+       {
+               angle theta;
+               fastangle theta2;
+               float error;
+               largest_error=0.0f;
+
+               for(
+                       theta=angle::degrees(0),theta2=fastangle::degrees(0);
+                       theta<angle::degrees(360);
+                       theta+=angle::degrees(38),theta2+=fastangle::degrees(38)
+               )
+               {
+                       error=angle::tan(theta).get() - fastangle::tan(theta2).get();
+                       /*
+                       fprintf(stderr,"angle: tan(%d)=%f ;\tfastangle: tan(%d)=%f ;\t diff: %f\n",
+                               (int)angle::degrees(theta),
+                               (float)angle::tan(theta),
+                               (int)fastangle::degrees(theta2),
+                               (float)fastangle::tan(theta2),
+                               error
+                               );
+                       */
+                       if(error > largest_error)
+                               largest_error=error;
+                       if(error < -largest_error)
+                               largest_error=-error;
+
+               }
+       }
+       printf("fastangle: Largest TAN error: (+/-)%f\n",largest_error);
+       if(largest_error>0.75)ret++;
+
+       {
+               double val;
+               float error;
+               largest_error=0.0f;
+
+               for(
+                       val=-4.0f;
+                       val<4.0f;
+                       val+=0.1
+               )
+               {
+                       error=angle::radians(angle::tan(val)).get() -fastangle::radians(fastangle::tan(val)).get();
+                       /*
+                       fprintf(stderr,"angle: atan(%f)=%frad ;\tfastangle: atan(%f)=%frad ;\t diff: %f\n",
+                               val,
+                               (float)(angle::radians)angle::tan(val),
+                               val,
+                               (float)(fastangle::radians)fastangle::tan(val),
+                               error
+                               );
+                       */
+                       if(error > largest_error)
+                               largest_error=error;
+                       if(error < -largest_error)
+                               largest_error=-error;
+
+               }
+       }
+       printf("fastangle: Largest ATAN error: (+/-)%frad\n",largest_error);
+       if(largest_error>0.075)ret++;
+
+
+       {
+               angle theta;
+               float error;
+               largest_error=0.0f;
+
+               for(
+                       theta=angle::degrees(-179);
+                       theta<angle::degrees(180);
+                       theta+=angle::degrees(5)
+               )
+               {
+                       error=angle::radians(theta).get()-fastangle::radians(fastangle::tan(angle::sin(theta).get(),angle::cos(theta).get())).get();
+                       /*
+                       fprintf(stderr,"\tfastangle: atan2(%f, %f)=%fdeg (%f) ;\t diff: %frad\n",
+                               (float)angle::sin(theta),
+                               (float)angle::cos(theta),
+                               (float)(fastangle::degrees)fastangle::tan(angle::sin(theta),angle::cos(theta)),
+                               (float)(fastangle::degrees)fastangle::tan((float)angle::sin(theta)/(float)angle::cos(theta)),
+                               error
+                               );
+                       */
+                       if(error > largest_error)
+                               largest_error=error;
+                       if(error < -largest_error)
+                               largest_error=-error;
+
+               }
+       }
+       printf("fastangle: Largest ATAN2 error: (+/-)%frad\n",largest_error);
+       if(largest_error>0.075)ret++;
+
+       printf("constant tests: %f==%f\n",
+               (float)angle::degrees(angle::tan(1.01)).get(),
+               (float)fastangle::degrees(fastangle::tan(1.01)).get());
+       printf("constant tests: %f==%f\n",
+               (float)angle::degrees(angle::tan(-1.0)).get(),
+               (float)fastangle::degrees(fastangle::tan(-1.0)).get());
+
+       return ret;
+}
+
+template <class Angle>
+void angle_cos_speed_test(void)
+{
+       Angle a,b,c,d;
+       float tmp,tmp2;
+
+       for(tmp=-1.0;tmp<1.0;tmp+=0.000002)
+       {
+               a=(typename Angle::cos)(tmp);
+               b=(typename Angle::cos)(tmp);
+               c=(typename Angle::cos)(tmp);
+               d=(typename Angle::cos)(tmp);
+               tmp2=((typename Angle::cos)(a)).get();
+               tmp2=((typename Angle::cos)(b)).get();
+               tmp2=((typename Angle::cos)(c)).get();
+               tmp2=((typename Angle::cos)(d)).get();
+       }
+}
+template <class Angle>
+void angle_sin_speed_test(void)
+{
+       Angle a,b,c,d;
+       float tmp,tmp2;
+
+       for(tmp=-1.0;tmp<1.0;tmp+=0.000002)
+       {
+               a=(typename Angle::sin)(tmp);
+               b=(typename Angle::sin)(tmp);
+               c=(typename Angle::sin)(tmp);
+               d=(typename Angle::sin)(tmp);
+               tmp2=((typename Angle::sin)(a)).get();
+               tmp2=((typename Angle::sin)(b)).get();
+               tmp2=((typename Angle::sin)(c)).get();
+               tmp2=((typename Angle::sin)(d)).get();
+       }
+}
+template <class Angle>
+void angle_tan_speed_test(void)
+{
+       Angle a,b,c,d;
+       float tmp,tmp2;
+
+       for(tmp=-1.0;tmp<1.0;tmp+=0.000002)
+       {
+               a=(typename Angle::tan)(tmp);
+               b=(typename Angle::tan)(tmp);
+               c=(typename Angle::tan)(tmp);
+               d=(typename Angle::tan)(tmp);
+               tmp2=((typename Angle::tan)(a)).get();
+               tmp2=((typename Angle::tan)(b)).get();
+               tmp2=((typename Angle::tan)(c)).get();
+               tmp2=((typename Angle::tan)(d)).get();
+       }
+}
+template <class Angle, class mytan>
+void angle_atan2_speed_test(void)
+{
+       Angle a,b,c;
+       float x,y;
+
+       for(y=-10.0;y<10.0;y+=0.05)
+               for(x=-10.0;x<10.0;x+=0.05)
+               {
+                       a=mytan(y,x);
+                       a=mytan(x,y);
+                       b=mytan(y,x);
+                       b=mytan(x,y);
+                       c=mytan(y,x);
+                       c=mytan(x,y);
+                       a=mytan(y,x);
+                       a=mytan(x,y);
+                       b=mytan(y,x);
+                       b=mytan(x,y);
+                       c=mytan(y,x);
+                       c=mytan(x,y);
+               }
+}
+
+int fastangle_speed_test(void)
+{
+       int ret=0;
+       float
+               angle_cos_time,
+               fastangle_cos_time,
+               angle_tan_time,
+               fastangle_tan_time,
+               angle_atan2_time,
+               fastangle_atan2_time,
+               angle_sin_time,
+               fastangle_sin_time ;
+
+       etl::clock MyTimer;
+
+       MyTimer.reset();
+       angle_cos_speed_test<angle>();
+       angle_cos_time=MyTimer();
+       printf("angle: Cosine test: %f seconds\n",angle_cos_time);
+
+       MyTimer.reset();
+       angle_cos_speed_test<fastangle>();
+       fastangle_cos_time=MyTimer();
+       printf("fastangle: Cosine test: %f seconds\n",fastangle_cos_time);
+       printf("fastangle is %.02f%% faster\n",(angle_cos_time/fastangle_cos_time)*100.0-100.0);
+
+       MyTimer.reset();
+       angle_sin_speed_test<angle>();
+       angle_sin_time=MyTimer();
+       printf("angle: Sine test: %f seconds\n",angle_sin_time);
+
+       MyTimer.reset();
+       angle_sin_speed_test<fastangle>();
+       fastangle_sin_time=MyTimer();
+       printf("fastangle: Sine test: %f seconds\n",fastangle_sin_time);
+       printf("fastangle is %.02f%% faster\n",(angle_sin_time/fastangle_sin_time)*100.0-100.0);
+
+       MyTimer.reset();
+       angle_tan_speed_test<angle>();
+       angle_tan_time=MyTimer();
+       printf("angle: Tangent test: %f seconds\n",angle_tan_time);
+
+       MyTimer.reset();
+       angle_tan_speed_test<fastangle>();
+       fastangle_tan_time=MyTimer();
+       printf("fastangle: Tangent test: %f seconds\n",fastangle_tan_time);
+       printf("fastangle is %.02f%% faster\n",(angle_tan_time/fastangle_tan_time)*100.0-100.0);
+
+       MyTimer.reset();
+       angle_atan2_speed_test<angle,angle::tan>();
+       angle_atan2_time=MyTimer();
+       printf("angle: arcTangent2 test: %f seconds\n",angle_atan2_time);
+
+       MyTimer.reset();
+       angle_atan2_speed_test<fastangle,fastangle::tan>();
+       fastangle_atan2_time=MyTimer();
+       printf("fastangle: arcTangent2 test: %f seconds\n",fastangle_atan2_time);
+       printf("fastangle is %.02f%% faster\n",(angle_atan2_time/fastangle_atan2_time)*100.0-100.0);
+
+       return ret;
+}
+
+int angle_test()
+{
+       int ret=0;
+       float dist;
+
+       dist=angle::deg(angle::deg(330).dist(angle::deg(30))).get();
+       printf("angle: angular difference between 330deg and 30deg is %0.1fdeg\n",dist);
+       if(floor(dist+0.5)!=300)
+       {
+               printf("angle: error: should be 300deg!\n");
+               ret++;
+       }
+
+       dist=angle::deg(angle::deg(30).dist(angle::deg(330))).get();
+       printf("angle: angular difference between 30deg and 330deg is %0.1fdeg\n",dist);
+       if(floor(dist+0.5)!=-300)
+       {
+               printf("angle: error: should be -300deg!\n");
+               ret++;
+       }
+
+       dist=angle::deg(angle::deg(30).dist(angle::deg(-30))).get();
+       printf("angle: angular difference between 30deg and -30deg is %0.1fdeg\n",dist);
+       if(floor(dist+0.5)!=60)
+       {
+               printf("angle: error: should be 60deg!\n");
+               ret++;
+       }
+
+       dist=angle::deg(angle::deg(-30).dist(angle::deg(30))).get();
+       printf("angle: angular difference between -30deg and 30deg is %0.1fdeg\n",dist);
+       if(floor(dist+0.5)!=-60)
+       {
+               printf("angle: error: should be -60deg!\n");
+               ret++;
+       }
+
+       dist=angle::deg(angle::deg(20).dist(angle::deg(195))).get();
+       printf("angle: angular difference between 20deg and 195deg is %0.1fdeg\n",dist);
+       if(floor(dist+0.5)!=-175)
+       {
+               printf("angle: error: should be -175deg!\n");
+               ret++;
+       }
+
+       dist=angle::deg(angle::deg(20).dist(angle::deg(205))).get();
+       printf("angle: angular difference between 20deg and 205deg is %0.1fdeg\n",dist);
+       if(floor(dist+0.5)!=-185)
+       {
+               printf("angle: error: should be -185deg!\n");
+               ret++;
+       }
+
+       int i;
+
+       for(i=-1000;i<1000;i++)
+       {
+               dist=angle::deg(angle::deg(20+i+360).dist(angle::deg(205+i-360))).get();
+               if(floor(dist+0.5)!=535)
+               {
+                       printf("angle: error: Badness at %d!\n",i);
+                       ret++;
+               }
+
+       }
+
+       for(i=-1000;i<1000;i++)
+       {
+               dist=angle::deg(angle::deg(20+i-360).dist(angle::deg(195+i+360))).get();
+               if(floor(dist+0.5)!=-895)
+               {
+                       printf("angle: error: Badness at %d!\n",i);
+                       ret++;
+               }
+
+       }
+
+
+
+       {
+               float f;
+               angle a(angle::deg(-2005));
+               angle b(angle::deg(200));
+
+               affine_combo<angle> combo;
+
+               hermite<angle> hermie(a,b,b.dist(a),b.dist(a));
+
+               for(f=0;f<1.001;f+=0.1)
+               {
+                       printf("@%f--affine_combo: %f hermie: %f\n",angle::deg(f).get(),angle::deg(combo(a,b,f)).get(),angle::deg(hermie(f)).get());
+               }
+
+       }
+
+       return ret;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=fastangle_test();
+       error+=fastangle_speed_test();
+       error+=angle_test();
+
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/benchmark.cpp b/ETL/tags/0.4.11/test/benchmark.cpp
new file mode 100644 (file)
index 0000000..e453186
--- /dev/null
@@ -0,0 +1,475 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Hermite Curve Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <ETL/clock>
+#include <ETL/hermite>
+#include <ETL/angle>
+#include <ETL/fastangle>
+#include <ETL/fixed>
+#include <ETL/surface>
+#include <ETL/gaussian>
+#include <ETL/calculus>
+#include <stdio.h>
+
+/* === M A C R O S ========================================================= */
+
+using namespace etl;
+//using namespace std;
+
+#define HERMITE_TEST_ITERATIONS                (100000)
+
+/* === C L A S S E S ======================================================= */
+
+/* === P R O C E D U R E S ================================================= */
+
+template <class Angle>
+void angle_cos_speed_test(void)
+{
+       Angle a,b,c,d;
+       float tmp,tmp2;
+
+       for(tmp=-1;tmp<1;tmp+=0.000002f)
+       {
+               a=(typename Angle::cos)(tmp);
+               b=(typename Angle::cos)(tmp);
+               c=(typename Angle::cos)(tmp);
+               d=(typename Angle::cos)(tmp);
+               tmp2=((typename Angle::cos)(a)).get();
+               tmp2=((typename Angle::cos)(b)).get();
+               tmp2=((typename Angle::cos)(c)).get();
+               tmp2=((typename Angle::cos)(d)).get();
+       }
+}
+template <class Angle>
+void angle_sin_speed_test(void)
+{
+       Angle a,b,c,d;
+       float tmp,tmp2;
+
+       for(tmp=-1.0;tmp<1.0;tmp+=0.000002f)
+       {
+               a=(typename Angle::sin)(tmp);
+               b=(typename Angle::sin)(tmp);
+               c=(typename Angle::sin)(tmp);
+               d=(typename Angle::sin)(tmp);
+               tmp2=((typename Angle::sin)(a)).get();
+               tmp2=((typename Angle::sin)(b)).get();
+               tmp2=((typename Angle::sin)(c)).get();
+               tmp2=((typename Angle::sin)(d)).get();
+       }
+}
+template <class Angle>
+void angle_tan_speed_test(void)
+{
+       Angle a,b,c,d;
+       float tmp,tmp2;
+
+       for(tmp=-1;tmp<1;tmp+=0.000002f)
+       {
+               a=(typename Angle::tan)(tmp);
+               b=(typename Angle::tan)(tmp);
+               c=(typename Angle::tan)(tmp);
+               d=(typename Angle::tan)(tmp);
+               tmp2=((typename Angle::tan)(a)).get();
+               tmp2=((typename Angle::tan)(b)).get();
+               tmp2=((typename Angle::tan)(c)).get();
+               tmp2=((typename Angle::tan)(d)).get();
+       }
+}
+template <class Angle, class mytan>
+void angle_atan2_speed_test(void)
+{
+       Angle a,b,c;
+       float x,y;
+
+       for(y=-10;y<10;y+=0.05f)
+               for(x=-10;x<10;x+=0.05f)
+               {
+                       a=mytan(y,x);
+                       a=mytan(x,y);
+                       b=mytan(y,x);
+                       b=mytan(x,y);
+                       c=mytan(y,x);
+                       c=mytan(x,y);
+                       a=mytan(y,x);
+                       a=mytan(x,y);
+                       b=mytan(y,x);
+                       b=mytan(x,y);
+                       c=mytan(y,x);
+                       c=mytan(x,y);
+               }
+}
+
+int fastangle_speed_test(void)
+{
+       int ret=0;
+       float
+               angle_cos_time,
+               fastangle_cos_time,
+               angle_tan_time,
+               fastangle_tan_time,
+               angle_atan2_time,
+               fastangle_atan2_time,
+               angle_sin_time,
+               fastangle_sin_time ;
+
+       etl::clock MyTimer;
+
+       MyTimer.reset();
+       angle_cos_speed_test<angle>();
+       angle_cos_time=MyTimer();
+       printf("angle: Cosine test: %f seconds\n",angle_cos_time);
+
+       MyTimer.reset();
+       angle_cos_speed_test<fastangle>();
+       fastangle_cos_time=MyTimer();
+       printf("fastangle: Cosine test: %f seconds\n",fastangle_cos_time);
+       printf("fastangle is %.02f%% faster\n",(angle_cos_time/fastangle_cos_time)*100.0-100.0);
+
+       MyTimer.reset();
+       angle_sin_speed_test<angle>();
+       angle_sin_time=MyTimer();
+       printf("angle: Sine test: %f seconds\n",angle_sin_time);
+
+       MyTimer.reset();
+       angle_sin_speed_test<fastangle>();
+       fastangle_sin_time=MyTimer();
+       printf("fastangle: Sine test: %f seconds\n",fastangle_sin_time);
+       printf("fastangle is %.02f%% faster\n",(angle_sin_time/fastangle_sin_time)*100.0-100.0);
+
+       MyTimer.reset();
+       angle_tan_speed_test<angle>();
+       angle_tan_time=MyTimer();
+       printf("angle: Tangent test: %f seconds\n",angle_tan_time);
+
+       MyTimer.reset();
+       angle_tan_speed_test<fastangle>();
+       fastangle_tan_time=MyTimer();
+       printf("fastangle: Tangent test: %f seconds\n",fastangle_tan_time);
+       printf("fastangle is %.02f%% faster\n",(angle_tan_time/fastangle_tan_time)*100.0-100.0);
+
+       MyTimer.reset();
+       angle_atan2_speed_test<angle,angle::tan>();
+       angle_atan2_time=MyTimer();
+       printf("angle: arcTangent2 test: %f seconds\n",angle_atan2_time);
+
+       MyTimer.reset();
+       angle_atan2_speed_test<fastangle,fastangle::tan>();
+       fastangle_atan2_time=MyTimer();
+       printf("fastangle: arcTangent2 test: %f seconds\n",fastangle_atan2_time);
+       printf("fastangle is %.02f%% faster\n",(angle_atan2_time/fastangle_atan2_time)*100.0-100.0);
+
+       return ret;
+}
+
+int surface_and_gaussian_blur_test()
+{
+       int ret=0;
+       etl::clock MyTimer;
+       float endtime;
+
+       {
+               surface<float> my_surface(1000,1000);
+
+               MyTimer.reset();
+               gaussian_blur(my_surface.begin(),my_surface.end(),30,30);
+               endtime=MyTimer();
+               printf("surface_and_gaussian_blur_test<float>: %f seconds\n",endtime);
+       }
+
+       {
+               surface<double> my_surface(1000,1000);
+
+               MyTimer.reset();
+               gaussian_blur(my_surface.begin(),my_surface.end(),30,30);
+               endtime=MyTimer();
+               printf("surface_and_gaussian_blur_test<double>: %f seconds\n",endtime);
+       }
+
+       {
+               surface<fixed> my_surface(1000,1000);
+
+               MyTimer.reset();
+               gaussian_blur(my_surface.begin(),my_surface.end(),30,30);
+               endtime=MyTimer();
+               printf("surface_and_gaussian_blur_test<fixed>: %f seconds\n",endtime);
+       }
+
+       return ret;
+}
+
+int hermite_int_test()
+{
+       int ret=0;
+       hermite<int> Hermie;
+       hermite<int>::time_type f;
+       int i;
+
+       etl::clock timer;
+       etl::clock::value_type t;
+
+       Hermie.p1()=0;
+       Hermie.t1()=40000;
+       Hermie.p2()=0;
+       Hermie.t2()=40000;
+
+       Hermie.sync();
+
+       {float t;
+       for(f=0.0f,i=0,timer.reset();i<HERMITE_TEST_ITERATIONS;i++,f+=0.000005f)
+       {
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+       }
+       }
+       t=timer();
+
+       printf("hermite<int>:time=%f milliseconds\n",t*1000);
+       return ret;
+}
+
+int hermite_float_test(void)
+{
+       int ret=0;
+       float f; int i;
+
+       hermite<float> Hermie;
+       etl::clock timer;
+       double t;
+
+       Hermie.p1()=0;
+       Hermie.t1()=1;
+       Hermie.p2()=0;
+       Hermie.t2()=1;
+
+       Hermie.sync();
+
+       {float t;
+       for(f=0.0f,i=0,timer.reset();i<HERMITE_TEST_ITERATIONS;i++,f+=0.000005f)
+       {
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+       }
+       }
+       t=timer();
+
+       printf("hermite<float>:time=%f milliseconds\n",t*1000);
+       return ret;
+}
+
+int hermite_double_test(void)
+{
+       int ret=0,i;
+       float f;
+
+       hermite<double> Hermie;
+       etl::clock timer;
+       double t;
+
+       Hermie.p1()=0;
+       Hermie.t1()=1;
+       Hermie.p2()=0;
+       Hermie.t2()=1;
+
+       Hermie.sync();
+
+       for(f=0.0f,i=0,timer.reset();i<HERMITE_TEST_ITERATIONS;i++,f+=0.000005f)
+       {
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+       }
+       t=timer();
+
+       printf("hermite<double>:time=%f milliseconds\n",t*1000);
+       return ret;
+}
+
+int hermite_fixed_test(void)
+{
+       int ret=0;
+    int i;
+       hermite<fixed> Hermie;
+       hermite<fixed>::time_type f;
+       hermite<fixed>::time_type inc(0.0005f), inc2(1.10);
+       fixed sum(0);
+
+       etl::clock timer;
+       double t;
+
+       Hermie.p1()=0;
+       Hermie.t1()=1;
+       Hermie.p2()=0;
+       Hermie.t2()=1;
+
+       Hermie.sync();
+
+       {fixed t;
+       for(i=0,f=0,timer.reset();i<HERMITE_TEST_ITERATIONS;i++,f+=inc)
+       {
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+               sum+=Hermie(f)+Hermie(f+inc2);
+       }
+       }
+       t=timer();
+
+       printf("hermite<fixed>:time=%f milliseconds\n",t*1000);
+       return ret;
+}
+
+int hermite_angle_test(void)
+{
+       int ret=0,i;
+       float f;
+
+       hermite<angle> Hermie;
+       etl::clock timer;
+       angle tmp;
+       double t;
+
+       Hermie.p1()=angle::degrees(0);
+       Hermie.t1()=angle::degrees(45);
+
+       Hermie.p2()=angle::degrees(-45);
+       Hermie.t2()=angle::degrees(180);
+
+       Hermie.sync();
+
+       for(f=0.0f,i=0,timer.reset();i<HERMITE_TEST_ITERATIONS;i++,f+=0.000005f)
+       {
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+       }
+       t=timer();
+
+       fprintf(stderr,"hermite<angle>:time=%f milliseconds\n",t*1000);
+
+       return ret;
+}
+
+int hermite_fastangle_test(void)
+{
+       int ret=0,i;
+       hermite<fastangle> Hermie;
+       hermite<fastangle>::time_type f;
+
+       etl::clock timer;
+       fastangle tmp;
+       double t;
+
+       Hermie.p1()=fastangle::degrees(0);
+       Hermie.t1()=fastangle::degrees(45);
+
+       Hermie.p2()=fastangle::degrees(-45);
+       Hermie.t2()=fastangle::degrees(180);
+
+       Hermie.sync();
+
+       for(f=0.0f,i=0,timer.reset();i<HERMITE_TEST_ITERATIONS;i++,f+=0.000005f)
+       {
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+       }
+       t=timer();
+
+       fprintf(stderr,"hermite<fastangle>:time=%f milliseconds\n",t*1000);
+
+       return ret;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=fastangle_speed_test();
+       error+=surface_and_gaussian_blur_test();
+       error+=hermite_float_test();
+       error+=hermite_double_test();
+       error+=hermite_int_test();
+       error+=hermite_fixed_test();
+       error+=hermite_angle_test();
+       error+=hermite_fastangle_test();
+
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/clock.cpp b/ETL/tags/0.4.11/test/clock.cpp
new file mode 100644 (file)
index 0000000..652644b
--- /dev/null
@@ -0,0 +1,79 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Clock Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <ETL/clock>
+#include <stdio.h>
+
+/* === M A C R O S ========================================================= */
+
+using namespace etl;
+
+/* === C L A S S E S ======================================================= */
+
+
+/* === P R O C E D U R E S ================================================= */
+
+int basic_test(void)
+{
+       int ret=0;
+       fprintf(stderr,"default etl::clock precision:  %0.8f\n",etl::clock::precision());
+       fprintf(stderr,"realtime etl::clock precision: %0.8f\n",etl::clock_realtime::precision());
+       fprintf(stderr,"proctime etl::clock precision: %0.8f\n",etl::clock_proctime::precision());
+
+       etl::clock_realtime timer;
+       etl::clock::value_type amount,total;
+
+       for(amount=3.0;amount>=0.00015;amount/=2.0)
+       {
+               if(amount*1000000.0<1000.0f)
+                       fprintf(stderr,"waiting %f microseconds...\n",amount*1000000.0);
+               else if(amount*1000.0<400.0f)
+                       fprintf(stderr,"waiting %f milliseconds...\n",amount*1000.0);
+               else
+                       fprintf(stderr,"waiting %f seconds...\n",amount);
+
+               timer.reset();
+               etl::clock::sleep(amount);
+               total=timer();
+               if((total-amount)*1000000.0<1000.0f)
+                       fprintf(stderr," ** I waited %f seconds, error of %f microseconds\n",total,(total-amount)*1000000);
+               else if((total-amount)*1000.0<400.0f)
+                       fprintf(stderr," ** I waited %f seconds, error of %f milliseconds\n",total,(total-amount)*1000);
+               else
+                       fprintf(stderr," ** I waited %f seconds, error of %f seconds\n",total,total-amount);
+
+       }
+       return ret;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=basic_test();
+
+       return error;
+}
+
diff --git a/ETL/tags/0.4.11/test/fixed.cpp b/ETL/tags/0.4.11/test/fixed.cpp
new file mode 100644 (file)
index 0000000..965a8d3
--- /dev/null
@@ -0,0 +1,294 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Fixed-Point Math Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2007 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#define ETL_FIXED_BITS         12
+
+#include <ETL/fixed>
+#include <stdio.h>
+#include <ETL/clock>
+
+/* === M A C R O S ========================================================= */
+
+#ifndef PI
+# define PI (3.1415926535897932384626433832795029L)
+#endif
+
+#define ADD_SUB_TEST   20000000
+#define MUL_TEST               10000000
+#define DIV_TEST               1048573 // at 1048573, fixed point numbers wrap around to zero
+using namespace etl;
+
+/* === C L A S S E S ======================================================= */
+
+template <class value_type>
+struct speed_test
+{
+       double add_sub_test(void)
+       {
+               value_type a=1;
+               value_type b=2;
+               value_type c=3;
+               int i;
+               etl::clock MyTimer;
+               MyTimer.reset();
+               for(i=0;i<ADD_SUB_TEST;i++)
+               {
+                       a+=a; a-=b; a-=c; a+=a;
+                       a+=a; a-=b; a-=c; a+=a;
+                       a+=a; a-=b; a-=c; a+=a;
+                       a+=a; a-=b; a-=c; a+=a;
+                       a+=a; a-=b; a-=c; a+=a;
+                       a+=a; a-=b; a-=c; a+=a;
+                       a+=a; a-=b; a-=c; a+=a;
+               }
+
+               fprintf(stderr, "[%1d]...", int(int(a)/1e9)+5); // so the compiler doesn't optimize everything out
+               return MyTimer();
+       }
+
+       double mul_test(void)
+       {
+               value_type a,b,c,d;
+               a=value_type(2.25);
+               b=value_type(2);
+               c=value_type(4.5);
+               d=value_type(1);
+               const value_type one_and_a_half(static_cast<value_type>(1.5));
+               int i;
+               etl::clock MyTimer;
+               MyTimer.reset();
+               for(i=1;i<MUL_TEST;i++)
+               {
+                       d*=a;d*=b;d*=c;d*=3;d*=i; b*=c;b*=d;b*=d;b*=3; c*=d;c*=one_and_a_half;c*=a;c*=b;c*=3; a*=c;a*=b;a*=3;
+                       d*=a;d*=b;d*=c;d*=3;d*=i; b*=c;b*=d;b*=d;b*=3; c*=d;c*=one_and_a_half;c*=a;c*=b;c*=3; a*=c;a*=b;a*=3;
+                       d*=a;d*=b;d*=c;d*=3;d*=i; b*=c;b*=d;b*=d;b*=3; c*=d;c*=one_and_a_half;c*=a;c*=b;c*=3; a*=c;a*=b;a*=3;
+                       d*=a;d*=b;d*=c;d*=3;d*=i; b*=c;b*=d;b*=d;b*=3; c*=d;c*=one_and_a_half;c*=a;c*=b;c*=3; a*=c;a*=b;a*=3;
+                       d*=a;d*=b;d*=c;d*=3;d*=i; b*=c;b*=d;b*=d;b*=3; c*=d;c*=one_and_a_half;c*=a;c*=b;c*=3; a*=c;a*=b;a*=3;
+                       d*=a;d*=b;d*=c;d*=3;d*=i; b*=c;b*=d;b*=d;b*=3; c*=d;c*=one_and_a_half;c*=a;c*=b;c*=3; a*=c;a*=b;a*=3;
+                       d*=a;d*=b;d*=c;d*=3;d*=i; b*=c;b*=d;b*=d;b*=3; c*=d;c*=one_and_a_half;c*=a;c*=b;c*=3; a*=c;a*=b;a*=3;
+               }
+
+               fprintf(stderr, "[%1d]...", int(int(a)/1e9)+5); // so the compiler doesn't optimize everything out
+               return MyTimer();
+       }
+
+       double div_test(void)
+       {
+               value_type a(30);
+               value_type b(40);
+               value_type acc(0);
+               int i, j;
+               etl::clock MyTimer;
+               MyTimer.reset();
+               for(j=0;j<10;j++)
+                       for(i=1;i<DIV_TEST;i++)
+                       {
+                               a=3+i; b=40+i; b/=a; a/=(i%20)+1; acc+= a;
+                               a=3+i; b=40+i; b/=a; a/=(i%20)+1; acc+= a;
+                               a=3+i; b=40+i; b/=a; a/=(i%20)+1; acc+= a;
+                               a=3+i; b=40+i; b/=a; a/=(i%20)+1; acc+= a;
+                               a=3+i; b=40+i; b/=a; a/=(i%20)+1; acc+= a;
+                               a=3+i; b=40+i; b/=a; a/=(i%20)+1; acc+= a;
+                       }
+
+               fprintf(stderr, "[%1d]...", int(int(acc)/1e9)+5); // so the compiler doesn't optimize everything out
+               return MyTimer();
+       }
+};
+
+/* === P R O C E D U R E S ================================================= */
+
+int basic_test(void)
+{
+       int ret=0;
+
+       fixed a,b,c;
+       double d;
+
+       a=-1;
+       a=std::abs(a);
+       if(a!=fixed(1))
+       {
+               fprintf(stderr,"fixed: abs() failure on line %d in "__FILE__".\n",__LINE__);
+               ret++;
+       }
+
+       d=(double)(fixed(2.5)*fixed(3.0f)/7)-(2.5f*3.0f/7.0f);
+       fprintf(stderr,"fixed: 2.5 * 2 / 7 --- Difference: %f\n",d);
+       if(d<0.0)d=-d;
+       if( d>0.0005)
+       {
+               fprintf(stderr,"fixed: Failed test on line %d in "__FILE__".\n",__LINE__);
+               ret++;
+       }
+
+       a=1043;d=1043;
+       a/=27;d/=27;
+       a+=10.42;d+=10.42;
+       a/=6;d/=6;
+       a*=PI;d*=PI;
+       d-=(double)a;
+       fprintf(stderr,"fixed: ( 1043 / 27 + 10.42 ) / 6 * PI --- Difference: %f\n",d);
+       if(d<0.0)d=-d;
+#ifdef ROUND_TO_NEAREST_INTEGER
+       if( d>0.0005)
+#else
+       if( d>0.0025)
+#endif
+       {
+               fprintf(stderr,"fixed: Failed test on line %d in "__FILE__".\n",__LINE__);
+               ret++;
+       }
+
+       return ret;
+}
+
+int char_test(void)
+{
+       int ret=0;
+
+       fixed_base<unsigned char,8> fix;
+       double flt;
+
+       if(sizeof(fix)!=sizeof(unsigned char))
+       {
+               ret++;
+               fprintf(stderr,"fixed: Size of fixed_base<unsigned char,8> is wrong!\n");
+       }
+
+       flt=1.0;
+       fix=1.0;
+       fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt);
+
+       flt*=0.7;
+       fix*=0.7;
+       fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt);
+
+       flt*=0.7;
+       fix*=0.7;
+       fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt);
+
+       flt*=0.7;
+       fix*=0.7;
+       fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt);
+
+       flt*=0.7;
+       fix*=0.7;
+       fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt);
+
+       flt*=0.7;
+       fix*=0.7;
+       fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt);
+
+       //flt/=0.7;
+       //fix/=0.7;
+       //fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt);
+
+       flt+=0.3;
+       fix+=0.3;
+       fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt);
+
+       flt*=2;
+       fix*=2;
+       fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt);
+
+
+       return ret;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=basic_test();
+       error+=char_test();
+
+       speed_test<float> float_test;
+       speed_test<int> int_test;
+       speed_test<fixed> fixed_test;
+
+       {
+               double flt,fix,inte;
+               fprintf(stderr,"\nAddition/subtraction test...\n");
+
+               fprintf(stderr,"  calculating float.....");
+               flt=float_test.add_sub_test();
+               fprintf(stderr,"   float time: %f sec\n",flt);
+
+               fprintf(stderr,"  calculating fixed.....");
+               fix=fixed_test.add_sub_test();
+               fprintf(stderr,"   fixed time: %f sec\n",fix);
+
+               fprintf(stderr,"  calculating integer...");
+               inte=int_test.add_sub_test();
+               fprintf(stderr," integer time: %f sec\n",inte);
+
+               if(flt>fix)
+                       fprintf(stderr,"Fixed point wins by %f seconds! (%f%% faster)\n",flt-fix,flt/fix*100.0f-100.0f);
+               else
+                       fprintf(stderr,"Floating point wins by %f seconds! (%f%% faster)\n",fix-flt,fix/flt*100.0f-100.0f);
+
+       }
+
+       {
+               double flt,fix,inte;
+               fprintf(stderr,"\nProduct test...\n");
+               fprintf(stderr,"  calculating float.....");
+               flt=float_test.mul_test();
+               fprintf(stderr,"   float time: %f sec\n",flt);
+               fprintf(stderr,"  calculating fixed.....");
+               fix=fixed_test.mul_test();
+               fprintf(stderr,"   fixed time: %f sec\n",fix);
+               fprintf(stderr,"  calculating integer...");
+               inte=int_test.mul_test();
+               fprintf(stderr," integer time: %f sec\n",inte);
+               if(flt>fix)
+                       fprintf(stderr,"Fixed point wins by %f seconds! (%f%% faster)\n",flt-fix,flt/fix*100.0f-100.0f);
+               else
+                       fprintf(stderr,"Floating point wins by %f seconds! (%f%% faster)\n",fix-flt,fix/flt*100.0f-100.0f);
+       }
+
+       {
+               double flt,fix,inte;
+               fprintf(stderr,"\nDivision test...\n");
+               fprintf(stderr,"  calculating float.....");
+               flt=float_test.div_test();
+               fprintf(stderr,"   float time: %f sec\n",flt);
+               fprintf(stderr,"  calculating fixed.....");
+               fix=fixed_test.div_test();
+               fprintf(stderr,"   fixed time: %f sec\n",fix);
+               fprintf(stderr,"  calculating integer...");
+               inte=int_test.div_test();
+               fprintf(stderr," integer time: %f sec\n",inte);
+               if(flt>fix)
+                       fprintf(stderr,"Fixed point wins by %f seconds! (%f%% faster)\n",flt-fix,flt/fix*100.0f-100.0f);
+               else
+                       fprintf(stderr,"Floating point wins by %f seconds! (%f%% faster)\n",fix-flt,fix/flt*100.0f-100.0f);
+               fprintf(stderr,"\n");
+       }
+
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/handle.cpp b/ETL/tags/0.4.11/test/handle.cpp
new file mode 100644 (file)
index 0000000..f66ff92
--- /dev/null
@@ -0,0 +1,482 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Handle Template Class Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <ETL/handle>
+#include <list>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string>
+#include <map>
+#include <vector>
+
+/* === M A C R O S ========================================================= */
+
+#define NUMBER_OF_OBJECTS      40000
+using namespace std;
+
+/* === C L A S S E S ======================================================= */
+
+struct my_test_obj : public etl::rshared_object
+{
+       static int instance_count;
+       int my_id;
+       my_test_obj(int my_id=0):my_id(my_id)
+       {
+               instance_count++;
+       }
+
+       virtual ~my_test_obj()
+       {
+               if(instance_count==0)
+                       printf("Error, instance count is going past zero!\n");
+               instance_count--;
+       }
+
+       bool operator<(const my_test_obj &rhs)const
+       {
+               return my_id<rhs.my_id;
+       }
+};
+
+struct my_other_test_obj : public my_test_obj
+{
+       static int instance_count;
+       my_other_test_obj(int my_id=0):my_test_obj(my_id)
+       {
+               instance_count++;
+       }
+       virtual ~my_other_test_obj()
+       {
+               if(instance_count==0)
+                       printf("Error, instance count is going past zero!\n");
+               instance_count--;
+       }
+};
+
+int my_test_obj::instance_count=0;
+int my_other_test_obj::instance_count=0;
+
+typedef etl::handle<my_test_obj> obj_handle;
+typedef etl::rhandle<my_test_obj> robj_handle;
+typedef etl::handle<my_other_test_obj> other_obj_handle;
+typedef list< obj_handle > obj_list;
+typedef list< other_obj_handle > other_obj_list;
+typedef list< robj_handle > robj_list;
+
+int handle_basic_test()
+{
+       printf("handle: Size of a handle: %u\n",(unsigned int)sizeof(etl::handle<int>));
+       printf("handle: Size of a loose_handle: %u\n",(unsigned int)sizeof(etl::loose_handle<int>));
+       printf("handle: Size of a rhandle: %u\n",(unsigned int)sizeof(etl::rhandle<int>));
+       printf("handle: Size of a shared_object: %u\n",(unsigned int)sizeof(etl::shared_object));
+       printf("handle: Size of a rshared_object: %u\n",(unsigned int)sizeof(etl::rshared_object));
+
+       printf("handle: Basic test: ");
+       my_test_obj::instance_count=0;
+
+       {
+               etl::handle<my_test_obj> obj_handle(new my_test_obj(rand()));
+       }
+
+       if(my_test_obj::instance_count!=0)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: on create/distroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       {
+               map<string,etl::handle<my_test_obj> > my_map;
+               etl::handle<my_test_obj> obj_handle(new my_test_obj(rand()));
+               my_map["bleh"]=obj_handle;
+       }
+
+       if(my_test_obj::instance_count!=0)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: on create/distroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       etl::handle<my_test_obj> obj_handle(new my_test_obj(rand()));
+
+       if(obj_handle != obj_handle.constant())
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: on call to handle<>::constant().\n",__LINE__);
+               return 1;
+       }
+
+       printf("PASSED\n");
+
+       return 0;
+}
+
+int handle_general_use_test(void)
+{
+       printf("handle: General-use test: ");
+       my_test_obj::instance_count=0;
+
+       obj_list my_list, my_other_list;
+       int i;
+
+       for(i=0;i<NUMBER_OF_OBJECTS;i++)
+               my_list.push_back( obj_handle(new my_test_obj(rand())) );
+
+       my_other_list=my_list;
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS);
+               return 1;
+       }
+
+       my_list.sort();
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS);
+               return 1;
+       }
+
+       my_list.clear();
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy's clear, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS);
+               return 1;
+       }
+
+       my_other_list.clear();
+       if(my_test_obj::instance_count)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On clear, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       printf("PASSED\n");
+
+       return 0;
+}
+
+       struct ListItem
+       {
+               robj_handle obj;
+               int bleh;
+               int blah;
+               ListItem(robj_handle obj,int bleh=1, int blah=2):
+                       obj(obj),bleh(bleh),blah(blah) { }
+       };
+
+int rhandle_general_use_test(void)
+{
+
+
+       printf("rhandle: General-use test: ");
+       my_test_obj::instance_count=0;
+
+       robj_list my_list;
+       int i;
+
+       robj_handle obj=        new my_test_obj(rand());
+       for(i=0;i<NUMBER_OF_OBJECTS;i++)
+               my_list.push_back(obj);
+
+       obj_list my_other_list(my_list.begin(),my_list.end());
+
+
+
+       if(obj.count()!=NUMBER_OF_OBJECTS*2+1)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy, handle count=%d, should be %d.\n",__LINE__,obj.count(),NUMBER_OF_OBJECTS*2+1);
+               return 1;
+       }
+
+       if(obj.rcount()!=NUMBER_OF_OBJECTS+1)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy, rhandle count=%d, should be %d.\n",__LINE__,obj.rcount(),NUMBER_OF_OBJECTS+1);
+               return 1;
+       }
+
+       my_list.sort();
+       if(obj.rcount()!=NUMBER_OF_OBJECTS+1)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy, instance count=%d, should be %d.\n",__LINE__,obj.rcount(),NUMBER_OF_OBJECTS+1);
+               return 1;
+       }
+
+       {robj_handle bleh(obj);}
+
+       if(obj.rcount()!=NUMBER_OF_OBJECTS+1)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy, instance count=%d, should be %d.\n",__LINE__,obj.rcount(),NUMBER_OF_OBJECTS+1);
+               return 1;
+       }
+
+       my_other_list.clear();
+
+       if(obj.rcount()!=obj.count())
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy's clear, handle count (%d) != rhandle count (%d)\n",__LINE__,obj.count(),obj.rcount());
+               return 1;
+       }
+
+       if(obj.rcount()!=NUMBER_OF_OBJECTS+1)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy's clear, instance count=%d, should be %d.\n",__LINE__,obj.rcount(),NUMBER_OF_OBJECTS+1);
+               return 1;
+       }
+
+       robj_handle new_obj=    new my_test_obj(rand());
+
+       int replacements=obj.replace(new_obj);
+
+       if(replacements!=NUMBER_OF_OBJECTS+1)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: Only managed to replace %d, should have replaced %d\n",__LINE__,replacements,NUMBER_OF_OBJECTS+1);
+               return 1;
+       }
+
+       if(obj!=new_obj)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On replace, handles should be equal.\n",__LINE__);
+               return 1;
+       }
+
+       {
+               robj_handle bleh(obj);
+               robj_handle blah(obj.get());
+       }
+
+
+       my_list.clear();
+       obj.detach();
+       new_obj.detach();
+
+       if(my_test_obj::instance_count)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On clear, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+
+
+       std::vector<ListItem> my_item_list;
+       for(i=0;i<NUMBER_OF_OBJECTS;i++)
+               my_item_list.push_back(ListItem(new my_test_obj(rand()),3,4));
+
+
+       for(i=0;i<100;i++)
+       {
+               int src,dest;
+               src=rand()%NUMBER_OF_OBJECTS;
+               dest=rand()%NUMBER_OF_OBJECTS;
+               ListItem tmp(my_item_list[src]);
+               assert(tmp.obj.rcount()>=2);
+               my_item_list.erase(my_item_list.begin()+src);
+               assert(tmp.obj.rcount()>=1);
+               my_item_list.insert(my_item_list.begin()+dest,tmp);
+               assert(tmp.obj.rcount()>=2);
+       }
+
+       my_item_list.clear();
+
+       if(my_test_obj::instance_count)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On clear, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       printf("PASSED\n");
+
+       return 0;
+}
+
+int handle_inheritance_test(void)
+{
+       printf("handle: Inheritance test: ");
+       my_test_obj::instance_count=0;
+       my_other_test_obj::instance_count=0;
+
+       other_obj_list my_other_list;
+       int i;
+
+       for(i=0;i<NUMBER_OF_OBJECTS;i++)
+               my_other_list.push_back( other_obj_handle(new my_other_test_obj(rand())) );
+
+       obj_list my_list(my_other_list.begin(),my_other_list.end());
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS);
+               return 1;
+       }
+
+       for(i=0;i<NUMBER_OF_OBJECTS;i++)
+               my_list.push_back( other_obj_handle(new my_other_test_obj(rand())) );
+       if(my_other_test_obj::instance_count!=NUMBER_OF_OBJECTS*2 ||
+          my_test_obj::instance_count!=my_other_test_obj::instance_count)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On inherited copy, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS*2);
+               return 1;
+       }
+
+       my_list.sort();
+       my_other_list.sort();
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS*2)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On sort, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS*2);
+               return 1;
+       }
+
+       my_list.clear();
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On clear, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS);
+               return 1;
+       }
+
+       my_other_list.clear();
+       if(my_test_obj::instance_count)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On clear, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       printf("PASSED\n");
+
+       return 0;
+}
+
+void test_func(etl::handle<my_test_obj> handle)
+{
+       if(handle) { int i=handle.count(); i++; }
+}
+
+int loose_handle_test(void)
+{
+       printf("handle: loose_handle test: ");
+       my_test_obj::instance_count=0;
+
+       etl::loose_handle<my_test_obj> obj_handle_loose;
+       etl::handle<my_test_obj> obj_handle2;
+
+       {
+               etl::handle<my_test_obj> obj_handle(new my_test_obj(rand()));
+               if(my_test_obj::instance_count!=1)
+               {
+                       printf("FAILED!\n");
+                       printf(__FILE__":%d: on handle assignment from new object, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count);
+                       return 1;
+               }
+
+               obj_handle_loose=obj_handle;
+               if(obj_handle!=obj_handle_loose)
+               {
+                       printf("FAILED!\n");
+                       printf(__FILE__":%d: on loose_handle assignment\n",__LINE__);
+                       return 1;
+               }
+
+               obj_handle2=obj_handle_loose;
+               if(my_test_obj::instance_count!=1)
+               {
+                       printf("FAILED!\n");
+                       printf(__FILE__":%d: on handle assignment from loose_handle, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count);
+                       return 1;
+               }
+
+               test_func(obj_handle_loose);
+               if(my_test_obj::instance_count!=1)
+               {
+                       printf("FAILED!\n");
+                       printf(__FILE__":%d: on handle assignment from loose_handle, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count);
+                       return 1;
+               }
+       }
+
+       if(my_test_obj::instance_count!=1)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: on create/destroy, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       printf("PASSED\n");
+       return 0;
+}
+
+int handle_cast_test()
+{
+       printf("handle: casting test: ");
+
+       etl::handle<my_test_obj> obj;
+       etl::handle<my_other_test_obj> other_obj;
+       etl::loose_handle<my_other_test_obj> loose_obj;
+
+       other_obj.spawn();
+       loose_obj=other_obj;
+
+       obj=etl::handle<my_test_obj>::cast_dynamic(loose_obj);
+
+       if(obj!=other_obj)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: on handle assignment from loose_handle.\n",__LINE__);
+               return 1;
+       }
+
+       printf("PASSED\n");
+       return 0;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=handle_basic_test();
+       error+=handle_cast_test();
+       error+=handle_general_use_test();
+       error+=handle_inheritance_test();
+       error+=loose_handle_test();
+       error+=rhandle_general_use_test();
+
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/hermite.cpp b/ETL/tags/0.4.11/test/hermite.cpp
new file mode 100644 (file)
index 0000000..25a6278
--- /dev/null
@@ -0,0 +1,248 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Hermite Curve Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2007 Chris Moore
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <ETL/hermite>
+#include <ETL/angle>
+#include <ETL/clock>
+#include <ETL/calculus>
+#include <ETL/fixed>
+#include <stdio.h>
+
+/* === M A C R O S ========================================================= */
+
+using namespace etl;
+
+/* === C L A S S E S ======================================================= */
+
+
+/* === P R O C E D U R E S ================================================= */
+
+int basic_test(void)
+{
+       int ret=0;
+       float f;
+
+       hermite<float> Hermie;
+       etl::clock timer;
+       double t;
+
+       Hermie.p1()=0;
+       Hermie.t1()=1;
+       Hermie.p2()=0;
+       Hermie.t2()=1;
+
+       Hermie.sync();
+
+       integral<hermite<float> > inte(Hermie);
+
+
+       fprintf(stderr,"integral of curve() on [0,1] = %f\n",inte(0,1.0));
+       fprintf(stderr,"integral of curve() on [-1,3] = %f\n",inte(-1.0,3.0));
+       Hermie.set_rs(-1.0,7.0);
+       inte=integral<hermite<float> >(Hermie);
+       fprintf(stderr,"integral of curve()[%f,%f] on [-1,7] = %f\n",Hermie.get_r(),Hermie.get_s(),inte(-1.0,7.0));
+       fprintf(stderr,"integral of curve()[%f,%f] on [0,1] = %f\n",Hermie.get_r(),Hermie.get_s(),inte(0,1.0));
+       Hermie.set_rs(0.0,1.0);
+
+
+       for(f=0.0f,timer.reset();f<1.001f;f+=0.000005f)
+       {
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+       }
+       t=timer();
+
+       fprintf(stderr,"time=%f milliseconds\n",t*1000);
+       return ret;
+}
+
+int angle_test(void)
+{
+       int ret=0;
+       float f;
+
+       hermite<angle> Hermie;
+       etl::clock timer;
+       angle tmp;
+       double t;
+
+       Hermie.p1()=angle::degrees(0);
+       Hermie.t1()=angle::degrees(45);
+
+       Hermie.p2()=angle::degrees(-45);
+       Hermie.t2()=angle::degrees(180);
+
+       Hermie.sync();
+
+
+       for(f=0.0f,timer.reset();f<1.001f;f+=0.000005f)
+       {
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+       }
+       t=timer();
+
+       fprintf(stderr,"angle time=%f milliseconds\n",t*1000);
+
+       return ret;
+}
+
+int fixed_test(void)
+{
+       int ret=0;
+       float f;
+
+       hermite<float,fixed> Hermie;
+       etl::clock timer;
+       double t;
+
+       Hermie.p1()=0;
+       Hermie.t1()=1;
+       Hermie.p2()=0;
+       Hermie.t2()=1;
+
+       Hermie.sync();
+
+
+
+       for(f=0.0f,timer.reset();f<1.001f;f+=0.005f)
+       {
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+               t+=Hermie(f)+Hermie(f+0.1f);
+       }
+       t=timer();
+
+       fprintf(stderr,"time=%f milliseconds\n",t*1000);
+       return ret;
+}
+
+
+int anglefixed_test(void)
+{
+       int ret=0;
+       float f;
+
+       hermite<angle,fixed> Hermie;
+       etl::clock timer;
+       angle tmp;
+       double t;
+
+       Hermie.p1()=angle::degrees(0);
+       Hermie.t1()=angle::degrees(45);
+
+       Hermie.p2()=angle::degrees(-45);
+       Hermie.t2()=angle::degrees(180);
+
+       Hermie.sync();
+
+
+       for(f=0.0f,timer.reset();f<1.001f;f+=0.0005f)
+       {
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+               tmp+=Hermie(f)+Hermie(f+0.1f);
+       }
+       t=timer();
+
+       fprintf(stderr,"angle fixed time=%f milliseconds\n",t*1000);
+
+       return ret;
+}
+
+int float_intersection_test()
+{
+       int ret=0;
+
+       hermite<float> curve1(0,1,0,1);
+       hermite<float> curve2(-1,2,-1,-2);
+       double t1,t2;
+       float d;
+
+       t1=curve1.intersect(curve2);
+       t2=curve2.intersect(curve1);
+
+       d=curve1(t1)-curve2(t2);
+
+       fprintf(stderr,"float:Intersection difference: %f (t1=%f, t2=%f)\n",d,t1,t2);
+
+       if(d>0.01)
+       {
+               fprintf(stderr,"float:FAILED INTERSECTION TEST.\n");
+               ret++;
+       }
+
+       return ret;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=basic_test();
+       error+=angle_test();
+       error+=fixed_test();
+       error+=float_intersection_test();
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/pen.cpp b/ETL/tags/0.4.11/test/pen.cpp
new file mode 100644 (file)
index 0000000..f29319f
--- /dev/null
@@ -0,0 +1,548 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Handle Template Class Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <list>
+#include <cstdio>
+#include <cstdlib>
+#include <string>
+#include <utility>
+#include <memory>
+#include <map>
+#include <ETL/pen>
+#include <ETL/boxblur>
+//#include <ETL/gaussian>
+#include <math.h>
+
+/* === M A C R O S ========================================================= */
+
+using namespace std;
+using namespace etl;
+
+/* === C L A S S E S ======================================================= */
+
+int generic_pen_test(int w, int h)
+{
+       printf("generic_pen(w:%d,h:%d): ",w,h);
+
+       auto_ptr<float> data(new float[w*h]);
+       if(!data.get())
+       {
+               printf("Um..... malloc failure on line %d of "__FILE__"...\n",__LINE__);
+               abort();
+       }
+
+       generic_pen<float> pen(data.get(),w,h);
+       generic_pen<float> pen2;
+
+       if(!pen)
+       {
+               printf("FAILURE! "__FILE__"@%d: On pen bool test\n",__LINE__);
+               return 1;
+       }
+
+       if(&pen.x()[2]!=&pen[0][2])
+       {
+               printf("FAILURE! "__FILE__"@%d: On request for horizontal iterator\n",__LINE__);
+               return 1;
+       }
+
+       if(&pen.y()[2]!=&pen[2][0])
+       {
+               printf("FAILURE! "__FILE__"@%d: On request for vertical iterator\n",__LINE__);
+               return 1;
+       }
+
+       pen.move(1,1);
+       pen2=pen;
+
+       if(pen!=pen2)
+       {
+               printf("FAILURE! "__FILE__"@%d: On pen assignment or pen comparison\n",__LINE__);
+               return 1;
+       }
+
+       pen2.move(w,h);
+       generic_pen<float>::difference_type diff(pen2-pen);
+
+       if(diff.x!=w || diff.y!=h)
+       {
+               printf("FAILURE! "__FILE__"@%d: pen difference inconsistency ([%d,%d]!=[%d,%d])\n",__LINE__,diff.x,diff.y,w,h);
+               return 1;
+       }
+
+       if(pen.end_x()-pen.x()!=w-1)
+       {
+               printf("FAILURE! "__FILE__"@%d: iterator_x inconsistency (%d!=%d)\n",__LINE__,pen.end_x()-pen.x(),w);
+               return 1;
+       }
+
+       if(pen.end_y()-pen.y()!=h-1)
+       {
+               printf("FAILURE! "__FILE__"@%d: iterator_y inconsistency (%d!=%d)\n",__LINE__,pen.end_y()-pen.y(),h);
+               return 1;
+       }
+
+       if(&pen.end_y()[-1]!=&pen.y()[(h-2)])
+       {
+               printf("FAILURE! "__FILE__"@%d: iterator_y inconsistency\n",__LINE__);
+               return 1;
+       }
+
+       if(&pen.end_x()[-1]!=&pen.x()[(w-2)])
+       {
+               printf("FAILURE! "__FILE__"@%d: iterator_x inconsistency\n",__LINE__);
+               return 1;
+       }
+
+       printf("PASSED\n");
+
+       return 0;
+}
+
+int alpha_pen_test(void)
+{
+       printf("alpha_pen: ");
+       printf("SKIPPED\n");
+
+       return 0;
+}
+
+int bbox_pen_test(void)
+{
+       printf("bbox_pen: ");
+
+
+
+       printf("SKIPPED\n");
+
+       return 0;
+}
+
+int display_pen(generic_pen<float> pen, int w, int h)
+{
+       int ret=0;
+       int x, y;
+       // print out the after pic
+       for(y=0;y<h;y++,pen.inc_y())
+       {
+               printf("|");
+               for(x=0;x<w;x++,pen.inc_x())
+               {
+                       if(pen.get_value()>=2.0f)
+                               printf("#");
+                       else if(pen.get_value()>=1.0f)
+                               printf("@");
+                       else if(pen.get_value()>=0.8f)
+                               printf("%%");
+                       else if(pen.get_value()>=0.6f)
+                               printf("O");
+                       else if(pen.get_value()>=0.4f)
+                               printf(":");
+                       else if(pen.get_value()>=0.2f)
+                               printf(".");
+                       else if(pen.get_value()>=-0.0001f)
+                               printf(" ");
+                       else
+                               printf("X"),ret++;
+               }
+               pen.dec_x(x);
+               printf("|\n");
+       }
+       pen.dec_y(y);
+       return ret;
+}
+
+int display_pen(generic_pen<double> pen, int w, int h)
+{
+       int ret=0;
+       int x, y;
+       // print out the after pic
+       for(y=0;y<h;y++,pen.inc_y())
+       {
+               printf("|");
+               for(x=0;x<w;x++,pen.inc_x())
+               {
+                       if(pen.get_value()>=2.0f)
+                               printf("#");
+                       else if(pen.get_value()>=1.0f)
+                               printf("@");
+                       else if(pen.get_value()>=0.8f)
+                               printf("%%");
+                       else if(pen.get_value()>=0.6f)
+                               printf("O");
+                       else if(pen.get_value()>=0.4f)
+                               printf(":");
+                       else if(pen.get_value()>=0.2f)
+                               printf(".");
+                       else if(pen.get_value()>=-0.0001f)
+                               printf(" ");
+                       else
+                               printf("X"),ret++;
+               }
+               pen.dec_x(x);
+               printf("|\n");
+       }
+       pen.dec_y(y);
+       return ret;
+}
+
+void emptyfunction(int v)
+{
+       static int stupid = 0;
+       stupid = v;
+       //printf("Called... %d\n",v);
+}
+
+int box_blur_test(void)
+{
+       typedef float boxblur_float;
+
+       printf("box_blur: ");
+
+       int w=25,h=25;
+
+       auto_ptr<boxblur_float> data(new boxblur_float[w*h]);
+       auto_ptr<boxblur_float> data2(new boxblur_float[w*h]);
+       if(!data.get())
+       {
+               printf("Um..... malloc failure on line %d of "__FILE__"...\n",__LINE__);
+               abort();
+       }
+
+       generic_pen<boxblur_float> pen(data.get(),w,h);
+       generic_pen<boxblur_float> pen2;
+
+       generic_pen<boxblur_float> pen3(data2.get(),w,h);
+       int x,y;
+
+       for(y=0;y<h;y++,pen.inc_y())
+       {
+               for(x=0;x<w;x++,pen.inc_x())
+               {
+                       if(x-y<=1 && y-x<=1 || y==h/2 || x==w/2)
+                               pen.put_value(2);
+                       else
+                               pen.put_value(0);
+               }
+               pen.dec_x(x);
+       }
+       pen.dec_y(y);
+
+       int bad_values=0;
+
+       printf("\nBEFORE BOX BLUR:\n");
+
+       // print out the before pic
+       display_pen(pen,w,h);
+
+       // Pen 2 will be the end
+       pen2=pen;
+       pen2.move(w,h);
+
+       //temporary
+       vbox_blur(pen,pen2,2,pen3);
+       printf("\n VBLUR ONLY:\n");
+       display_pen(pen3,w,h);
+
+//     box_blur(pen,w,h,4);
+       hbox_blur(pen,pen2,2,pen3);
+
+       printf("\n HBLUR ONLY:\n");
+       display_pen(pen3,w,h);
+
+       pen2=pen3;
+       pen2.move(w,h);
+       vbox_blur(pen3,pen2,2,pen);
+
+       printf("\nAFTER BOX BLUR:\n");
+
+       // print out the after pic
+       bad_values=display_pen(pen,w,h);
+
+       if(bad_values)
+       {
+               printf("FAILURE! "__FILE__"@%d: blur result contained %d bad values\n",__LINE__,bad_values);
+               return 1;
+       }
+
+       boxblur_float max=0;
+       printf("CHECK BOXBLUR RESULTS %d,%d:\n",pen.diff_begin().x, pen.diff_begin().y);
+       for(y=0;y<h;y++,pen.inc_y())
+       {
+               for(x=0;x<w;x++,pen.inc_x())
+               {
+                       boxblur_float f = 0;
+
+                       for(int oy=-2; oy <= 2; ++oy)
+                       {
+                               int iy = y+oy;
+                               if(iy < 0) iy = 0;
+                               if(iy >= h) iy = h-1;
+
+                               for(int ox=-2; ox <= 2; ++ox)
+                               {
+                                       int ix = x+ox;
+                                       if(ix < 0) ix = 0;
+                                       if(ix >= w) ix = w-1;
+
+                                       if(ix-iy<=1 && iy-ix<=1 || iy==h/2 || ix==w/2)
+                                               f += 2;
+                               }
+                       }
+
+                       //print out if the relative error is high
+                       /*f /= 25;
+                       float rf = pen.get_value() - f/25;
+                       if(f && rf > 0.3)
+                       {
+                               printf("pixel (%d,%d) off by %f\n",x,y,rf);
+                       }*/
+                       boxblur_float diff = fabs(pen.get_value() - f/25);
+                       if(diff > max) max = diff;
+                       pen.put_value(f/25); //if length = 2 then dim = 5.. area = 25
+               }
+               pen.dec_x(x);
+       }
+       pen.dec_y(y);
+
+       /*if(max)
+       {
+               for(y=0;y<h;y++,pen.inc_y())
+               {
+                       for(x=0;x<w;x++,pen.inc_x())
+                       {
+                               pen.put_value(pen.get_value()/max);
+                       }
+                       pen.dec_x(x);
+               }
+               pen.dec_y(y);
+       }*/
+
+       //printf("\nHBOXBLUR ERROR (max = %e):\n",max);
+       printf("\nCorrect results:\n");
+       display_pen(pen,w,h);
+
+       printf("PASSED\n");
+
+       return 0;
+}
+
+/*
+float:
+|@@%O.     :::::          |
+|@@@%:.    :::::          |
+|%@@%O:.   :::::          |
+|O%%@%O:.  :::::          |
+|.:O%@%O:. :::::          |
+| .:O%@%O:.:::::          |
+|  .:O%@%O:O::::          |
+|   .:O%@%O%O:::          |
+|    .:O%@%@%O::          |
+|     .:O%@@@%::          |
+|::.:::O%@@@@@%O::::::::::|
+|::.::::O%@@@@@%::::::::::|
+|::.:::::OO@@@@@%O::::::::|
+|::.:::::::%@@@@@%O:::::::|
+|::.::::::.O%@@@@@%O::::::|
+|          ::%@@@%O:.     |
+|          ::O%@%@%O:.    |
+|          :.:O%O%@%O:.   |
+|          :.::O:O%@%O:.  |
+|          :.:.:.:O%@%O:. |
+|          :.:.: .:O%@%O:.|
+|          :.:.:  .:O%@%%O|
+|          :.:.:   .:O%@@%|
+|          :.:.:    .:%@@@|
+|          :.:.:     .O%@@|
+
+double:
+|@@%O.     .....          |
+|@@@O:.    .....          |
+|%@@%O:.   .....          |
+|OO%@%O:.  .....          |
+|.:O%@%O:. .....          |
+| .:O%@%O:.:....          |
+|  .:O%@%O:O:...          |
+|   .:O%@%O%O:..          |
+|    .:O%@%@%O:.          |
+|     .:O%@@@O:.          |
+|.....:O%@@@@@%O..........|
+|......:O%@@@@@%::........|
+|.......:OO@@@@@OO:.......|
+|........::%@@@@@%O:......|
+|..........O%@@@@@%O:.....|
+|          .:O@@@%O:.     |
+|          .:O%@%@%O:.    |
+|          ..:O%O%@%O:.   |
+|          ...:O:O%@%O:.  |
+|          ....:.:O%@%O:. |
+|          ..... .:O%@%O:.|
+|          .....  .:O%@%OO|
+|          .....   .:O%@@%|
+|          .....    .:O@@@|
+|          .....     .O%@@|
+
+
+*/
+
+int gaussian_blur_test(void)
+{
+       printf("gaussian_blur: ");
+#if 0
+       int w=25,h=25;
+       int bad_values=0;
+
+       auto_ptr<float> data(new float[w*h]);
+       if(!data.get())
+       {
+               printf("Um..... malloc failure on line %d of "__FILE__"...\n",__LINE__);
+               abort();
+       }
+
+       generic_pen<float> pen(data.get(),w,h);
+       generic_pen<float> pen2;
+       int x,y;
+
+       for(y=0;y<h;y++,pen.inc_y())
+       {
+               for(x=0;x<w;x++,pen.inc_x())
+               {
+                       if((x-y<=1 && y-x<=1) || y==h/2)
+                               pen.put_value(2);
+                       else
+                               pen.put_value(0);
+               }
+               pen.dec_x(x);
+       }
+       pen.dec_y(y);
+
+       printf("\nBEFORE GAUSSIAN BLUR:\n");
+
+       // print out the before pic
+       for(y=0;y<h;y++,pen.inc_y())
+       {
+               printf("|");
+               for(x=0;x<w;x++,pen.inc_x())
+               {
+                       if(pen.get_value()>=2.0f)
+                               printf("#");
+                       else if(pen.get_value()>=1.0f)
+                               printf("@");
+                       else if(pen.get_value()>=0.8f)
+                               printf("%%");
+                       else if(pen.get_value()>=0.6f)
+                               printf("O");
+                       else if(pen.get_value()>=0.4f)
+                               printf(":");
+                       else if(pen.get_value()>=0.2f)
+                               printf(".");
+                       else if(pen.get_value()>=0.0f)
+                               printf(" ");
+                       else
+                               printf("X"),bad_values++;
+               }
+               pen.dec_x(x);
+               printf("|\n");
+       }
+       pen.dec_y(y);
+
+       // Pen 2 will be the end
+       pen2=pen;
+       pen2.move(w,h);
+
+#if 0
+       gaussian_blur_5x5(pen,pen2);
+       gaussian_blur_5x5(pen,pen2);
+       gaussian_blur_5x5(pen,pen2);
+#endif
+
+#if 0
+       gaussian_blur_3x3(pen,pen2);
+       gaussian_blur_3x3(pen,pen2);
+       gaussian_blur_3x3(pen,pen2);
+       gaussian_blur_3x3(pen,pen2);
+       gaussian_blur_3x3(pen,pen2);
+#endif
+
+//     gaussian_blur(pen,pen2,15);
+       gaussian_blur(pen,pen2,10,10);
+
+       printf("\nAFTER GAUSSIAN BLUR:\n");
+
+       // print out the after pic
+       for(y=0;y<h;y++,pen.inc_y())
+       {
+               printf("|");
+               for(x=0;x<w;x++,pen.inc_x())
+               {
+                       if(pen.get_value()>=2.0f)
+                               printf("#");
+                       else if(pen.get_value()>=1.0f)
+                               printf("@");
+                       else if(pen.get_value()>=0.8f)
+                               printf("%%");
+                       else if(pen.get_value()>=0.6f)
+                               printf("O");
+                       else if(pen.get_value()>=0.4f)
+                               printf(":");
+                       else if(pen.get_value()>=0.2f)
+                               printf(".");
+                       else if(pen.get_value()>=0.0f)
+                               printf(" ");
+                       else
+                               printf("X"),bad_values++;
+               }
+               pen.dec_x(x);
+               printf("|\n");
+       }
+       pen.dec_y(y);
+
+       if(bad_values)
+       {
+               printf("FAILURE! "__FILE__"@%d: blur result contained bad values\n",__LINE__);
+               return 1;
+       }
+#endif
+       printf("PASSED\n");
+
+       return 0;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=generic_pen_test(40,40);
+       error+=generic_pen_test(10,40);
+       error+=generic_pen_test(40,10);
+    if(error)return error;
+       error+=alpha_pen_test();
+       error+=bbox_pen_test();
+       error+=box_blur_test();
+    if(error)return error;
+       error+=gaussian_blur_test();
+
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/random.cpp b/ETL/tags/0.4.11/test/random.cpp
new file mode 100644 (file)
index 0000000..d5bfaea
--- /dev/null
@@ -0,0 +1,48 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Angle Class Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <ETL/random>
+
+/* === M A C R O S ========================================================= */
+
+using namespace etl;
+
+/* === C L A S S E S ======================================================= */
+
+int random_basic_test(void)
+{
+       int ret=0;
+       random<int> Rand;
+
+       return ret;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/smach.cpp b/ETL/tags/0.4.11/test/smach.cpp
new file mode 100644 (file)
index 0000000..bb5f48d
--- /dev/null
@@ -0,0 +1,207 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Angle Class Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <ETL/smach>
+#include <cstdio>
+
+/* === M A C R O S ========================================================= */
+
+using namespace std;
+using namespace etl;
+
+/* === C L A S S E S ======================================================= */
+
+enum EventKey
+{
+       EVENT_1,
+       EVENT_2,
+       EVENT_3,
+       EVENT_4
+};
+
+
+
+struct MachineContext
+{
+       smach<MachineContext,EventKey> machine;
+
+       MachineContext():machine(this)
+       {
+       }
+};
+
+typedef smach<MachineContext,EventKey> Smach;
+
+class Event1 : public Smach::event
+{
+public:
+       Event1():Smach::event(EVENT_1) { }
+};
+
+
+class DefaultStateContext
+{
+       MachineContext *context;
+public:
+       DefaultStateContext(MachineContext *context):context(context) { printf("Entered Default State\n"); }
+       ~DefaultStateContext() { printf("Left Default State\n"); }
+
+       Smach::event_result event1_handler(const Smach::event& x __attribute__ ((unused)))
+       {
+               printf("DEFAULT STATE: Received Event 1\n");
+               return Smach::RESULT_ACCEPT;
+       }
+};
+
+class DefaultState : public Smach::state<DefaultStateContext>
+{
+public:
+       DefaultState():Smach::state<DefaultStateContext>("DefaultState")
+       {
+               insert(event_def(EVENT_1,&DefaultStateContext::event1_handler));
+       }
+
+} default_state;
+
+
+
+
+
+
+
+class State1Context
+{
+       MachineContext *context;
+public:
+       State1Context(MachineContext *context):context(context) { printf("Entered State 1\n"); }
+       ~State1Context() { printf("Left State 1\n"); }
+
+       Smach::event_result event1_handler(const Smach::event& x __attribute__ ((unused)))
+       {
+               printf("STATE1: Received Event 1\n");
+               return Smach::RESULT_OK;
+       }
+
+       Smach::event_result event3_handler(const Smach::event& x);
+};
+
+class State1 : public Smach::state<State1Context>
+{
+public:
+       State1():Smach::state<State1Context>("State1")
+       {
+               insert(event_def(EVENT_1,&State1Context::event1_handler));
+               insert(event_def(EVENT_3,&State1Context::event3_handler));
+       }
+
+} state_1;
+
+
+class State2Context
+{
+       MachineContext *context;
+public:
+       State2Context(MachineContext *context):context(context) { printf("Entered State 2\n"); }
+       ~State2Context() { printf("Left State 2\n"); }
+
+       Smach::event_result event1_handler(const Smach::event& x __attribute__ ((unused)))
+       {
+               printf("STATE2: Received Event 1\n");
+               return Smach::RESULT_OK;
+       }
+
+       Smach::event_result event2_handler(const Smach::event& x __attribute__ ((unused)))
+       {
+               printf("STATE2: Received Event 2\n");
+               return Smach::RESULT_OK;
+       }
+
+       Smach::event_result event3_handler(const Smach::event& x __attribute__ ((unused)))
+       {
+               printf("STATE2: Received Event 3\n");
+               return Smach::RESULT_OK;
+       }
+};
+
+class State2 : public Smach::state<State2Context>
+{
+public:
+       State2():Smach::state<State2Context>("State2")
+       {
+               insert(event_def(EVENT_1,&State2Context::event1_handler));
+               insert(event_def(EVENT_2,&State2Context::event2_handler));
+               insert(event_def(EVENT_3,&State2Context::event3_handler));
+       }
+
+} state_2;
+
+Smach::event_result
+State1Context::event3_handler(const Smach::event& x __attribute__ ((unused)))
+{
+       printf("STATE1: Received Event 3, throwing state to change to...\n");
+
+       throw &state_2;
+//     context->machine.enter(&state_2);
+//     return Smach::RESULT_ACCEPT;
+}
+
+/* === G L O B A L S ======================================================= */
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       MachineContext context;
+       try
+       {
+               Smach& state_machine(context.machine);
+
+               state_machine.set_default_state(&default_state);
+
+               state_machine.enter(&state_1);
+
+               state_machine.process_event(Event1());
+               state_machine.process_event(EVENT_1);
+               state_machine.process_event(EVENT_2);
+               state_machine.process_event(EVENT_3);
+
+               state_machine.process_event(Event1());
+               state_machine.process_event(EVENT_1);
+               state_machine.process_event(EVENT_2);
+               state_machine.process_event(EVENT_3);
+
+               state_machine.process_event(Event1());
+               state_machine.process_event(EVENT_1);
+               state_machine.process_event(EVENT_2);
+               state_machine.process_event(EVENT_3);
+       }
+       catch(...)
+       {
+               printf("Uncaught exception\n");
+               error++;
+       }
+
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/smart_ptr.cpp b/ETL/tags/0.4.11/test/smart_ptr.cpp
new file mode 100644 (file)
index 0000000..0d3efc9
--- /dev/null
@@ -0,0 +1,319 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Smart Pointer Template Class Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+//#define DEBUGPOINT() fprintf(stderr,__FILE__":%d: DEBUGPOINT\n",__LINE__)
+#define DEBUGPOINT()
+
+/* === H E A D E R S ======================================================= */
+
+#include <ETL/smart_ptr>
+#include <list>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string>
+#include <map>
+
+/* === M A C R O S ========================================================= */
+
+#define NUMBER_OF_OBJECTS      40000
+using namespace std;
+
+
+/* === C L A S S E S ======================================================= */
+
+struct my_test_obj
+{
+       static int instance_count;
+       int my_id;
+       my_test_obj(int my_id=0):my_id(my_id)
+       {
+               instance_count++;
+       }
+
+       virtual ~my_test_obj()
+       {
+               if(instance_count==0)
+                       printf("Error, instance count is going past zero!\n");
+               instance_count--;
+       }
+
+       bool operator<(const my_test_obj &rhs)const
+       {
+               return my_id<rhs.my_id;
+       }
+};
+
+struct my_other_test_obj : public my_test_obj
+{
+       static int instance_count;
+       my_other_test_obj(int my_id=0):my_test_obj(my_id)
+       {
+               instance_count++;
+       }
+       virtual ~my_other_test_obj()
+       {
+               if(instance_count==0)
+                       printf("Error, instance count is going past zero!\n");
+               instance_count--;
+       }
+};
+
+int my_test_obj::instance_count=0;
+int my_other_test_obj::instance_count=0;
+
+typedef etl::smart_ptr<my_test_obj> obj_smart_ptr;
+typedef etl::smart_ptr<my_other_test_obj> other_obj_smart_ptr;
+typedef list< obj_smart_ptr > obj_list;
+typedef list< other_obj_smart_ptr > other_obj_list;
+
+int smart_ptr_basic_test(void)
+{
+       printf("smart_ptr: Size of a smart_ptr: %u\n",(unsigned int)sizeof(obj_smart_ptr));
+       printf("smart_ptr: Size of a reference_counter: %u\n",(unsigned int)sizeof(etl::reference_counter));
+
+
+       printf("smart_ptr: Basic test: ");
+       my_test_obj::instance_count=0;
+
+       {
+               etl::smart_ptr<my_test_obj> obj_smart_ptr(new my_test_obj(rand()));
+       }
+
+       if(my_test_obj::instance_count!=0)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: on create/distroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       {
+               DEBUGPOINT();
+               map<string,etl::smart_ptr<my_test_obj> > my_map;
+               DEBUGPOINT();
+               //etl::smart_ptr<my_test_obj> obj_smart_ptr(new my_test_obj(rand()));
+               etl::smart_ptr<my_test_obj> temp;
+               temp.spawn();
+               DEBUGPOINT();
+               temp.reset();
+               DEBUGPOINT();
+               my_map["bleh"]=temp;
+               DEBUGPOINT();
+       }
+
+       if(my_test_obj::instance_count!=0)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: on create/distroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       etl::smart_ptr<my_test_obj> obj_smart_ptr(new my_test_obj(rand()));
+
+       if(obj_smart_ptr != obj_smart_ptr.constant())
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: on call to smart_ptr<>::constant().\n",__LINE__);
+               return 1;
+       }
+
+       printf("PASSED\n");
+
+       return 0;
+}
+
+int smart_ptr_general_use_test(void)
+{
+       printf("smart_ptr: General-use test: ");
+       my_test_obj::instance_count=0;
+
+       obj_list my_list, my_other_list;
+       int i;
+
+       for(i=0;i<NUMBER_OF_OBJECTS;i++)
+               my_list.push_back( obj_smart_ptr(new my_test_obj(rand())) );
+
+       my_other_list=my_list;
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS);
+               return 1;
+       }
+
+       my_list.sort();
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS);
+               return 1;
+       }
+
+       my_list.clear();
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy's clear, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS);
+               return 1;
+       }
+
+       my_other_list.clear();
+       if(my_test_obj::instance_count)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On clear, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       printf("PASSED\n");
+
+       return 0;
+}
+
+int smart_ptr_inheritance_test(void)
+{
+       printf("smart_ptr: Inheritance test: ");
+       my_test_obj::instance_count=0;
+       my_other_test_obj::instance_count=0;
+
+       other_obj_list my_other_list;
+       int i;
+
+       for(i=0;i<NUMBER_OF_OBJECTS;i++)
+               my_other_list.push_back( other_obj_smart_ptr(new my_other_test_obj(rand())) );
+
+       obj_list my_list(my_other_list.begin(),my_other_list.end());
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On copy, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS);
+               return 1;
+       }
+
+       for(i=0;i<NUMBER_OF_OBJECTS;i++)
+               my_list.push_back( other_obj_smart_ptr(new my_other_test_obj(rand())) );
+       if(my_other_test_obj::instance_count!=NUMBER_OF_OBJECTS*2 ||
+          my_test_obj::instance_count!=my_other_test_obj::instance_count)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On inherited copy, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS*2);
+               return 1;
+       }
+
+       my_list.sort();
+       my_other_list.sort();
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS*2)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On sort, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS*2);
+               return 1;
+       }
+
+       my_list.clear();
+       if(my_test_obj::instance_count!=NUMBER_OF_OBJECTS)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On clear, instance count=%d, should be %d.\n",__LINE__,my_test_obj::instance_count,NUMBER_OF_OBJECTS);
+               return 1;
+       }
+
+       my_other_list.clear();
+       if(my_test_obj::instance_count)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: On clear, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       printf("PASSED\n");
+
+       return 0;
+}
+
+void test_func(etl::smart_ptr<my_test_obj> smart_ptr __attribute__ ((unused)))
+{
+}
+
+int loose_smart_ptr_test(void)
+{
+       printf("smart_ptr: loose_smart_ptr test: ");
+       my_test_obj::instance_count=0;
+
+       etl::loose_smart_ptr<my_test_obj> obj_smart_ptr_loose;
+       etl::smart_ptr<my_test_obj> obj_smart_ptr2;
+
+       {
+               etl::smart_ptr<my_test_obj> obj_smart_ptr(new my_test_obj(rand()));
+               if(my_test_obj::instance_count!=1)
+               {
+                       printf("FAILED!\n");
+                       printf(__FILE__":%d: on smart_ptr assignment from new object, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count);
+                       return 1;
+               }
+
+               obj_smart_ptr_loose=obj_smart_ptr;
+               if(obj_smart_ptr!=obj_smart_ptr_loose)
+               {
+                       printf("FAILED!\n");
+                       printf(__FILE__":%d: on loose_smart_ptr assignment\n",__LINE__);
+                       return 1;
+               }
+
+               obj_smart_ptr2=obj_smart_ptr_loose;
+               if(my_test_obj::instance_count!=1)
+               {
+                       printf("FAILED!\n");
+                       printf(__FILE__":%d: on smart_ptr assignment from loose_smart_ptr, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count);
+                       return 1;
+               }
+
+               test_func(obj_smart_ptr_loose);
+               if(my_test_obj::instance_count!=1)
+               {
+                       printf("FAILED!\n");
+                       printf(__FILE__":%d: on smart_ptr assignment from loose_smart_ptr, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count);
+                       return 1;
+               }
+       }
+
+       if(my_test_obj::instance_count!=1)
+       {
+               printf("FAILED!\n");
+               printf(__FILE__":%d: on create/destroy, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count);
+               return 1;
+       }
+
+       printf("PASSED\n");
+       return 0;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=smart_ptr_basic_test();
+       error+=smart_ptr_general_use_test();
+       error+=smart_ptr_inheritance_test();
+       error+=loose_smart_ptr_test();
+
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/spline.cpp b/ETL/tags/0.4.11/test/spline.cpp
new file mode 100644 (file)
index 0000000..eaae237
--- /dev/null
@@ -0,0 +1,99 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Spline Curve Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <ETL/spline>
+#include <ETL/angle>
+#include <ETL/clock>
+#include <ETL/calculus>
+#include <stdio.h>
+
+/* === M A C R O S ========================================================= */
+
+using namespace etl;
+
+/* === C L A S S E S ======================================================= */
+
+
+/* === P R O C E D U R E S ================================================= */
+
+int bspline_basic_test(void)
+{
+       int ret=0;
+       float f;
+
+       bspline<float> BSpline;
+       etl::clock timer;
+       double t;
+
+       *BSpline.cpoints().insert(BSpline.cpoints().end())=0;
+       *BSpline.cpoints().insert(BSpline.cpoints().end())=-1;
+       *BSpline.cpoints().insert(BSpline.cpoints().end())=0;
+       *BSpline.cpoints().insert(BSpline.cpoints().end())=1;
+       *BSpline.cpoints().insert(BSpline.cpoints().end())=0;
+
+       BSpline.set_m(4);
+       BSpline.reset_knots();
+
+       integral<bspline<float> > inte(BSpline);
+
+
+       /*
+       for(f=0.0;f<1.001;f+=0.05)
+               fprintf(stderr,"BSpline(%f)= %f\n",f,BSpline(f));
+       */
+
+       fprintf(stderr,"integral of BSpline() on [0,1] = %f\n",inte(0,1.0));
+
+
+       for(f=0.0f,timer.reset();f<1.001f;f+=0.000005f)
+       {
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+               t+=BSpline(f)+BSpline(f+0.1f);
+       }
+       t=timer();
+
+       fprintf(stderr,"BSpline time=%f milliseconds\n",t*1000);
+       return ret;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=bspline_basic_test();
+
+       return error;
+}
+
diff --git a/ETL/tags/0.4.11/test/stringf.cpp b/ETL/tags/0.4.11/test/stringf.cpp
new file mode 100644 (file)
index 0000000..7c8346d
--- /dev/null
@@ -0,0 +1,152 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** stringf Procedure Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <iostream>
+#include <ETL/stringf>
+#include <stdio.h>
+
+/* === M A C R O S ========================================================= */
+
+using namespace etl;
+using namespace std;
+
+/* === C L A S S E S ======================================================= */
+
+
+/* === P R O C E D U R E S ================================================= */
+
+int basic_test(void)
+{
+       int ret=0;
+       char mystring[80]="My formatted string!";
+       string myotherstring="my other string!";
+
+       cout<<strprintf("This is a test of >>%s<<.",mystring)<<endl;
+
+       myotherstring="5 6.75 George 7";
+       int i,i2;
+       float f;
+
+#ifndef ETL_NO_STRSCANF
+       strscanf(myotherstring,"%d %f %s %d",&i, &f, mystring, &i2);
+#else
+       cout<<"warning: strscanf() disabled at compile time..."<<endl;
+       i=5;f=6.75;i2=7;
+#endif
+
+       cout<<myotherstring+"=="+strprintf("%d %f %s %d",i, f, mystring, i2)<<endl;
+
+       cout<<stratof(strprintf("32.5849"))<<"==32.5849"<<endl;
+       return ret;
+}
+
+int base_and_dir_name_test(void)
+{
+       int ret=0;
+
+       string str(unix_to_local_path("/usr/bin/bleh.exe"));
+       cout<<"Test Case 1 -> "<<str<<endl;
+       cout<<"basename -> "<<basename(str)<<endl;
+       if(basename(str)!="bleh.exe")
+               cerr<<"error:Bad basename"<<endl,ret++;
+       cout<<"dirname -> "<<dirname(str)<<endl;
+       if(dirname(str)!=unix_to_local_path("/usr/bin"))
+               cerr<<"error:Bad dirname"<<endl,ret++;
+       cout<<endl;
+
+       str=unix_to_local_path("/usr/bin/");
+       cout<<"Test Case 2 -> "<<str<<endl;
+       cout<<"basename -> "<<basename(str)<<endl;
+       if(basename(str)!="bin")
+               cerr<<"error:Bad basename"<<endl,ret++;
+       cout<<"dirname -> "<<dirname(str)<<endl;
+       if(dirname(str)!=unix_to_local_path("/usr"))
+               cerr<<"error:Bad dirname"<<endl,ret++;
+       cout<<endl;
+
+       str="bleh.exe";
+       cout<<"Test Case 3 -> "<<str<<endl;
+       cout<<"basename -> "<<basename(str)<<endl;
+       if(basename(str)!="bleh.exe")
+               cerr<<"error:Bad basename"<<endl,ret++;
+       cout<<"dirname -> "<<dirname(str)<<endl;
+       if(dirname(str)!=unix_to_local_path("."))
+               cerr<<"error:Bad dirname"<<endl,ret++;
+       cout<<endl;
+
+       return ret;
+}
+
+int relative_path_test()
+{
+       int ret=0;
+
+       string curr_path=unix_to_local_path("/usr/local/bin/.");
+       string dest_path=unix_to_local_path("/usr/share");
+
+       cout<<"curr_path="<<curr_path<<" dest_path="<<dest_path<<endl;
+       cout<<"relative_path="<<relative_path(curr_path,dest_path)<<endl;
+       if(relative_path(curr_path,dest_path)!=unix_to_local_path("../../share"))
+               cerr<<"Bad relative path"<<endl,ret++;
+
+       cout<<endl;
+
+       curr_path=unix_to_local_path("/home/darco/projects/voria");
+       dest_path=unix_to_local_path("/home/darco/projects/voria/myfile.txt");
+       cout<<"curr_path="<<curr_path<<" dest_path="<<dest_path<<endl;
+       cout<<"relative_path="<<relative_path(curr_path,dest_path)<<endl;
+       if(relative_path(curr_path,dest_path)!=unix_to_local_path("myfile.txt"))
+               cerr<<"Bad relative path"<<endl,ret++;
+
+       cout<<endl;
+
+       curr_path=unix_to_local_path("/home/darco/projects/voria");
+       dest_path=unix_to_local_path("/home/darco/projects/voria/files/myfile.txt");
+       cout<<"curr_path="<<curr_path<<" dest_path="<<dest_path<<endl;
+       cout<<"relative_path="<<relative_path(curr_path,dest_path)<<endl;
+       if(relative_path(curr_path,dest_path)!=unix_to_local_path("files/myfile.txt"))
+               cerr<<"Bad relative path"<<endl,ret++;
+
+       cout<<endl;
+
+       curr_path=unix_to_local_path("/usr/local/../include/sys/../linux/linux.h");
+       cout<<"dirty_path="<<curr_path<<endl;
+       cout<<"clean_path="<<cleanup_path(curr_path)<<endl;
+
+       cout<<"current_working_directory="<<current_working_directory()<<endl;
+       return ret;
+}
+
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=basic_test();
+       error+=base_and_dir_name_test();
+       error+=relative_path_test();
+
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/surface.cpp b/ETL/tags/0.4.11/test/surface.cpp
new file mode 100644 (file)
index 0000000..54ad73d
--- /dev/null
@@ -0,0 +1,221 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Surface Class Test
+** $Id$
+**
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <iostream>
+#include <ETL/surface>
+#include <ETL/gaussian>
+#include <cstdio>
+
+/* === M A C R O S ========================================================= */
+
+using namespace etl;
+using namespace std;
+
+/* === C L A S S E S ======================================================= */
+
+
+/* === P R O C E D U R E S ================================================= */
+
+int display_pen(generic_pen<float> pen, int w, int h)
+{
+       int ret=0;
+       int x, y;
+       // print out the after pic
+       for(y=0;y<h;y++,pen.inc_y())
+       {
+               printf("|");
+               for(x=0;x<w;x++,pen.inc_x())
+               {
+                       if(pen.get_value()>=2.0f)
+                               printf("#");
+                       else if(pen.get_value()>=1.0f)
+                               printf("@");
+                       else if(pen.get_value()>=0.8f)
+                               printf("%%");
+                       else if(pen.get_value()>=0.6f)
+                               printf("O");
+                       else if(pen.get_value()>=0.4f)
+                               printf(":");
+                       else if(pen.get_value()>=0.2f)
+                               printf(".");
+                       else if(pen.get_value()>=-0.1f)
+                               printf(" ");
+                       else
+                               printf("X"),ret++;
+               }
+               pen.dec_x(x);
+               printf("|\n");
+       }
+       pen.dec_y(y);
+       return ret;
+}
+
+void make_pattern(generic_pen<float> pen, int w, int h)
+{
+       int x,y;
+       for(y=0;y<h;y++,pen.inc_y())
+       {
+               for(x=0;x<w;x++,pen.inc_x())
+               {
+                       if(x-y<=1 && y-x<=1 || y==h/2 || x==w/2)
+                               pen.put_value(2);
+                       else
+                               pen.put_value(0);
+               }
+               pen.dec_x(x);
+       }
+       pen.dec_y(y);
+}
+
+int basic_test()
+{
+       printf("Surface:basic_test(): Running...\n");
+
+       int ret=0;
+
+       surface<float> my_surface(100,100);
+
+       gaussian_blur(my_surface.begin(),my_surface.end(),10,10);
+
+       surface<float> my_surface2(my_surface);
+
+       my_surface2.fill(0.5);
+       my_surface2.clear();
+
+       my_surface2=my_surface;
+
+       my_surface2.fill(0.5);
+       my_surface2.clear();
+
+       my_surface.fill(0.5);
+       my_surface.clear();
+
+       surface<float> my_surface3;
+       my_surface3.mirror(my_surface2);
+
+       my_surface3.fill(0.5);
+       my_surface3.clear();
+
+       my_surface3=my_surface;
+
+       my_surface3.mirror(my_surface);
+
+       printf("Surface:basic_test(): %d errors.\n",ret);
+
+       return ret;
+}
+
+int linear_sample_test()
+{
+       printf("Surface:linear_sample_test(): Running...\n");
+
+       int ret=0;
+
+       surface<float> my_surface(16,16);
+
+       my_surface.fill(0.0f);
+
+       make_pattern(my_surface.begin(),my_surface.get_w(),my_surface.get_h());
+
+       int extra(5);
+       surface<float> dest(18+extra*2,18+extra*2);
+
+       int x,y;
+       for(x=-extra;x<dest.get_w()-extra;x++)
+               for(y=-extra;y<dest.get_h()-extra;y++)
+               {
+                       dest[y+extra][x+extra]=my_surface.linear_sample(
+                               float(x)/float(dest.get_w()-1-extra*2)*float(my_surface.get_w()-1),
+                               float(y)/float(dest.get_h()-1-extra*2)*float(my_surface.get_h()-1)
+                       );
+               }
+
+       display_pen(dest.begin(),dest.get_w(),dest.get_h());
+
+       printf("Surface:linear_sample_test(): %d errors.\n",ret);
+
+       return ret;
+}
+
+int cubic_sample_test()
+{
+       printf("Surface:cubic_sample_test(): Running...\n");
+
+       int ret=0;
+
+       surface<float> my_surface(16,16);
+
+       my_surface.fill(0.0f);
+
+       make_pattern(my_surface.begin(),my_surface.get_w(),my_surface.get_h());
+
+       {
+               surface<float> dest(24,24);
+
+               int x,y;
+               for(x=0;x<dest.get_w();x++)
+                       for(y=0;y<dest.get_h();y++)
+                       {
+                               dest[y][x]=my_surface.cubic_sample(
+                                       float(x)/float(dest.get_w()-1)*float(my_surface.get_w()-1),
+                                       float(y)/float(dest.get_h()-1)*float(my_surface.get_h()-1)
+                               );
+                       }
+
+               display_pen(dest.begin(),dest.get_w(),dest.get_h());
+       }
+
+       display_pen(my_surface.begin(),my_surface.get_w(),my_surface.get_h());
+       {
+               surface<float> dest(16,16);
+
+               int x,y;
+               for(x=0;x<dest.get_w();x++)
+                       for(y=0;y<dest.get_h();y++)
+                       {
+                               dest[y][x]=my_surface.cubic_sample(
+                                       float(x)/float(dest.get_w()-1)*float(my_surface.get_w()-1),
+                                       float(y)/float(dest.get_h()-1)*float(my_surface.get_h()-1)
+                               );
+                       }
+
+               display_pen(dest.begin(),dest.get_w(),dest.get_h());
+       }
+
+       printf("Surface:cubic_sample_test(): %d errors.\n",ret);
+
+       return ret;
+}
+
+/* === E N T R Y P O I N T ================================================= */
+
+int main()
+{
+       int error=0;
+
+       error+=basic_test();
+       error+=linear_sample_test();
+       error+=cubic_sample_test();
+
+       return error;
+}
diff --git a/ETL/tags/0.4.11/test/value.cpp b/ETL/tags/0.4.11/test/value.cpp
new file mode 100644 (file)
index 0000000..bf01490
--- /dev/null
@@ -0,0 +1,119 @@
+/*! ========================================================================
+** Extended Template and Library Test Suite
+** Generic Value Test
+** $Id$
+**
+** Copyright (c) 2002 Adrian Bentley
+**
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
+**
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+**
+** === N O T E S ===========================================================
+**
+** ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#include <ETL/value>
+#include <stdio.h>
+
+/* === M A C R O S ========================================================= */
+
+using namespace etl;
+
+/* === C L A S S E S ======================================================= */
+
+/* === P R O C E D U R E S ================================================= */
+
+/* === E N T R Y P O I N T ================================================= */
+
+struct stupidv
+{
+       float x,y;
+
+       stupidv(float xin=0, float yin=0) :x(xin),y(yin) {}
+       void print() const
+       {
+               printf("(x=%f,y=%f)\n",x,y);
+       }
+};
+
+struct stupidp
+{
+       float z,w;
+
+       stupidp(float zin=0, float win=0) :z(zin),w(win) {}
+
+       void print() const
+       {
+               printf("(z=%f,w=%f)\n",z,w);
+       }
+};
+
+template <>
+class etl::value_store_type<stupidp>
+{
+       typedef stupidv value_type;
+};
+
+int main()
+{
+       try
+       {
+       value   v(10.0); //construction
+       value   v2;              //default construct...
+
+       //get type...
+       printf("type of 10.0: %s\n", v.type().name());
+
+       v2 = 1; //assignment
+       printf("type of 1: %s\n", v2.type().name());
+
+       //extract int test
+
+       int *pi = value_cast<int>(&v2);
+       printf("v2 is an int(%p)\n", pi);
+       printf("        %d\n", value_cast<int>(v2));
+
+       printf("        const version: %d\n", value_cast<int>(value(5)));
+
+       v = 'c'; //assignment again...
+       printf("type of c: %s\n", v.type().name());
+
+       v2 = v; //value assignment
+       printf("type of v2 , v: %s , %s\n", v2.type().name(), v.type().name());
+
+       //random type test
+       v = stupidv(0,1);
+       printf("type of vec: %s\n", v.type().name());
+
+       //type cast with binary change test
+       value_cast<stupidp>(&v)->print();
+       value_cast<stupidv>(stupidp(5,10)).print(); //copy test
+
+       printf("type of v: %s\n", v.type().name());
+       printf("type of v2: %s\n", v2.type().name());
+       v.swap(v2);
+       printf("type of v: %s\n", v.type().name());
+       printf("type of v2: %s\n", v2.type().name());
+
+       // test the exception throwing...
+       value_cast<int>(stupidp(6,66));
+
+       }catch(const etl::bad_value_cast &e)
+       {
+               printf("        Exploded: %s\n",e.what());
+       }catch(...)
+       {
+               printf("        Exploded\n");
+       }
+
+       return 0;
+}