[libfann] 98/242: added MSVC++ project files and changed some files to be more MSVC++ complient

Christian Kastner chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:10:24 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 c88e083a9608a609ba0ca76a8a7804303a87df84
Author: Steffen Nissen <lukesky at diku.dk>
Date:   Thu Mar 18 12:45:20 2004 +0000

    added MSVC++ project files and changed some files to be more MSVC++ complient
---
 ChangeLog                  |   2 +
 MSVC++/all.dsw             | 104 +++++++++++++++++++++++++++++
 MSVC++/libfann.dsp         | 136 +++++++++++++++++++++++++++++++++++++
 MSVC++/simple_test.dsp     | 110 ++++++++++++++++++++++++++++++
 MSVC++/simple_train.dsp    | 105 +++++++++++++++++++++++++++++
 MSVC++/steepness_train.dsp | 105 +++++++++++++++++++++++++++++
 MSVC++/xor_test.dsp        | 105 +++++++++++++++++++++++++++++
 MSVC++/xor_train.dsp       | 105 +++++++++++++++++++++++++++++
 Makefile.am                |   6 +-
 Makefile.in                |   6 +-
 examples/simple_train.c    |   4 +-
 examples/steepness_train.c |   6 +-
 examples/xor_test.c        |   2 -
 src/fann.c                 | 162 +++++++++++++++++++++++----------------------
 src/fann_train.c           |  12 ++--
 src/include/Makefile.am    |   2 +-
 src/include/Makefile.in    |   2 +-
 src/include/config.h       |  65 ++++++++++++++++++
 src/include/fann.h         |   1 +
 19 files changed, 945 insertions(+), 95 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f91d07e..69ff41e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,8 @@ libfann (1.1.0) stable; urgency=low
 	* Added fann_set_error_log, fann_shuffle_train_data, fann_merge_train_data, and fann_duplicate_train_data, fann_init_weights
 	* Added python bindings
 	* Created DocBook XML documentation, including API reference
+	* Rearanged files for easier development
+	* Added MSVC++ project files
 	
  -- Steffen Nissen <lukesky at diku.dk> 
 
