ruby-fann 0.7.10 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -1
- data/License.txt +1 -1
- data/Manifest.txt +22 -1
- data/README.txt +0 -1
- data/Rakefile +0 -0
- data/config/hoe.rb +0 -0
- data/config/requirements.rb +0 -0
- data/ext/ruby_fann/MANIFEST +0 -0
- data/ext/ruby_fann/Makefile +36 -28
- data/ext/ruby_fann/doublefann.c +30 -0
- data/ext/ruby_fann/doublefann.h +33 -0
- data/ext/ruby_fann/extconf.rb +9 -5
- data/ext/ruby_fann/fann.c +1552 -0
- data/ext/ruby_fann/fann_activation.h +144 -0
- data/ext/ruby_fann/fann_augment.h +0 -0
- data/ext/ruby_fann/fann_cascade.c +1031 -0
- data/ext/ruby_fann/fann_cascade.h +503 -0
- data/ext/ruby_fann/fann_data.h +799 -0
- data/ext/ruby_fann/fann_error.c +204 -0
- data/ext/ruby_fann/fann_error.h +161 -0
- data/ext/ruby_fann/fann_internal.h +148 -0
- data/ext/ruby_fann/fann_io.c +762 -0
- data/ext/ruby_fann/fann_io.h +100 -0
- data/ext/ruby_fann/fann_train.c +962 -0
- data/ext/ruby_fann/fann_train.h +1203 -0
- data/ext/ruby_fann/fann_train_data.c +1231 -0
- data/ext/ruby_fann/neural_network.c +0 -0
- data/lib/ruby_fann/neurotica.rb +0 -0
- data/lib/ruby_fann/version.rb +3 -3
- data/lib/ruby_fann.rb +0 -0
- data/neurotica1.png +0 -0
- data/neurotica2.vrml +18 -18
- data/setup.rb +0 -0
- data/tasks/deployment.rake +0 -0
- data/tasks/environment.rake +0 -0
- data/tasks/website.rake +0 -0
- data/test/test.train +0 -0
- data/test/test_helper.rb +0 -0
- data/test/test_neurotica.rb +0 -0
- data/test/test_ruby_fann.rb +0 -0
- data/test/test_ruby_fann_functional.rb +0 -0
- data/verify.train +0 -0
- data/website/index.html +42 -92
- data/website/index.txt +0 -0
- data/website/javascripts/rounded_corners_lite.inc.js +0 -0
- data/website/stylesheets/screen.css +0 -0
- data/website/template.rhtml +0 -0
- data/xor.train +0 -0
- data/xor_cascade.net +2 -2
- data/xor_float.net +1 -1
- metadata +22 -6
- data/log/debug.log +0 -0
data/History.txt
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
+
== 1.0.0 2009-12-01
|
2
|
+
|
3
|
+
* 1 major enhancement:
|
4
|
+
* Can build/install & execute without first installing & building FANN.
|
5
|
+
|
1
6
|
== 0.7.10 2008-11-24
|
2
7
|
|
3
8
|
* 1 minor enhancement:
|
4
|
-
* Remove
|
9
|
+
* Remove several printf statements that were showing up in certain production environment's error logs.
|
5
10
|
|
6
11
|
== 0.7.9 2008-08-15
|
7
12
|
|
data/License.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -10,10 +10,31 @@ ext/ruby_fann/Makefile
|
|
10
10
|
ext/ruby_fann/extconf.rb
|
11
11
|
ext/ruby_fann/fann_augment.h
|
12
12
|
ext/ruby_fann/neural_network.c
|
13
|
+
ext/ruby_fann/doublefann.h
|
14
|
+
ext/ruby_fann/fann_error.h
|
15
|
+
ext/ruby_fann/fann_activation.h
|
16
|
+
ext/ruby_fann/fann_data.h
|
17
|
+
ext/ruby_fann/fann_internal.h
|
18
|
+
ext/ruby_fann/fann_train.h
|
19
|
+
ext/ruby_fann/fann_cascade.h
|
20
|
+
ext/ruby_fann/fann_io.h
|
21
|
+
ext/ruby_fann/fann.c
|
22
|
+
ext/ruby_fann/doublefann.c
|
23
|
+
ext/ruby_fann/fann_io.c
|
24
|
+
ext/ruby_fann/fann_train.c
|
25
|
+
ext/ruby_fann/fann_train_data.c
|
26
|
+
ext/ruby_fann/fann_error.c
|
27
|
+
ext/ruby_fann/fann_cascade.c
|
28
|
+
ext/ruby_fann/fann_io.c
|
29
|
+
ext/ruby_fann/fann_train.c
|
30
|
+
ext/ruby_fann/fann_train_data.c
|
31
|
+
ext/ruby_fann/fann_error.c
|
32
|
+
ext/ruby_fann/fann_cascade.c
|
13
33
|
lib/ruby_fann.rb
|
14
34
|
lib/ruby_fann/neurotica.rb
|
35
|
+
lib/ruby_fann/
|
15
36
|
lib/ruby_fann/version.rb
|
16
|
-
log/
|
37
|
+
log/
|
17
38
|
neurotica1.png
|
18
39
|
neurotica2.vrml
|
19
40
|
script/destroy
|
data/README.txt
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
Bindings to use FANN from within ruby/rails environment. Fann is a is a free open source neural network library, which implements multilayer artificial neural networks with support for both fully connected and sparsely connected networks. It is easy to use, versatile, well documented, and fast. RubyFann makes programming neural networks a breeze, with the added benefit that most of the heavy lifting natively.
|
3
3
|
|
4
4
|
= Requirements
|
5
|
-
FANN 2.1 or greater (preferably in /usr/local/lib)
|
6
5
|
Ruby 1.8.6 or greater.
|
7
6
|
gnu make tools or equiv for native code in ext
|
8
7
|
|
data/Rakefile
CHANGED
File without changes
|
data/config/hoe.rb
CHANGED
File without changes
|
data/config/requirements.rb
CHANGED
File without changes
|
data/ext/ruby_fann/MANIFEST
CHANGED
File without changes
|
data/ext/ruby_fann/Makefile
CHANGED
@@ -4,58 +4,65 @@ SHELL = /bin/sh
|
|
4
4
|
#### Start of system configuration section. ####
|
5
5
|
|
6
6
|
srcdir = .
|
7
|
-
topdir = /usr/
|
7
|
+
topdir = /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0
|
8
8
|
hdrdir = $(topdir)
|
9
9
|
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
10
|
-
prefix = $(DESTDIR)/usr/local
|
11
10
|
exec_prefix = $(prefix)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dvidir = $(docdir)
|
16
|
-
datarootdir = $(prefix)/share
|
17
|
-
archdir = $(rubylibdir)/$(arch)
|
18
|
-
sbindir = $(exec_prefix)/sbin
|
11
|
+
prefix = $(DESTDIR)/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr
|
12
|
+
sharedstatedir = $(prefix)/com
|
13
|
+
mandir = $(DESTDIR)/usr/share/man
|
19
14
|
psdir = $(docdir)
|
15
|
+
oldincludedir = $(DESTDIR)/usr/include
|
20
16
|
localedir = $(datarootdir)/locale
|
17
|
+
bindir = $(exec_prefix)/bin
|
18
|
+
libexecdir = $(exec_prefix)/libexec
|
19
|
+
sitedir = $(DESTDIR)/Library/Ruby/Site
|
21
20
|
htmldir = $(docdir)
|
22
|
-
|
21
|
+
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
23
22
|
includedir = $(prefix)/include
|
24
|
-
infodir = $(
|
23
|
+
infodir = $(DESTDIR)/usr/share/info
|
24
|
+
vendorlibdir = $(vendordir)/$(ruby_version)
|
25
25
|
sysconfdir = $(prefix)/etc
|
26
|
-
mandir = $(datarootdir)/man
|
27
26
|
libdir = $(exec_prefix)/lib
|
28
|
-
|
29
|
-
|
27
|
+
sbindir = $(exec_prefix)/sbin
|
28
|
+
rubylibdir = $(libdir)/ruby/$(ruby_version)
|
29
|
+
docdir = $(datarootdir)/doc/$(PACKAGE)
|
30
|
+
dvidir = $(docdir)
|
31
|
+
vendordir = $(libdir)/ruby/vendor_ruby
|
32
|
+
datarootdir = $(prefix)/share
|
30
33
|
pdfdir = $(docdir)
|
34
|
+
archdir = $(rubylibdir)/$(arch)
|
31
35
|
sitearchdir = $(sitelibdir)/$(sitearch)
|
32
|
-
|
36
|
+
datadir = $(datarootdir)
|
33
37
|
localstatedir = $(prefix)/var
|
34
38
|
sitelibdir = $(sitedir)/$(ruby_version)
|
35
|
-
libexecdir = $(exec_prefix)/libexec
|
36
39
|
|
37
40
|
CC = gcc
|
38
41
|
LIBRUBY = $(LIBRUBY_SO)
|
39
42
|
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
40
43
|
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
41
|
-
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)
|
44
|
+
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)
|
42
45
|
|
43
46
|
RUBY_EXTCONF_H =
|
44
|
-
CFLAGS = -fno-common -g -
|
45
|
-
INCFLAGS = -I. -I
|
46
|
-
|
47
|
+
CFLAGS = -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common $(cflags)
|
48
|
+
INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
|
49
|
+
DEFS =
|
50
|
+
CPPFLAGS = -DHAVE_DOUBLEFANN_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
|
47
51
|
CXXFLAGS = $(CFLAGS)
|
48
|
-
|
49
|
-
|
52
|
+
ldflags = -L. -arch i386 -arch x86_64
|
53
|
+
dldflags =
|
54
|
+
archflag =
|
55
|
+
DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
|
56
|
+
LDSHARED = cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup
|
50
57
|
AR = ar
|
51
58
|
EXEEXT =
|
52
59
|
|
53
60
|
RUBY_INSTALL_NAME = ruby
|
54
61
|
RUBY_SO_NAME = ruby
|
55
|
-
arch =
|
56
|
-
sitearch =
|
62
|
+
arch = universal-darwin10.0
|
63
|
+
sitearch = universal-darwin10.0
|
57
64
|
ruby_version = 1.8
|
58
|
-
ruby = /usr/
|
65
|
+
ruby = /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
|
59
66
|
RUBY = $(ruby)
|
60
67
|
RM = rm -f
|
61
68
|
MAKEDIRS = mkdir -p
|
@@ -68,8 +75,8 @@ COPY = cp
|
|
68
75
|
|
69
76
|
preload =
|
70
77
|
|
71
|
-
libpath = . $(libdir)
|
72
|
-
LIBPATH = -L
|
78
|
+
libpath = . $(libdir)
|
79
|
+
LIBPATH = -L. -L$(libdir)
|
73
80
|
DEFFILE =
|
74
81
|
|
75
82
|
CLEANFILES = mkmf.log
|
@@ -79,7 +86,7 @@ extout =
|
|
79
86
|
extout_prefix =
|
80
87
|
target_prefix =
|
81
88
|
LOCAL_LIBS =
|
82
|
-
LIBS = $(LIBRUBYARG_SHARED)
|
89
|
+
LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl
|
83
90
|
SRCS = neural_network.c
|
84
91
|
OBJS = neural_network.o
|
85
92
|
TARGET = neural_network
|
@@ -87,6 +94,7 @@ DLLIB = $(TARGET).bundle
|
|
87
94
|
EXTSTATIC =
|
88
95
|
STATIC_LIB =
|
89
96
|
|
97
|
+
BINDIR = $(bindir)
|
90
98
|
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
91
99
|
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
92
100
|
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/*
|
2
|
+
Fast Artificial Neural Network Library (fann)
|
3
|
+
Copyright (C) 2003 Steffen Nissen (lukesky@diku.dk)
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
*/
|
19
|
+
|
20
|
+
/* Easy way to allow for build of multiple binaries */
|
21
|
+
|
22
|
+
#include "config.h"
|
23
|
+
#include "doublefann.h"
|
24
|
+
|
25
|
+
#include "fann.c"
|
26
|
+
#include "fann_io.c"
|
27
|
+
#include "fann_train.c"
|
28
|
+
#include "fann_train_data.c"
|
29
|
+
#include "fann_error.c"
|
30
|
+
#include "fann_cascade.c"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/*
|
2
|
+
Fast Artificial Neural Network Library (fann)
|
3
|
+
Copyright (C) 2003 Steffen Nissen (lukesky@diku.dk)
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
*/
|
19
|
+
|
20
|
+
#ifndef __doublefann_h__
|
21
|
+
#define __doublefann_h__
|
22
|
+
|
23
|
+
typedef double fann_type;
|
24
|
+
|
25
|
+
#undef DOUBLEFANN
|
26
|
+
#define DOUBLEFANN
|
27
|
+
#define FANNPRINTF "%.20e"
|
28
|
+
#define FANNSCANF "%le"
|
29
|
+
|
30
|
+
#define FANN_INCLUDE
|
31
|
+
#include "fann.h"
|
32
|
+
|
33
|
+
#endif
|
data/ext/ruby_fann/extconf.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
require 'mkmf'
|
2
|
-
lib = dir_config('fann', '/usr/local')
|
3
|
-
if !have_library("doublefann", "fann_create_standard")
|
4
|
-
puts "FANN must be installed and available in /usr/local or passed in with --with-fann-dir. Windows users should use ruby compiled in Cygwin or an equivalent, such as MingW. Ruby installed with the OneClickInstaller is not sufficient."
|
5
|
-
exit 1
|
6
|
-
end
|
2
|
+
# lib = dir_config('fann', '/usr/local')
|
3
|
+
#if !have_library("doublefann", "fann_create_standard")
|
4
|
+
# puts "FANN must be installed and available in /usr/local or passed in with --with-fann-dir. Windows users should use ruby compiled in Cygwin or an equivalent, such as MingW. Ruby installed with the OneClickInstaller is not sufficient."
|
5
|
+
# exit 1
|
6
|
+
#end
|
7
7
|
#find_library("doublefann", "fann_create_standard", "/usr/local/lib")
|
8
|
+
|
9
|
+
#dir_config('fann', '.')
|
10
|
+
$objs=["neural_network.o", "doublefann.o"]
|
11
|
+
have_header("doublefann.h")
|
8
12
|
create_makefile("neural_network")
|