[libfann] 32/242: release 1.0.5
Christian Kastner
chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:10:16 UTC 2014
This is an automated email from the git hooks/post-receive script.
chrisk-guest pushed a commit to tag Version2_0_0
in repository libfann.
commit baaf74eb95348d75d5a4f020786fe62cb5fa3137
Author: Steffen Nissen <lukesky at diku.dk>
Date: Tue Jan 6 20:15:10 2004 +0000
release 1.0.5
---
ChangeLog | 3 +-
aclocal.m4 | 106 +++++++++++++---------------
configure | 192 +++++++++++++++++++++++++++++++--------------------
configure.in | 2 +-
examples/xor_train.c | 15 ++--
libtool | 161 ++++++++++++++++++++++++++----------------
ltmain.sh | 144 +++++++++++++++++++++++---------------
src/Makefile | 6 +-
src/Makefile.am | 3 +-
src/Makefile.in | 4 +-
src/fann.c | 64 ++++++++++++-----
src/fann_internal.c | 5 +-
src/include/fann.h | 37 ++++++++--
13 files changed, 462 insertions(+), 280 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 12dc3cf..b81fa0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
libfann (1.0.5) stable; urgency=low
- * Error value not reset after training
* Added a new constructor
* Added a callback function for output during training
+ * Changed compile parameters for further performance
+ * Error value not set to zero after training
-- Steffen Nissen <lukesky at diku.dk> Tue, 06 Jan 2004 20:51:34 +0100
diff --git a/aclocal.m4 b/aclocal.m4
index cfa8a8a..9b6a5a4 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -977,7 +977,7 @@ changequote([,]))])
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
# serial 47 AC_PROG_LIBTOOL
-# Debian $Rev: 74 $
+# Debian $Rev: 149 $
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -1794,7 +1794,7 @@ else
lt_cv_dlopen_self=yes
])
;;
-
+
*)
AC_CHECK_FUNC([shl_load],
[lt_cv_dlopen="shl_load"],
@@ -2034,7 +2034,7 @@ fi
*)
AC_MSG_RESULT([no])
;;
- esac
+ esac
fi
])# AC_LIBTOOL_SYS_LIB_STRIP
@@ -2403,6 +2403,12 @@ linux*)
# before this can be enabled.
hardcode_into_libs=yes
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra"
+ fi
+
# We used to test for /lib/ld.so.1 and disable shared libraries on
# powerpc, because MkLinux only supported shared libraries with the
# GNU dynamic linker. Since this was broken with cross compilers,
@@ -2412,6 +2418,18 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
+knetbsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -2450,7 +2468,7 @@ nto-qnx*)
openbsd*)
version_type=sunos
need_lib_prefix=no
- need_version=no
+ need_version=yes
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
@@ -3060,24 +3078,20 @@ bsdi4*)
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin* | mingw* | pw32*)
+cygwin*)
# win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='win32_libid'
;;
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # win32_libid shell function, so use a weaker test based on 'objdump'.
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
darwin* | rhapsody*)
- # this will be overwritten by pass_all, but leave it in just in case
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[[012]])
- lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
lt_cv_deplibs_check_method=pass_all
;;
@@ -3120,38 +3134,18 @@ hpux10.20* | hpux11*)
;;
irix5* | irix6* | nonstopux*)
- case $host_os in
- irix5* | nonstopux*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
- ;;
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
linux*)
- # linux always uses pass_all now, this code is the old way (tm)
- case $host_cpu in
- alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh*)
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
- esac
lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
@@ -3183,9 +3177,6 @@ openbsd*)
;;
osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
@@ -3195,7 +3186,6 @@ sco3.2v5*)
solaris*)
lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
@@ -3461,7 +3451,7 @@ if test "$GCC" = no; then
fi
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
- if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
+ if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
else
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
@@ -3529,7 +3519,7 @@ aix4*)
;;
10.*)
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
- ;;
+ ;;
esac
fi
;;
@@ -3547,8 +3537,8 @@ aix4*)
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
+ fi
+ ;;
esac
AC_MSG_RESULT([$enable_shared])
@@ -3866,7 +3856,7 @@ case $host_os in
;;
10.*)
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
- ;;
+ ;;
esac
fi
;;
@@ -4796,7 +4786,7 @@ if test -f "$ltmain"; then
# without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
- fi
+ fi
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
@@ -4851,7 +4841,7 @@ if test -f "$ltmain"; then
_LT_AC_TAGVAR(archive_cmds, $1) | \
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
_LT_AC_TAGVAR(module_cmds, $1) | \
- _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
extract_expsyms_cmds | reload_cmds | finish_cmds | \
@@ -5617,7 +5607,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
+ ;;
cxx)
# Compaq C++
# Make sure the PIC flag is empty. It appears that all Alpha
@@ -5977,7 +5967,7 @@ ifelse([$1],[CXX],[
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
_LT_AC_TAGVAR(module_cmds, $1)=
- _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)=
_LT_AC_TAGVAR(always_export_symbols, $1)=no
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
# include_expsyms should be a list of space-separated symbols to be *always*
@@ -6349,7 +6339,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
;;
10.*)
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
- ;;
+ ;;
esac
fi
;;
@@ -6377,9 +6367,9 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- else
+ else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
+ fi
;;
dgux*)
@@ -6729,7 +6719,7 @@ x|xyes)
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
$rm conftest*
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
+
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
soname=conftest
lib=conftest
diff --git a/configure b/configure
index 21fd11c..934c8ad 100755
--- a/configure
+++ b/configure
@@ -1652,7 +1652,7 @@ fi
PACKAGE=fann
-VERSION=1.0.3
+VERSION=1.0.5
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
@@ -3112,24 +3112,20 @@ bsdi4*)
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin* | mingw* | pw32*)
+cygwin*)
# win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='win32_libid'
;;
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # win32_libid shell function, so use a weaker test based on 'objdump'.
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
darwin* | rhapsody*)
- # this will be overwritten by pass_all, but leave it in just in case
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[012])
- lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
lt_cv_deplibs_check_method=pass_all
;;
@@ -3172,38 +3168,18 @@ hpux10.20* | hpux11*)
;;
irix5* | irix6* | nonstopux*)
- case $host_os in
- irix5* | nonstopux*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
linux*)
- # linux always uses pass_all now, this code is the old way (tm)
- case $host_cpu in
- alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh*)
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
@@ -3235,9 +3211,6 @@ openbsd*)
;;
osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
@@ -3247,7 +3220,6 @@ sco3.2v5*)
solaris*)
lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
@@ -3327,7 +3299,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3330 "configure"' > conftest.$ac_ext
+ echo '#line 3302 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -4721,7 +4693,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:4724:" \
+echo "$as_me:4696:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -5733,11 +5705,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:5736: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:5708: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:5740: \$? = $ac_status" >&5
+ echo "$as_me:5712: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -5966,11 +5938,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:5969: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:5941: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:5973: \$? = $ac_status" >&5
+ echo "$as_me:5945: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -6033,11 +6005,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6036: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6008: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6040: \$? = $ac_status" >&5
+ echo "$as_me:6012: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7343,6 +7315,12 @@ linux*)
# before this can be enabled.
hardcode_into_libs=yes
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra"
+ fi
+
# We used to test for /lib/ld.so.1 and disable shared libraries on
# powerpc, because MkLinux only supported shared libraries with the
# GNU dynamic linker. Since this was broken with cross compilers,
@@ -7352,6 +7330,18 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
+knetbsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -7390,7 +7380,7 @@ nto-qnx*)
openbsd*)
version_type=sunos
need_lib_prefix=no
- need_version=no
+ need_version=yes
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
@@ -8093,7 +8083,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8096 "configure"
+#line 8086 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -8191,7 +8181,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8194 "configure"
+#line 8184 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10350,11 +10340,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10353: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10343: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10357: \$? = $ac_status" >&5
+ echo "$as_me:10347: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -10417,11 +10407,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10420: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10410: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10424: \$? = $ac_status" >&5
+ echo "$as_me:10414: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10924,6 +10914,12 @@ linux*)
# before this can be enabled.
hardcode_into_libs=yes
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra"
+ fi
+
# We used to test for /lib/ld.so.1 and disable shared libraries on
# powerpc, because MkLinux only supported shared libraries with the
# GNU dynamic linker. Since this was broken with cross compilers,
@@ -10933,6 +10929,18 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
+knetbsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -10971,7 +10979,7 @@ nto-qnx*)
openbsd*)
version_type=sunos
need_lib_prefix=no
- need_version=no
+ need_version=yes
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
@@ -11674,7 +11682,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11677 "configure"
+#line 11685 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11772,7 +11780,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11775 "configure"
+#line 11783 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12599,11 +12607,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12602: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12610: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12606: \$? = $ac_status" >&5
+ echo "$as_me:12614: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -12666,11 +12674,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12669: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12677: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12673: \$? = $ac_status" >&5
+ echo "$as_me:12681: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13954,6 +13962,12 @@ linux*)
# before this can be enabled.
hardcode_into_libs=yes
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra"
+ fi
+
# We used to test for /lib/ld.so.1 and disable shared libraries on
# powerpc, because MkLinux only supported shared libraries with the
# GNU dynamic linker. Since this was broken with cross compilers,
@@ -13963,6 +13977,18 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
+knetbsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -14001,7 +14027,7 @@ nto-qnx*)
openbsd*)
version_type=sunos
need_lib_prefix=no
- need_version=no
+ need_version=yes
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
@@ -14660,11 +14686,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14663: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14689: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14667: \$? = $ac_status" >&5
+ echo "$as_me:14693: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -14893,11 +14919,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14896: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14922: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14900: \$? = $ac_status" >&5
+ echo "$as_me:14926: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -14960,11 +14986,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14963: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14989: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14967: \$? = $ac_status" >&5
+ echo "$as_me:14993: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16270,6 +16296,12 @@ linux*)
# before this can be enabled.
hardcode_into_libs=yes
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra"
+ fi
+
# We used to test for /lib/ld.so.1 and disable shared libraries on
# powerpc, because MkLinux only supported shared libraries with the
# GNU dynamic linker. Since this was broken with cross compilers,
@@ -16279,6 +16311,18 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
+knetbsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -16317,7 +16361,7 @@ nto-qnx*)
openbsd*)
version_type=sunos
need_lib_prefix=no
- need_version=no
+ need_version=yes
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
@@ -17020,7 +17064,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 17023 "configure"
+#line 17067 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17118,7 +17162,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 17121 "configure"
+#line 17165 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/configure.in b/configure.in
index 390a2eb..c62471b 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
AC_INIT(src/fann.c)
-AM_INIT_AUTOMAKE(fann, 1.0.3)
+AM_INIT_AUTOMAKE(fann, 1.0.5)
AM_CONFIG_HEADER(src/include/config.h:config.in)
AC_PROG_RANLIB
AC_PROG_CC
diff --git a/examples/xor_train.c b/examples/xor_train.c
index 7b48389..b5e8a98 100644
--- a/examples/xor_train.c
+++ b/examples/xor_train.c
@@ -21,6 +21,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "fann.h"
+int print_callback(unsigned int epochs, float error)
+{
+ printf("Epochs %8d. Current MSE-Error: %.10f\n", epochs, error);
+ return 0;
+}
+
int main()
{
fann_type *calc_out;
@@ -30,7 +36,7 @@ int main()
const unsigned int num_output = 1;
const unsigned int num_layers = 3;
const unsigned int num_neurons_hidden = 4;
- const float desired_error = 0.0001;
+ const float desired_error = 0.001;
const unsigned int max_iterations = 500000;
const unsigned int iterations_between_reports = 1000;
struct fann *ann;
@@ -46,14 +52,15 @@ int main()
num_neurons_hidden,
num_output);
- fann_set_activation_function_hidden(ann, FANN_SIGMOID_STEPWISE);
- fann_set_activation_function_output(ann, FANN_SIGMOID_STEPWISE);
-
printf("Training network.\n");
data = fann_read_train_from_file("xor.data");
+
fann_train_on_data(ann, data, max_iterations, iterations_between_reports, desired_error);
+ /*fann_train_on_data_callback(ann, data, max_iterations, iterations_between_reports, desired_error, print_callback);*/
+
+
printf("Testing network.\n");
for(i = 0; i < data->num_data; i++){
diff --git a/libtool b/libtool
index cab39fe..e9eaf07 100755
--- a/libtool
+++ b/libtool
@@ -1,7 +1,7 @@
#! /bin/sh
# libtoolT - Provide generalized library-building support services.
-# Generated automatically by (GNU fann 1.0.3)
+# Generated automatically by (GNU fann 1.0.5)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
@@ -319,7 +319,10 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i386-linux/2.95.4/ /usr/lib/gcc/i386-linux/2.95.4/ /usr/i386-linux/lib/i386-linux/2.95.4/ /usr/i386-linux/lib/ /usr/lib/i386-linux/2.95.4/ /usr/lib/ /lib/i386-linux/2.95.4/ /lib/ /usr/lib/i386-linux/2.95.4/ /usr/lib/"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib
+/usr/lib/atlas
+/usr/local/lib
+/usr/lib/GNUstep/System/Library/Libraries"
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
@@ -399,7 +402,7 @@ modename="$progname"
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.0a
-TIMESTAMP=" (1.1220.2.25 2003/08/01 19:08:35) Debian$Rev: 49 $"
+TIMESTAMP=" (1.1220.2.35 2003/11/12 18:51:58) Debian$Rev: 159 $"
default_mode=
help="Try \`$progname --help' for more information."
@@ -520,6 +523,7 @@ do
;;
tag)
tagname="$arg"
+ preserve_args="${preserve_args}=$arg"
# Check whether tagname contains only valid characters
case $tagname in
@@ -582,6 +586,7 @@ do
--debug)
$echo "$progname: enabling shell trace mode"
set -x
+ preserve_args="$preserve_args $arg"
;;
--dry-run | -n)
@@ -612,6 +617,7 @@ do
--quiet | --silent)
show=:
+ preserve_args="$preserve_args $arg"
;;
--tag) prevopt="--tag" prev=tag ;;
@@ -619,6 +625,7 @@ do
set tag "$optarg" ${1+"$@"}
shift
prev=tag
+ preserve_args="$preserve_args --tag"
;;
-dlopen)
@@ -713,9 +720,11 @@ if test -z "$show_help"; then
# Get the compilation command and the source file.
base_compile=
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
suppress_output=
arg_mode=normal
libobj=
+ later=
for arg
do
@@ -744,18 +753,13 @@ if test -z "$show_help"; then
continue
;;
- -static)
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
+ -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
continue
;;
- -prefer-non-pic)
- pic_mode=no
+ -no-suppress)
+ suppress_opt=no
continue
;;
@@ -900,6 +904,25 @@ if test -z "$show_help"; then
esac
fi
+ for arg in $later; do
+ case $arg in
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@@ -1066,7 +1089,9 @@ pic_object='$objdir/$objname'
EOF
# Allow error messages only from the first compilation.
- suppress_output=' >/dev/null 2>&1'
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
else
# No PIC object so indicate it doesn't exist in the libtool
# object file.
@@ -1224,6 +1249,47 @@ EOF
vinfo=
vinfo_number=no
+ # Infer tagged configuration to use if any are available and
+ # if one wasn't chosen via the "--tag" command line option.
+ # Only attempt this if the compiler in the base link
+ # command doesn't match the default compiler.
+ if test -n "$available_tags" && test -z "$tagname"; then
+ case "$base_compile " in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
+ case "$base_compile " in
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
+ # The compiler in $compile_command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ $echo "$modename: unable to infer tagged configuration"
+ $echo "$modename: specify a tag with \`--tag'" 1>&2
+ exit 1
+# else
+# $echo "$modename: using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+
# We need to know -static, to get the right output filenames.
for arg
do
@@ -1631,6 +1697,11 @@ EOF
continue
;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
-module)
module=yes
continue
@@ -1963,47 +2034,6 @@ EOF
exit 1
fi
- # Infer tagged configuration to use if any are available and
- # if one wasn't chosen via the "--tag" command line option.
- # Only attempt this if the compiler in the base link
- # command doesn't match the default compiler.
- if test -n "$available_tags" && test -z "$tagname"; then
- case $base_compile in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
- case $base_compile in
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
- # The compiler in $compile_command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- $echo "$modename: unable to infer tagged configuration"
- $echo "$modename: specify a tag with \`--tag'" 1>&2
- exit 1
-# else
-# $echo "$modename: using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
compile_command="$compile_command $arg"
@@ -2146,6 +2176,15 @@ EOF
lib=
found=no
case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
-l*)
if test "$linkmode" != lib && test "$linkmode" != prog; then
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
@@ -5403,7 +5442,7 @@ fi\
fi
done
# Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
if test "$hardcode_automatic" = yes ; then
relink_command=
@@ -6028,7 +6067,7 @@ relink_command=\"$relink_command\""
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $0 --finish$current_libdirs'
+ exec_cmd='$SHELL $0 $preserve_args --finish$current_libdirs'
else
exit 0
fi
@@ -6937,7 +6976,10 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.2/ /usr/lib/gcc/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../ /lib/i486-linux/3.3.2/ /lib/ /usr/lib/i486-linux/3.3.2/ /usr/lib/"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib
+/usr/lib/atlas
+/usr/local/lib
+/usr/lib/GNUstep/System/Library/Libraries"
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
@@ -7236,7 +7278,10 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.2/ /usr/lib/gcc/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../ /lib/i486-linux/3.3.2/ /lib/ /usr/lib/i486-linux/3.3.2/ /usr/lib/"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib
+/usr/lib/atlas
+/usr/local/lib
+/usr/lib/GNUstep/System/Library/Libraries"
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
diff --git a/ltmain.sh b/ltmain.sh
index 036c65e..b5afd12 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -56,7 +56,7 @@ modename="$progname"
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.0a
-TIMESTAMP=" (1.1220.2.25 2003/08/01 19:08:35) Debian$Rev: 49 $"
+TIMESTAMP=" (1.1220.2.35 2003/11/12 18:51:58) Debian$Rev: 159 $"
default_mode=
help="Try \`$progname --help' for more information."
@@ -177,6 +177,7 @@ do
;;
tag)
tagname="$arg"
+ preserve_args="${preserve_args}=$arg"
# Check whether tagname contains only valid characters
case $tagname in
@@ -239,6 +240,7 @@ do
--debug)
$echo "$progname: enabling shell trace mode"
set -x
+ preserve_args="$preserve_args $arg"
;;
--dry-run | -n)
@@ -269,6 +271,7 @@ do
--quiet | --silent)
show=:
+ preserve_args="$preserve_args $arg"
;;
--tag) prevopt="--tag" prev=tag ;;
@@ -276,6 +279,7 @@ do
set tag "$optarg" ${1+"$@"}
shift
prev=tag
+ preserve_args="$preserve_args --tag"
;;
-dlopen)
@@ -370,9 +374,11 @@ if test -z "$show_help"; then
# Get the compilation command and the source file.
base_compile=
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
suppress_output=
arg_mode=normal
libobj=
+ later=
for arg
do
@@ -401,18 +407,13 @@ if test -z "$show_help"; then
continue
;;
- -static)
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
+ -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
continue
;;
- -prefer-non-pic)
- pic_mode=no
+ -no-suppress)
+ suppress_opt=no
continue
;;
@@ -557,6 +558,25 @@ if test -z "$show_help"; then
esac
fi
+ for arg in $later; do
+ case $arg in
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@@ -723,7 +743,9 @@ pic_object='$objdir/$objname'
EOF
# Allow error messages only from the first compilation.
- suppress_output=' >/dev/null 2>&1'
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
else
# No PIC object so indicate it doesn't exist in the libtool
# object file.
@@ -881,6 +903,47 @@ EOF
vinfo=
vinfo_number=no
+ # Infer tagged configuration to use if any are available and
+ # if one wasn't chosen via the "--tag" command line option.
+ # Only attempt this if the compiler in the base link
+ # command doesn't match the default compiler.
+ if test -n "$available_tags" && test -z "$tagname"; then
+ case "$base_compile " in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
+ case "$base_compile " in
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
+ # The compiler in $compile_command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ $echo "$modename: unable to infer tagged configuration"
+ $echo "$modename: specify a tag with \`--tag'" 1>&2
+ exit 1
+# else
+# $echo "$modename: using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+
# We need to know -static, to get the right output filenames.
for arg
do
@@ -1288,6 +1351,11 @@ EOF
continue
;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
-module)
module=yes
continue
@@ -1620,47 +1688,6 @@ EOF
exit 1
fi
- # Infer tagged configuration to use if any are available and
- # if one wasn't chosen via the "--tag" command line option.
- # Only attempt this if the compiler in the base link
- # command doesn't match the default compiler.
- if test -n "$available_tags" && test -z "$tagname"; then
- case $base_compile in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
- case $base_compile in
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
- # The compiler in $compile_command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- $echo "$modename: unable to infer tagged configuration"
- $echo "$modename: specify a tag with \`--tag'" 1>&2
- exit 1
-# else
-# $echo "$modename: using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
compile_command="$compile_command $arg"
@@ -1803,6 +1830,15 @@ EOF
lib=
found=no
case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
-l*)
if test "$linkmode" != lib && test "$linkmode" != prog; then
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
@@ -5060,7 +5096,7 @@ fi\
fi
done
# Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
if test "$hardcode_automatic" = yes ; then
relink_command=
@@ -5685,7 +5721,7 @@ relink_command=\"$relink_command\""
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $0 --finish$current_libdirs'
+ exec_cmd='$SHELL $0 $preserve_args --finish$current_libdirs'
else
exit 0
fi
diff --git a/src/Makefile b/src/Makefile
index e87ad3c..b0eaa67 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -83,13 +83,14 @@ PACKAGE = fann
RANLIB = ranlib
RC = @RC@
STRIP = strip
-VERSION = 1.0.3
+VERSION = 1.0.5
SUBDIRS = include
lib_LTLIBRARIES = libfloatfann.la libdoublefann.la libfixedfann.la libfann.la
-LDFLAGS = -version-info 1:3:0
+LDFLAGS = -version-info 1:5:0
+CFLAGS = -O9 -ansi
libfloatfann_la_SOURCES = floatfann.c
libdoublefann_la_SOURCES = doublefann.c
@@ -116,7 +117,6 @@ libfixedfann_la_OBJECTS = fixedfann.lo
libfann_la_LDFLAGS =
libfann_la_LIBADD =
libfann_la_OBJECTS = fann.lo fann_internal.lo
-CFLAGS = -g -O2
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
diff --git a/src/Makefile.am b/src/Makefile.am
index 5da7546..3f7ac9a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,8 @@ SUBDIRS = include
lib_LTLIBRARIES = libfloatfann.la libdoublefann.la libfixedfann.la libfann.la
-LDFLAGS += -version-info 1:3:0
+LDFLAGS += -version-info 1:5:0
+CFLAGS += -O9 -ansi
libfloatfann_la_SOURCES = floatfann.c
libdoublefann_la_SOURCES = doublefann.c
diff --git a/src/Makefile.in b/src/Makefile.in
index d288d56..85c4429 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -89,7 +89,8 @@ SUBDIRS = include
lib_LTLIBRARIES = libfloatfann.la libdoublefann.la libfixedfann.la libfann.la
-LDFLAGS = -version-info 1:3:0
+LDFLAGS = -version-info 1:5:0
+CFLAGS = -O9 -ansi
libfloatfann_la_SOURCES = floatfann.c
libdoublefann_la_SOURCES = doublefann.c
@@ -116,7 +117,6 @@ libfixedfann_la_OBJECTS = fixedfann.lo
libfann_la_LDFLAGS =
libfann_la_LIBADD =
libfann_la_OBJECTS = fann.lo fann_internal.lo
-CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
diff --git a/src/fann.c b/src/fann.c
index 422fa1a..385a137 100644
--- a/src/fann.c
+++ b/src/fann.c
@@ -28,11 +28,8 @@
/* create a neural network.
*/
-struct fann * fann_create(float connection_rate, float learning_rate,
- unsigned int num_layers, /* the number of layers, including the input and output layer */
- ...) /* the number of neurons in each of the layers, starting with the input layer and ending with the output layer */
+struct fann * fann_create_array(float connection_rate, float learning_rate, unsigned int num_layers, unsigned int * layers)
{
- va_list layer_sizes;
struct fann_layer *layer_it, *last_layer, *prev_layer;
struct fann *ann;
struct fann_neuron *neuron_it, *last_neuron, *random_neuron, *bias_neuron;
@@ -46,7 +43,6 @@ struct fann * fann_create(float connection_rate, float learning_rate,
unsigned int decimal_point;
unsigned int multiplier;
#endif
-
if(connection_rate > 1){
connection_rate = 1;
}
@@ -64,16 +60,14 @@ struct fann * fann_create(float connection_rate, float learning_rate,
fann_initialise_result_array(ann);
/* determine how many neurons there should be in each layer */
- va_start(layer_sizes, num_layers);
+ i = 0;
for(layer_it = ann->first_layer; layer_it != ann->last_layer; layer_it++){
/* we do not allocate room here, but we make sure that
last_neuron - first_neuron is the number of neurons */
layer_it->first_neuron = NULL;
- layer_it->last_neuron = layer_it->first_neuron + va_arg(layer_sizes, unsigned int) +1; /* +1 for bias */
-
+ layer_it->last_neuron = layer_it->first_neuron + layers[i++] +1; /* +1 for bias */
ann->total_neurons += layer_it->last_neuron - layer_it->first_neuron;
}
- va_end(layer_sizes);
ann->num_output = (ann->last_layer-1)->last_neuron - (ann->last_layer-1)->first_neuron -1;
ann->num_input = ann->first_layer->last_neuron - ann->first_layer->first_neuron -1;
@@ -232,8 +226,8 @@ struct fann * fann_create(float connection_rate, float learning_rate,
#endif
}
- /* TODO it would be nice to have the randomly created connections sorted
- for smoother memory access.
+ /* TODO it would be nice to have the randomly created
+ connections sorted for smoother memory access.
*/
}
@@ -244,6 +238,24 @@ struct fann * fann_create(float connection_rate, float learning_rate,
return ann;
}
+struct fann * fann_create(float connection_rate, float learning_rate,
+ unsigned int num_layers, /* the number of layers, including the input and output layer */
+
+
+ ...) /* the number of neurons in each of the layers, starting with the input layer and ending with the output layer */
+{
+ va_list layer_sizes;
+ unsigned int layers[num_layers];
+ int i = 0;
+
+ va_start(layer_sizes, num_layers);
+ for ( i=0 ; i<num_layers ; i++ ) {
+ layers[i] = va_arg(layer_sizes, unsigned int);
+ }
+ va_end(layer_sizes);
+
+ return fann_create_array(connection_rate, learning_rate, num_layers, layers);
+}
/* Create a network from a configuration file.
*/
@@ -708,14 +720,15 @@ void fann_destroy_train(struct fann_train_data *data)
}
#ifndef FIXEDFANN
+
/* Train directly on the training data.
*/
-void fann_train_on_data(struct fann *ann, struct fann_train_data *data, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error)
+void fann_train_on_data_callback(struct fann *ann, struct fann_train_data *data, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error, int (*callback)(unsigned int epochs, float error))
{
float error;
unsigned int i, j;
- if(epochs_between_reports){
+ if(epochs_between_reports && callback == NULL){
printf("Max epochs %8d. Desired error: %.10f\n", max_epochs, desired_error);
}
@@ -735,24 +748,41 @@ void fann_train_on_data(struct fann *ann, struct fann_train_data *data, unsigned
|| i == max_epochs
|| i == 1
|| error < desired_error)){
- printf("Epochs %8d. Current error: %.10f\n", i, error);
+ if (callback == NULL) {
+ printf("Epochs %8d. Current error: %.10f\n", i, error);
+ } else if((*callback)(i, error) == -1){
+ /* you can break the training by returning -1 */
+ break;
+ }
}
if(error < desired_error){
break;
}
}
- fann_reset_error(ann);
}
+void fann_train_on_data(struct fann *ann, struct fann_train_data *data, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error)
+{
+ fann_train_on_data_callback(ann, data, max_epochs, epochs_between_reports, desired_error, NULL);
+}
+
+
/* Wrapper to make it easy to train directly on a training data file.
*/
-void fann_train_on_file(struct fann *ann, char *filename, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error)
+void fann_train_on_file_callback(struct fann *ann, char *filename, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error, int (*callback)(unsigned int epochs, float error))
{
struct fann_train_data *data = fann_read_train_from_file(filename);
- fann_train_on_data(ann, data, max_epochs, epochs_between_reports, desired_error);
+ fann_train_on_data_callback(ann, data, max_epochs, epochs_between_reports, desired_error, callback);
fann_destroy_train(data);
}
+
+void fann_train_on_file(struct fann *ann, char *filename, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error)
+{
+ fann_train_on_file_callback(ann, filename, max_epochs, epochs_between_reports, desired_error, NULL);
+}
+
+
#endif
/* get the mean square error.
diff --git a/src/fann_internal.c b/src/fann_internal.c
index ef1d86a..5a652e5 100644
--- a/src/fann_internal.c
+++ b/src/fann_internal.c
@@ -360,6 +360,9 @@ void fann_initialise_result_array(struct fann *ann)
ann->activation_results[4] = 0.95;
ann->activation_results[5] = 0.995;
#endif
+
+ fann_update_stepwise_hidden(ann);
+ fann_update_stepwise_output(ann);
}
/* Adjust the steepwise functions (if used) */
@@ -410,7 +413,7 @@ void fann_update_stepwise_output(struct fann *ann)
break;
case FANN_SIGMOID_STEPWISE:
ann->activation_output_values[i] = ((log(1.0/ann->activation_results[i] -1.0) * 1.0/-2.0) * 1.0/ann->activation_output_steepness);
- //printf("%f -> %f\n", ann->activation_results[i], ann->activation_output_values[i]);
+ /* printf("%f -> %f\n", ann->activation_results[i], ann->activation_output_values[i]); */
break;
case FANN_THRESHOLD:
break;
diff --git a/src/include/fann.h b/src/include/fann.h
index 38553ff..5990925 100644
--- a/src/include/fann.h
+++ b/src/include/fann.h
@@ -42,10 +42,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-
-
+
+#ifndef NULL
+#define NULL 0
+#endif /* NULL */
+
/* ----- Initialisation and configuration ----- */
-
+
/* Constructs a backpropagation neural network, from an connection rate,
a learning rate, the number of layers and the number of neurons in each
of the layers.
@@ -57,7 +60,7 @@ extern "C" {
There will be a bias neuron in each layer (except the output layer),
and this bias neuron will be connected to all neurons in the next layer.
When running the network, the bias nodes always emits 1
- */
+*/
struct fann * fann_create(float connection_rate, float learning_rate,
/* the number of layers, including the input and output layer */
unsigned int num_layers,
@@ -65,6 +68,12 @@ struct fann * fann_create(float connection_rate, float learning_rate,
the input layer and ending with the output layer */
...);
+/* Just like fann_create, but with an array of layer sizes
+ instead of individual parameters.
+*/
+struct fann * fann_create_array(float connection_rate, float learning_rate,
+ unsigned int num_layers, unsigned int * layers);
+
/* Constructs a backpropagation neural network from a configuration file.
*/
struct fann * fann_create_from_file(const char *configuration_file);
@@ -113,16 +122,18 @@ void fann_set_learning_rate(struct fann *ann, float learning_rate);
/* The possible activation functions.
Threshold can not be used, when training the network.
+ FANN_SIGMOID_STEPWISE is a stepwise linear function,
+ which is faster but a bit less precise than FANN_SIGMOID
*/
#define FANN_SIGMOID 1
#define FANN_THRESHOLD 2
#define FANN_SIGMOID_STEPWISE 3 /* (default) */
-/* Set the activation function for the hidden layers (default SIGMOID).
+/* Set the activation function for the hidden layers.
*/
void fann_set_activation_function_hidden(struct fann *ann, unsigned int activation_function);
-/* Set the activation function for the output layer (default SIGMOID).
+/* Set the activation function for the output layer.
*/
void fann_set_activation_function_output(struct fann *ann, unsigned int activation_function);
@@ -212,6 +223,7 @@ struct fann_train_data* fann_read_train_from_file(char *filename);
void fann_destroy_train(struct fann_train_data* train_data);
#ifndef FIXEDFANN
+
/* Trains on an entire dataset, for a maximum of max_epochs
epochs or until mean square error is lower than desired_error.
Reports about the progress is given every
@@ -220,9 +232,22 @@ void fann_destroy_train(struct fann_train_data* train_data);
*/
void fann_train_on_data(struct fann *ann, struct fann_train_data *data, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error);
+/* Same as fann_train_on_data, but a callback function is given,
+ which can be used to print out reports. (effective for gui programming).
+ If the callback returns -1, then the training is terminated, otherwise
+ it continues until the normal stop criteria.
+*/
+void fann_train_on_data_callback(struct fann *ann, struct fann_train_data *data, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error, int (*callback)(unsigned int epochs, float error));
+
/* Does the same as train_on_data, but reads the data directly from a file.
*/
void fann_train_on_file(struct fann *ann, char *filename, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error);
+
+/* Does the same as train_on_data_callback, but
+ reads the data directly from a file.
+ */
+void fann_train_on_file_callback(struct fann *ann, char *filename, unsigned int max_epochs, unsigned int epochs_between_reports, float desired_error, int (*callback)(unsigned int epochs, float error));
+
#endif /* NOT FIXEDFANN */
/* Save the training structure to a file.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libfann.git
More information about the debian-science-commits
mailing list