diff --git a/MSVC++/all.dsw b/MSVC++/all.dsw
new file mode 100644
index 0000000..7bb32fd
--- /dev/null
+++ b/MSVC++/all.dsw
@@ -0,0 +1,104 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "libfann"=".\libfann.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "simple_test"=".\simple_test.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libfann
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "simple_train"=".\simple_train.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libfann
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "steepness_train"=".\steepness_train.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libfann
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "xor_test"=".\xor_test.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libfann
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "xor_train"=".\xor_train.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libfann
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/MSVC++/libfann.dsp b/MSVC++/libfann.dsp
new file mode 100644
index 0000000..3217a8d
--- /dev/null
+++ b/MSVC++/libfann.dsp
@@ -0,0 +1,136 @@
+# Microsoft Developer Studio Project File - Name="libfann" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=libfann - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "libfann.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "libfann.mak" CFG="libfann - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "libfann - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "libfann - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "libfann - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "..\src\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE RSC /l 0x813 /d "NDEBUG"
+# ADD RSC /l 0x813 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF  "$(CFG)" == "libfann - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\src\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x813 /d "_DEBUG"
+# ADD RSC /l 0x813 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "libfann - Win32 Release"
+# Name "libfann - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\fann.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\fann_error.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\fann_options.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\fann_train_data.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\fann_io.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\fann_train.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\fann\src\include\compat_time.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\fann\src\include\fann.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\fann\src\include\fann_data.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\fann\src\include\fann_internal.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\fann\src\include\floatfann.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/MSVC++/simple_test.dsp b/MSVC++/simple_test.dsp
new file mode 100644
index 0000000..890e74b
--- /dev/null
+++ b/MSVC++/simple_test.dsp
@@ -0,0 +1,110 @@
+# Microsoft Developer Studio Project File - Name="simple_test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=simple_test - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "simple_test.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "simple_test.mak" CFG="simple_test - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "simple_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "simple_test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "simple_test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "..\src\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
+# ADD BASE RSC /l 0x813 /d "NDEBUG"
+# ADD RSC /l 0x813 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Special Build Tool
+TargetPath=.\Release\simple_test.exe
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy  $(TargetPath)  ..\examples\ 
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "simple_test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\src\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x813 /d "_DEBUG"
+# ADD RSC /l 0x813 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# Begin Special Build Tool
+TargetPath=.\Debug\simple_test.exe
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy  $(TargetPath)  ..\examples\ 
+# End Special Build Tool
+
+!ENDIF 
+
+# Begin Target
+
+# Name "simple_test - Win32 Release"
+# Name "simple_test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\examples\simple_test.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/MSVC++/simple_train.dsp b/MSVC++/simple_train.dsp
new file mode 100644
index 0000000..6ac42ef
--- /dev/null
+++ b/MSVC++/simple_train.dsp
@@ -0,0 +1,105 @@
+# Microsoft Developer Studio Project File - Name="simple_train" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=simple_train - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "simple_train.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "simple_train.mak" CFG="simple_train - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "simple_train - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "simple_train - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "simple_train - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "..\src\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
+# ADD BASE RSC /l 0x813 /d "NDEBUG"
+# ADD RSC /l 0x813 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Special Build Tool
+TargetPath=.\Release\simple_train.exe
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy  $(TargetPath)  ..\examples\ 
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "simple_train - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\src\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x813 /d "_DEBUG"
+# ADD RSC /l 0x813 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "simple_train - Win32 Release"
+# Name "simple_train - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\examples\simple_train.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/MSVC++/steepness_train.dsp b/MSVC++/steepness_train.dsp
new file mode 100644
index 0000000..9bef3cd
--- /dev/null
+++ b/MSVC++/steepness_train.dsp
@@ -0,0 +1,105 @@
+# Microsoft Developer Studio Project File - Name="steepness_train" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=steepness_train - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "steepness_train.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "steepness_train.mak" CFG="steepness_train - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "steepness_train - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "steepness_train - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "steepness_train - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "..\src\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
+# ADD BASE RSC /l 0x813 /d "NDEBUG"
+# ADD RSC /l 0x813 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Special Build Tool
+TargetPath=.\Release\steepness_train.exe
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy  $(TargetPath)  ..\examples\ 
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "steepness_train - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\src\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x813 /d "_DEBUG"
+# ADD RSC /l 0x813 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "steepness_train - Win32 Release"
+# Name "steepness_train - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\examples\steepness_train.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/MSVC++/xor_test.dsp b/MSVC++/xor_test.dsp
new file mode 100644
index 0000000..3997ee5
--- /dev/null
+++ b/MSVC++/xor_test.dsp
@@ -0,0 +1,105 @@
+# Microsoft Developer Studio Project File - Name="xor_test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=xor_test - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "xor_test.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "xor_test.mak" CFG="xor_test - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "xor_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "xor_test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "xor_test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "..\src\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x813 /d "NDEBUG"
+# ADD RSC /l 0x813 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Special Build Tool
+TargetPath=.\Release\xor_test.exe
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy  $(TargetPath)  ..\examples\ 
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "xor_test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\src\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x813 /d "_DEBUG"
+# ADD RSC /l 0x813 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "xor_test - Win32 Release"
+# Name "xor_test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\examples\xor_test.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/MSVC++/xor_train.dsp b/MSVC++/xor_train.dsp
new file mode 100644
index 0000000..d692743
--- /dev/null
+++ b/MSVC++/xor_train.dsp
@@ -0,0 +1,105 @@
+# Microsoft Developer Studio Project File - Name="xor_train" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=xor_train - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "xor_train.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "xor_train.mak" CFG="xor_train - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "xor_train - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "xor_train - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "xor_train - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "..\src\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x813 /d "NDEBUG"
+# ADD RSC /l 0x813 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Special Build Tool
+TargetPath=.\Release\xor_train.exe
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy  $(TargetPath)  ..\examples\ 
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "xor_train - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\src\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x813 /d "_DEBUG"
+# ADD RSC /l 0x813 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "xor_train - Win32 Release"
+# Name "xor_train - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\examples\xor_train.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Makefile.am b/Makefile.am
index 3052ce4..0143666 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,13 +3,17 @@ SUBDIRS = src
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = fann.pc
 
-EXTRA_DIST = doc examples benchmarks python
+EXTRA_DIST = benchmarks doc examples python MSVC++
 
 dist-hook:
 	rm -rf `find $(distdir) -name "*~" -o -name ".#*"`
+	(cd $(distdir)/doc && make clean && make html)
 	rm -rf `find $(distdir)/doc -name CVS`
+	(cd $(distdir)/examples && make clean)
 	rm -rf `find $(distdir)/examples -name CVS`
+	(cd $(distdir)/benchmarks && make clean)
 	rm -rf `find $(distdir)/benchmarks -name CVS`
+	(cd $(distdir)/python && make clean)
 	rm -rf `find $(distdir)/python -name CVS`
 	zip -r $(distdir).zip $(distdir)
 	tar chojf $(distdir).tar.bz2 $(distdir)
diff --git a/Makefile.in b/Makefile.in
index 2c75f0a..77e819f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -134,7 +134,7 @@ SUBDIRS = src
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = fann.pc
 
-EXTRA_DIST = doc examples benchmarks python
+EXTRA_DIST = benchmarks doc examples python MSVC++
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -562,9 +562,13 @@ uninstall-info: uninstall-info-recursive
 
 dist-hook:
 	rm -rf `find $(distdir) -name "*~" -o -name ".#*"`
+	(cd $(distdir)/doc && make clean && make html)
 	rm -rf `find $(distdir)/doc -name CVS`
+	(cd $(distdir)/examples && make clean)
 	rm -rf `find $(distdir)/examples -name CVS`
+	(cd $(distdir)/benchmarks && make clean)
 	rm -rf `find $(distdir)/benchmarks -name CVS`
+	(cd $(distdir)/python && make clean)
 	rm -rf `find $(distdir)/python -name CVS`
 	zip -r $(distdir).zip $(distdir)
 	tar chojf $(distdir).tar.bz2 $(distdir)
diff --git a/examples/simple_train.c b/examples/simple_train.c
index cfef48a..e423db4 100644
--- a/examples/simple_train.c
+++ b/examples/simple_train.c
@@ -22,12 +22,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 int main()
 {
 	const float connection_rate = 1;
-	const float learning_rate = 0.7;
+	const float learning_rate = (const float)0.7;
 	const unsigned int num_input = 2;
 	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 = (const float)0.0001;
 	const unsigned int max_iterations = 500000;
 	const unsigned int iterations_between_reports = 1000;
 
diff --git a/examples/steepness_train.c b/examples/steepness_train.c
index 1e5003c..2a2d687 100644
--- a/examples/steepness_train.c
+++ b/examples/steepness_train.c
@@ -72,12 +72,12 @@ void train_on_steepness_file(struct fann *ann, char *filename,
 int main()
 {
 	const float connection_rate = 1;
-	const float learning_rate = 0.7;
+	const float learning_rate = (const float)0.7;
 	const unsigned int num_input = 2;
 	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 = (const float)0.0001;
 	const unsigned int max_iterations = 500000;
 	const unsigned int iterations_between_reports = 1000;
 	unsigned int i;
@@ -92,7 +92,7 @@ int main()
 	data = fann_read_train_from_file("xor.data");
 	
 	train_on_steepness_file(ann, "xor.data", max_iterations,
-		iterations_between_reports, desired_error, 0.5, 0.1, 20.0);
+		iterations_between_reports, desired_error, (float)0.5, (float)0.1, (float)20.0);
 
 	fann_set_activation_function_hidden(ann, FANN_THRESHOLD);
 	fann_set_activation_function_output(ann, FANN_THRESHOLD);
diff --git a/examples/xor_test.c b/examples/xor_test.c
index 9979481..c72e665 100644
--- a/examples/xor_test.c
+++ b/examples/xor_test.c
@@ -17,8 +17,6 @@ License along with this library; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
-#include <time.h>
-#include <sys/time.h>
 #include <stdio.h>
 
 #include "fann.h"
diff --git a/src/fann.c b/src/fann.c
index c260b91..7551173 100644
--- a/src/fann.c
+++ b/src/fann.c
@@ -21,7 +21,6 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
-#include <sys/time.h>
 #include <time.h>
 
 #include "config.h"
@@ -38,8 +37,9 @@ struct fann * fann_create(float connection_rate, float learning_rate,
 
 	...) /* the number of neurons in each of the layers, starting with the input layer and ending with the output layer */
 {
+	struct fann *ann;
 	va_list layer_sizes;
-	unsigned int layers[num_layers];
+	unsigned int *layers = calloc(num_layers, sizeof(unsigned int));
 	int i = 0;
 
 	va_start(layer_sizes, num_layers);
@@ -48,7 +48,11 @@ struct fann * fann_create(float connection_rate, float learning_rate,
 	}
 	va_end(layer_sizes);
 
-	return fann_create_array(connection_rate, learning_rate, num_layers, layers);
+	ann = fann_create_array(connection_rate, learning_rate, num_layers, layers);
+
+	free(layers);
+
+	return ann;
 }
 
 /* create a neural network.
@@ -160,7 +164,7 @@ struct fann * fann_create_array(float connection_rate, float learning_rate, unsi
 			last_neuron = layer_it->last_neuron-1;
 			for(neuron_it = layer_it->first_neuron; neuron_it != last_neuron; neuron_it++){
 				for(i = 0; i != prev_layer_size; i++){
-					neuron_it->weights[i] = fann_random_weight();
+					neuron_it->weights[i] = (fann_type)fann_random_weight();
 					/* these connections are still initialized for fully connected networks, to allow
 					   operations to work, that are not optimized for fully connected networks.
 					*/
@@ -202,7 +206,7 @@ struct fann * fann_create_array(float connection_rate, float learning_rate, unsi
 				neuron_it != last_neuron; neuron_it++){
 				
 				neuron_it->connected_neurons[0] = bias_neuron;
-				neuron_it->weights[0] = fann_random_weight();
+				neuron_it->weights[0] = (fann_type)fann_random_weight();
 			}
 			
 			/* then connect all neurons in the input layer */
@@ -222,7 +226,7 @@ struct fann * fann_create_array(float connection_rate, float learning_rate, unsi
 				for(i = 0; i < random_neuron->num_connections; i++){
 					if(random_neuron->connected_neurons[i] == NULL){
 						random_neuron->connected_neurons[i] = neuron_it;
-						random_neuron->weights[i] = fann_random_weight();
+						random_neuron->weights[i] = (fann_type)fann_random_weight();
 						break;
 					}
 				}
@@ -255,7 +259,7 @@ struct fann * fann_create_array(float connection_rate, float learning_rate, unsi
 					/* we have found a neuron that is not allready
 					   connected to us, connect it */
 					neuron_it->connected_neurons[i] = random_neuron;
-					neuron_it->weights[i] = fann_random_weight();
+					neuron_it->weights[i] = (fann_type)fann_random_weight();
 				}
 			}
 			
@@ -447,35 +451,35 @@ fann_type* fann_run(struct fann *ann, fann_type *input)
 				case FANN_SIGMOID_SYMMETRIC:
 				case FANN_SIGMOID_SYMMETRIC_STEPWISE:
 					if(layer_it == last_layer-1){
-						neuron_it->value = fann_stepwise(o1, o2, o3, o4, o5, o6, ro1, ro2, ro3, ro4, ro5, ro6, neuron_value, multiplier);
+						neuron_it->value = (fann_type)fann_stepwise(o1, o2, o3, o4, o5, o6, ro1, ro2, ro3, ro4, ro5, ro6, neuron_value, multiplier);
 					}else{
-						neuron_it->value = fann_stepwise(h1, h2, h3, h4, h5, h6, rh1, rh2, rh3, rh4, rh5, rh6, neuron_value, multiplier);
+						neuron_it->value = (fann_type)fann_stepwise(h1, h2, h3, h4, h5, h6, rh1, rh2, rh3, rh4, rh5, rh6, neuron_value, multiplier);
 					}
 					break;
 #else
 				case FANN_LINEAR:
-					neuron_it->value = fann_linear(steepness, neuron_value);
+					neuron_it->value = (fann_type)fann_linear(steepness, neuron_value);
 					break;
 					
 				case FANN_SIGMOID:
-					neuron_it->value = fann_sigmoid(steepness, neuron_value);
+					neuron_it->value = (fann_type)fann_sigmoid(steepness, neuron_value);
 					break;
 					
 				case FANN_SIGMOID_SYMMETRIC:
-					neuron_it->value = fann_sigmoid_symmetric(steepness, neuron_value);
+					neuron_it->value = (fann_type)fann_sigmoid_symmetric(steepness, neuron_value);
 					break;
 					
 				case FANN_SIGMOID_STEPWISE:
 				case FANN_SIGMOID_SYMMETRIC_STEPWISE:
 					if(layer_it == last_layer-1){
-						neuron_it->value = fann_stepwise(o1, o2, o3, o4, o5, o6, ro1, ro2, ro3, ro4, ro5, ro6, neuron_value, 1);
+						neuron_it->value = (fann_type)fann_stepwise(o1, o2, o3, o4, o5, o6, ro1, ro2, ro3, ro4, ro5, ro6, neuron_value, 1);
 					}else{
-						neuron_it->value = fann_stepwise(h1, h2, h3, h4, h5, h6, rh1, rh2, rh3, rh4, rh5, rh6, neuron_value, 1);
+						neuron_it->value = (fann_type)fann_stepwise(h1, h2, h3, h4, h5, h6, rh1, rh2, rh3, rh4, rh5, rh6, neuron_value, 1);
 					}
 					break;
 #endif
 				case FANN_THRESHOLD:
-					neuron_it->value = (neuron_value < 0) ? 0 : 1;
+					neuron_it->value = (fann_type)((neuron_value < 0) ? 0 : 1);
 					break;
 				default:
 					fann_error((struct fann_error *)ann, FANN_E_CANT_USE_ACTIVATION);
@@ -517,6 +521,71 @@ void fann_randomize_weights(struct fann *ann, fann_type min_weight, fann_type ma
 	}
 }
 
+/* Initialize the weights using Widrow + Nguyen's algorithm.
+*/
+void fann_init_weights(struct fann *ann, struct fann_train_data *train_data)
+{
+	fann_type smallest_inp, largest_inp;
+	unsigned int dat = 0, elem, num_neurons_in, num_neurons_out, num_connect, num_hidden_neurons;
+	struct fann_layer *layer_it;
+	struct fann_neuron *neuron_it, *last_neuron, *bias_neuron;
+#ifdef FIXEDFANN
+	unsigned int multiplier = ann->multiplier;
+#endif
+	float scale_factor;
+
+	for ( smallest_inp = largest_inp = train_data->input[0][0] ; dat < train_data->num_data ; dat++ ) {
+		for ( elem = 0 ; elem < train_data->num_input ; elem++ ) {
+			if ( train_data->input[dat][elem] < smallest_inp )
+				smallest_inp = train_data->input[dat][elem];
+			if ( train_data->input[dat][elem] > largest_inp )
+				largest_inp = train_data->input[dat][elem];
+		}
+	}
+
+	num_hidden_neurons = ann->total_neurons - (ann->num_input + ann->num_output + (ann->last_layer - ann->first_layer));
+	scale_factor = powf((float)(0.7f * (float)(ann->total_neurons - (ann->num_input + ann->num_output))),
+				  (float)(1.0f / (float)ann->num_input)) / (float)(largest_inp - smallest_inp);
+
+#ifdef DEBUG
+	printf("Initializing weights with scale factor %f\n", scale_factor);
+#endif
+	for ( layer_it = ann->first_layer+1; layer_it != ann->last_layer ; layer_it++) {
+#ifdef DEBUG
+		printf(" Layer: %x/%x (%d neurons)\n", layer_it, ann->last_layer, layer_it->last_neuron - layer_it->first_neuron);
+#endif
+		num_neurons_out = layer_it->last_neuron - layer_it->first_neuron - 1;
+		num_neurons_in = (layer_it-1)->last_neuron - (layer_it-1)->first_neuron - 1;
+
+		last_neuron = layer_it->last_neuron-1;
+		bias_neuron = (layer_it-1)->last_neuron-1;
+
+		for(neuron_it = layer_it->first_neuron ; neuron_it != last_neuron; neuron_it++) {
+#ifdef DEBUG
+			printf("  Neuron %x/%x (%d connections)\n", neuron_it, last_neuron, neuron_it->num_connections);
+#endif
+			for ( num_connect = 0 ; num_connect < neuron_it->num_connections ; num_connect++ ) {
+#ifdef DEBUG
+				printf("   Connection %d/%d (%x)\n", num_connect, neuron_it->num_connections, neuron_it->connected_neurons[num_connect]);
+#endif
+				if ( bias_neuron == neuron_it->connected_neurons[num_connect] ) {
+#ifdef FIXEDFANN
+					neuron_it->weights[num_connect] = (fann_type)fann_rand(-scale_factor, scale_factor * multiplier);
+#else
+					neuron_it->weights[num_connect] = (fann_type)fann_rand(-scale_factor, scale_factor);
+#endif
+				} else {
+#ifdef FIXEDFANN
+					neuron_it->weights[num_connect] = (fann_type)fann_rand(0, scale_factor * multiplier);
+#else
+					neuron_it->weights[num_connect] = (fann_type)fann_rand(0, scale_factor);
+#endif
+				}
+			}
+		}
+	}
+}
+
 /* INTERNAL FUNCTION
    Allocates the main structure and sets some default values.
  */
@@ -675,66 +744,3 @@ void fann_seed_rand()
 	}
 	srand(foo);
 }
-
-/* Initialize the weights using Widrow + Nguyen's algorithm.
-*/
-void fann_init_weights(struct fann *ann, struct fann_train_data * train_data)
-{
-	fann_type smallest_inp, largest_inp;
-	unsigned int dat = 0, elem, num_neurons_in, num_neurons_out, num_connect;
-	struct fann_layer *layer_it;
-	struct fann_neuron *neuron_it, *last_neuron, *bias_neuron;
-#ifdef FIXEDFANN
-	unsigned int multiplier = ann->multiplier;
-#endif
-
-	for ( smallest_inp = largest_inp = train_data->input[0][0] ; dat < train_data->num_data ; dat++ ) {
-		for ( elem = 0 ; elem < train_data->num_input ; elem++ ) {
-			if ( train_data->input[dat][elem] < smallest_inp )
-				smallest_inp = train_data->input[dat][elem];
-			if ( train_data->input[dat][elem] > largest_inp )
-				largest_inp = train_data->input[dat][elem];
-		}
-	}
-
-	float scale_factor = powf((float)(0.7f * (float)(ann->total_neurons - (ann->num_input + ann->num_output))),
-				  (float)(1.0f / (float)ann->num_input)) / (float)(largest_inp - smallest_inp);
-
-#ifdef DEBUG
-	printf("Initializing weights with scale factor %f\n", scale_factor);
-#endif
-	for ( layer_it = ann->first_layer+1; layer_it != ann->last_layer ; layer_it++) {
-#ifdef DEBUG
-		printf(" Layer: %x/%x (%d neurons)\n", layer_it, ann->last_layer, layer_it->last_neuron - layer_it->first_neuron);
-#endif
-		num_neurons_out = layer_it->last_neuron - layer_it->first_neuron - 1;
-		num_neurons_in = (layer_it-1)->last_neuron - (layer_it-1)->first_neuron - 1;
-
-		last_neuron = layer_it->last_neuron-1;
-		bias_neuron = (layer_it-1)->last_neuron-1;
-
-		for(neuron_it = layer_it->first_neuron ; neuron_it != last_neuron; neuron_it++) {
-#ifdef DEBUG
-			printf("  Neuron %x/%x (%d connections)\n", neuron_it, last_neuron, neuron_it->num_connections);
-#endif
-			for ( num_connect = 0 ; num_connect < neuron_it->num_connections ; num_connect++ ) {
-#ifdef DEBUG
-				printf("   Connection %d/%d (%x)\n", num_connect, neuron_it->num_connections, neuron_it->connected_neurons[num_connect]);
-#endif
-				if ( bias_neuron == neuron_it->connected_neurons[num_connect] ) {
-#ifdef FIXEDFANN
-					neuron_it->weights[num_connect] = (fann_type)fann_rand(-scale_factor, scale_factor * multiplier);
-#else
-					neuron_it->weights[num_connect] = (fann_type)fann_rand(-scale_factor, scale_factor);
-#endif
-				} else {
-#ifdef FIXEDFANN
-					neuron_it->weights[num_connect] = (fann_type)fann_rand(0, scale_factor * multiplier);
-#else
-					neuron_it->weights[num_connect] = (fann_type)fann_rand(0, scale_factor);
-#endif
-				}
-			}
-		}
-	}
-}
diff --git a/src/fann_train.c b/src/fann_train.c
index 7091894..94a68e7 100644
--- a/src/fann_train.c
+++ b/src/fann_train.c
@@ -71,15 +71,15 @@ void fann_train(struct fann *ann, fann_type *input, fann_type *desired_output)
 		neuron_value = last_layer_begin->value;
 		switch(ann->activation_function_output){
 			case FANN_LINEAR:
-				*delta_it = fann_linear_derive(activation_output_steepness, neuron_value) * (*desired_output - neuron_value);
+				*delta_it = (fann_type)fann_linear_derive(activation_output_steepness, neuron_value) * (*desired_output - neuron_value);
 				break;
 			case FANN_SIGMOID:
 			case FANN_SIGMOID_STEPWISE:
-				*delta_it = fann_sigmoid_derive(activation_output_steepness, neuron_value) * (*desired_output - neuron_value);
+				*delta_it = (fann_type)fann_sigmoid_derive(activation_output_steepness, neuron_value) * (*desired_output - neuron_value);
 				break;
 			case FANN_SIGMOID_SYMMETRIC:
 			case FANN_SIGMOID_SYMMETRIC_STEPWISE:
-				*delta_it = fann_sigmoid_symmetric_derive(activation_output_steepness, neuron_value) * (*desired_output - neuron_value);
+				*delta_it = (fann_type)fann_sigmoid_symmetric_derive(activation_output_steepness, neuron_value) * (*desired_output - neuron_value);
 				break;
 			default:
 				fann_error((struct fann_error *)ann, FANN_E_CANT_TRAIN_ACTIVATION);
@@ -134,7 +134,7 @@ void fann_train(struct fann *ann, fann_type *input, fann_type *desired_output)
 				for(neuron_it = (layer_it-1)->first_neuron;
 					neuron_it != last_neuron; neuron_it++){
 					neuron_value = neuron_it->value;
-					*delta_it *= fann_linear_derive(activation_hidden_steepness, neuron_value) * learning_rate;
+					*delta_it *= (fann_type)fann_linear_derive(activation_hidden_steepness, neuron_value) * learning_rate;
 					delta_it++;
 				}
 				break;
@@ -144,7 +144,7 @@ void fann_train(struct fann *ann, fann_type *input, fann_type *desired_output)
 					neuron_it != last_neuron; neuron_it++){
 					neuron_value = neuron_it->value;
 					neuron_value = fann_clip(neuron_value, 0.01, 0.99);
-					*delta_it *= fann_sigmoid_derive(activation_hidden_steepness, neuron_value);
+					*delta_it *= (fann_type)fann_sigmoid_derive(activation_hidden_steepness, neuron_value);
 #ifdef DEBUGTRAIN
 					printf("delta3[%d] = "FANNPRINTF" *= fann_sigmoid_derive(%f, %f) * %f\n", (delta_it - delta_begin), *delta_it, activation_hidden_steepness, neuron_value, learning_rate);
 #endif
@@ -157,7 +157,7 @@ void fann_train(struct fann *ann, fann_type *input, fann_type *desired_output)
 					neuron_it != last_neuron; neuron_it++){
 					neuron_value = neuron_it->value;
 					neuron_value = fann_clip(neuron_value, -0.98, 0.98);
-					*delta_it *= fann_sigmoid_symmetric_derive(activation_hidden_steepness, neuron_value);
+					*delta_it *= (fann_type)fann_sigmoid_symmetric_derive(activation_hidden_steepness, neuron_value);
 #ifdef DEBUGTRAIN
 					printf("delta3[%d] = "FANNPRINTF" *= fann_sigmoid_symmetric_derive(%f, %f) * %f\n", (delta_it - delta_begin), *delta_it, activation_hidden_steepness, neuron_value, learning_rate);
 #endif
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index f070f7b..b4872cf 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -1 +1 @@
-include_HEADERS = fann.h doublefann.h fann_internal.h floatfann.h doublefann.h fann_data.h fixedfann.h compat_time.h fann_errno.h fann_activation.h
+include_HEADERS = fann.h doublefann.h fann_internal.h floatfann.h doublefann.h fann_data.h fixedfann.h compat_time.h fann_errno.h fann_activation.h config.h
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
index 10a64df..f398d20 100644
--- a/src/include/Makefile.in
+++ b/src/include/Makefile.in
@@ -129,7 +129,7 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-include_HEADERS = fann.h doublefann.h fann_internal.h floatfann.h doublefann.h fann_data.h fixedfann.h compat_time.h fann_errno.h fann_activation.h
+include_HEADERS = fann.h doublefann.h fann_internal.h floatfann.h doublefann.h fann_data.h fixedfann.h compat_time.h fann_errno.h fann_activation.h config.h
 subdir = src/include
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff --git a/src/include/config.h b/src/include/config.h
new file mode 100644
index 0000000..6cfca45
--- /dev/null
+++ b/src/include/config.h
@@ -0,0 +1,65 @@
+/* src/include/config.h.  Generated by configure.  */
+/* config.in.  Generated from configure.in by autoheader.  */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Name of package */
+#define PACKAGE "fann"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Version number of package */
+#define VERSION "1.1.0"
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
diff --git a/src/include/fann.h b/src/include/fann.h
index e524a44..c413db5 100644
--- a/src/include/fann.h
+++ b/src/include/fann.h
@@ -33,6 +33,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 #else
 
+#include "compat_time.h"
 #include "fann_data.h"
 #include "fann_internal.h"
 #include "fann_activation.h"

-- 
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