ruby-fann 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile DELETED
@@ -1,4 +0,0 @@
1
- require 'config/requirements'
2
- require 'config/hoe' # setup Hoe + all gem configuration
3
-
4
- Dir['tasks/**/*.rake'].each { |rake| load rake }
@@ -1,71 +0,0 @@
1
- require 'ruby_fann/version'
2
-
3
- AUTHOR = 'Steven Miers' # can also be an array of Authors
4
- EMAIL = "steven@7bpeople.com"
5
- DESCRIPTION = "Bindings to use FANN from within ruby/rails environment."
6
- GEM_NAME = 'ruby-fann' # what ppl will type to install your gem
7
- RUBYFORGE_PROJECT = 'ruby-fann' # The unix name for your project
8
- HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
9
- DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
10
-
11
- @config_file = "~/.rubyforge/user-config.yml"
12
- @config = nil
13
- RUBYFORGE_USERNAME = "unknown"
14
- def rubyforge_username
15
- unless @config
16
- begin
17
- @config = YAML.load(File.read(File.expand_path(@config_file)))
18
- rescue
19
- puts <<-EOS
20
- ERROR: No rubyforge config file found: #{@config_file}
21
- Run 'rubyforge setup' to prepare your env for access to Rubyforge
22
- - See http://newgem.rubyforge.org/rubyforge.html for more details
23
- EOS
24
- exit
25
- end
26
- end
27
- RUBYFORGE_USERNAME.replace @config["username"]
28
- end
29
-
30
-
31
- REV = nil
32
- # UNCOMMENT IF REQUIRED:
33
- # REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
34
- VERS = RubyFann::VERSION::STRING + (REV ? ".#{REV}" : "")
35
- RDOC_OPTS = ['--quiet', '--title', 'ruby_fann documentation',
36
- "--opname", "index.html",
37
- "--line-numbers",
38
- "--main", "README.txt",
39
- "--inline-source"]
40
-
41
- class Hoe
42
- def extra_deps
43
- @extra_deps.reject! { |x| Array(x).first == 'hoe' }
44
- @extra_deps
45
- end
46
- end
47
-
48
- # Generate all the Rake tasks
49
- # Run 'rake -T' to see list of generated tasks (from gem root directory)
50
- hoe = Hoe.new(GEM_NAME, VERS) do |p|
51
- p.author = AUTHOR
52
- p.description = DESCRIPTION
53
- p.email = EMAIL
54
- p.summary = DESCRIPTION
55
- p.url = HOMEPATH
56
- p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
57
- p.test_globs = ["test/**/test_*.rb"]
58
- p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
59
-
60
- # == Optional
61
- #p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
62
- #p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
63
-
64
- p.spec_extras = {:extensions => "ext/ruby_fann/extconf.rb"} # A hash of extra values to set in the gemspec.
65
-
66
- end
67
-
68
- CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
69
- PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
70
- hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
71
- hoe.rsync_args = '-av --delete --ignore-errors'
@@ -1,17 +0,0 @@
1
- require 'fileutils'
2
- include FileUtils
3
-
4
- require 'rubygems'
5
- %w[rake hoe newgem rubigen].each do |req_gem|
6
- begin
7
- require req_gem
8
- rescue LoadError
9
- puts "This Rakefile requires the '#{req_gem}' RubyGem."
10
- puts "Installation: gem install #{req_gem} -y"
11
- exit
12
- end
13
- end
14
-
15
- $:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
16
-
17
- require 'ruby_fann'
@@ -1,3 +0,0 @@
1
- extconf.rb
2
- fann_augment.h
3
- neural_network.c
@@ -1,181 +0,0 @@
1
-
2
- SHELL = /bin/sh
3
-
4
- #### Start of system configuration section. ####
5
-
6
- srcdir = .
7
- topdir = /usr/local/include/ruby-1.9.1
8
- hdrdir = /usr/local/include/ruby-1.9.1
9
- arch_hdrdir = /usr/local/include/ruby-1.9.1/$(arch)
10
- VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
11
- prefix = $(DESTDIR)/usr/local
12
- exec_prefix = $(prefix)
13
- vendorhdrdir = $(rubyhdrdir)/vendor_ruby
14
- sitehdrdir = $(rubyhdrdir)/site_ruby
15
- rubyhdrdir = $(includedir)/$(RUBY_INSTALL_NAME)-$(ruby_version)
16
- vendordir = $(libdir)/$(RUBY_INSTALL_NAME)/vendor_ruby
17
- sitedir = $(libdir)/$(RUBY_INSTALL_NAME)/site_ruby
18
- mandir = $(datarootdir)/man
19
- localedir = $(datarootdir)/locale
20
- libdir = $(exec_prefix)/lib
21
- psdir = $(docdir)
22
- pdfdir = $(docdir)
23
- dvidir = $(docdir)
24
- htmldir = $(docdir)
25
- infodir = $(datarootdir)/info
26
- docdir = $(datarootdir)/doc/$(PACKAGE)
27
- oldincludedir = $(DESTDIR)/usr/include
28
- includedir = $(prefix)/include
29
- localstatedir = $(prefix)/var
30
- sharedstatedir = $(prefix)/com
31
- sysconfdir = $(prefix)/etc
32
- datadir = $(datarootdir)
33
- datarootdir = $(prefix)/share
34
- libexecdir = $(exec_prefix)/libexec
35
- sbindir = $(exec_prefix)/sbin
36
- bindir = $(exec_prefix)/bin
37
- rubylibdir = $(libdir)/$(ruby_install_name)/$(ruby_version)
38
- archdir = $(rubylibdir)/$(arch)
39
- sitelibdir = $(sitedir)/$(ruby_version)
40
- sitearchdir = $(sitelibdir)/$(sitearch)
41
- vendorlibdir = $(vendordir)/$(ruby_version)
42
- vendorarchdir = $(vendorlibdir)/$(sitearch)
43
-
44
- CC = gcc
45
- CXX = g++
46
- LIBRUBY = $(LIBRUBY_A)
47
- LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
48
- LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
49
- LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
50
- OUTFLAG = -o
51
- COUTFLAG = -o
52
-
53
- RUBY_EXTCONF_H =
54
- cflags = $(optflags) $(debugflags) $(warnflags)
55
- optflags = -O2
56
- debugflags = -g
57
- warnflags = -Wall -Wno-parentheses
58
- CFLAGS = -fno-common $(cflags) -pipe -fno-common
59
- INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
60
- DEFS =
61
- CPPFLAGS = -DHAVE_DOUBLEFANN_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
62
- CXXFLAGS = $(CFLAGS) $(cxxflags)
63
- ldflags = -L. -L/usr/local/lib
64
- dldflags =
65
- archflag =
66
- DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
67
- LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace
68
- LDSHAREDXX = $(LDSHARED)
69
- AR = ar
70
- EXEEXT =
71
-
72
- RUBY_INSTALL_NAME = ruby
73
- RUBY_SO_NAME = ruby
74
- arch = i386-darwin10.2.0
75
- sitearch = i386-darwin10.2.0
76
- ruby_version = 1.9.1
77
- ruby = /usr/local/bin/ruby
78
- RUBY = $(ruby)
79
- RM = rm -f
80
- RM_RF = $(RUBY) -run -e rm -- -rf
81
- RMDIRS = $(RUBY) -run -e rmdir -- -p
82
- MAKEDIRS = mkdir -p
83
- INSTALL = /usr/bin/install -c
84
- INSTALL_PROG = $(INSTALL) -m 0755
85
- INSTALL_DATA = $(INSTALL) -m 644
86
- COPY = cp
87
-
88
- #### End of system configuration section. ####
89
-
90
- preload =
91
-
92
- libpath = . $(libdir)
93
- LIBPATH = -L. -L$(libdir)
94
- DEFFILE =
95
-
96
- CLEANFILES = mkmf.log
97
- DISTCLEANFILES =
98
- DISTCLEANDIRS =
99
-
100
- extout =
101
- extout_prefix =
102
- target_prefix =
103
- LOCAL_LIBS =
104
- LIBS = -lpthread -ldl -lobjc
105
- SRCS = neural_network.c doublefann.c
106
- OBJS = neural_network.o doublefann.o
107
- TARGET = neural_network
108
- DLLIB = $(TARGET).bundle
109
- EXTSTATIC =
110
- STATIC_LIB =
111
-
112
- BINDIR = $(bindir)
113
- RUBYCOMMONDIR = $(sitedir)$(target_prefix)
114
- RUBYLIBDIR = $(sitelibdir)$(target_prefix)
115
- RUBYARCHDIR = $(sitearchdir)$(target_prefix)
116
- HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
117
- ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
118
-
119
- TARGET_SO = $(DLLIB)
120
- CLEANLIBS = $(TARGET).bundle
121
- CLEANOBJS = *.o *.bak
122
-
123
- all: $(DLLIB)
124
- static: $(STATIC_LIB)
125
-
126
- clean-rb-default::
127
- clean-rb::
128
- clean-so::
129
- clean: clean-so clean-rb-default clean-rb
130
- @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
131
-
132
- distclean-rb-default::
133
- distclean-rb::
134
- distclean-so::
135
- distclean: clean distclean-so distclean-rb-default distclean-rb
136
- @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
137
- @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
138
- @-$(RMDIRS) $(DISTCLEANDIRS)
139
-
140
- realclean: distclean
141
- install: install-so install-rb
142
-
143
- install-so: $(RUBYARCHDIR)
144
- install-so: $(RUBYARCHDIR)/$(DLLIB)
145
- $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
146
- $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
147
- install-rb: pre-install-rb install-rb-default
148
- install-rb-default: pre-install-rb-default
149
- pre-install-rb: Makefile
150
- pre-install-rb-default: Makefile
151
- $(RUBYARCHDIR):
152
- $(MAKEDIRS) $@
153
-
154
- site-install: site-install-so site-install-rb
155
- site-install-so: install-so
156
- site-install-rb: install-rb
157
-
158
- .SUFFIXES: .c .m .cc .cxx .cpp .C .o
159
-
160
- .cc.o:
161
- $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
162
-
163
- .cxx.o:
164
- $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
165
-
166
- .cpp.o:
167
- $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
168
-
169
- .C.o:
170
- $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
171
-
172
- .c.o:
173
- $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
174
-
175
- $(DLLIB): $(OBJS) Makefile
176
- @-$(RM) $(@)
177
- $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
178
-
179
-
180
-
181
- $(OBJS): $(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h
Binary file
@@ -1,304 +0,0 @@
1
- #VRML V2.0 utf8
2
- Group { children [
3
- Transform {
4
- scale 0.028 0.028 0.028
5
- children [
6
- Background { skyColor 1.000 1.000 1.000 }
7
- # node 2152233720
8
- Transform {
9
- translation 6.000 47.000 0.000
10
- scale 1.800 1.800 1.800
11
- children [
12
- Transform {
13
- children [
14
- Shape {
15
- geometry Sphere { radius 1.0 }
16
- appearance Appearance {
17
- material Material {
18
- ambientIntensity 0.33
19
- diffuseColor 0.000 0.000 0.000
20
- }
21
- }
22
- }
23
- ]
24
- }
25
- ]
26
- }
27
- # node 2152233020
28
- Transform {
29
- translation 50.000 7.000 0.000
30
- scale 1.800 1.800 1.800
31
- children [
32
- Transform {
33
- children [
34
- Shape {
35
- geometry Sphere { radius 1.0 }
36
- appearance Appearance {
37
- material Material {
38
- ambientIntensity 0.33
39
- diffuseColor 0.000 0.000 0.000
40
- }
41
- }
42
- }
43
- ]
44
- }
45
- ]
46
- }
47
- # edge 2152233720 -> 2152233020
48
- Group { children [
49
- Transform {
50
- children [
51
- Shape {
52
- geometry Cylinder {
53
- bottom FALSE top FALSE
54
- height 38.577 radius 1.000 }
55
- appearance Appearance {
56
- material Material {
57
- ambientIntensity 0.33
58
- diffuseColor 0.000 0.000 1.000
59
- }
60
- }
61
- }
62
- Transform {
63
- translation 0 24.288 0
64
- children [
65
- Shape {
66
- geometry Cone {bottomRadius 3.500 height 10.000 }
67
- appearance Appearance {
68
- material Material {
69
- ambientIntensity 0.33
70
- diffuseColor 0.000 0.000 1.000
71
- }
72
- }
73
- }
74
- ]
75
- }
76
- ]
77
- center 0 5.000 0
78
- rotation -0.000 0 -22.000 -3.975
79
- translation 24.000 17.000 0.000
80
- }
81
- ] }
82
- # node 2152233580
83
- Transform {
84
- translation 28.000 47.000 0.000
85
- scale 1.800 1.800 1.800
86
- children [
87
- Transform {
88
- children [
89
- Shape {
90
- geometry Sphere { radius 1.0 }
91
- appearance Appearance {
92
- material Material {
93
- ambientIntensity 0.33
94
- diffuseColor 0.000 0.000 0.000
95
- }
96
- }
97
- }
98
- ]
99
- }
100
- ]
101
- }
102
- # edge 2152233580 -> 2152233020
103
- Group { children [
104
- Transform {
105
- children [
106
- Shape {
107
- geometry Cylinder {
108
- bottom FALSE top FALSE
109
- height 24.184 radius 1.000 }
110
- appearance Appearance {
111
- material Material {
112
- ambientIntensity 0.33
113
- diffuseColor 0.000 0.000 1.000
114
- }
115
- }
116
- }
117
- Transform {
118
- translation 0 17.092 0
119
- children [
120
- Shape {
121
- geometry Cone {bottomRadius 3.500 height 10.000 }
122
- appearance Appearance {
123
- material Material {
124
- ambientIntensity 0.33
125
- diffuseColor 0.000 0.000 1.000
126
- }
127
- }
128
- }
129
- ]
130
- }
131
- ]
132
- center 0 5.000 0
133
- rotation -0.000 0 -11.000 -3.644
134
- translation 35.000 17.000 0.000
135
- }
136
- ] }
137
- # node 2152233440
138
- Transform {
139
- translation 50.000 47.000 0.000
140
- scale 1.800 1.800 1.800
141
- children [
142
- Transform {
143
- children [
144
- Shape {
145
- geometry Sphere { radius 1.0 }
146
- appearance Appearance {
147
- material Material {
148
- ambientIntensity 0.33
149
- diffuseColor 0.000 0.000 0.000
150
- }
151
- }
152
- }
153
- ]
154
- }
155
- ]
156
- }
157
- # edge 2152233440 -> 2152233020
158
- Group { children [
159
- Transform {
160
- children [
161
- Shape {
162
- geometry Cylinder {
163
- bottom FALSE top FALSE
164
- height 17.447 radius 1.000 }
165
- appearance Appearance {
166
- material Material {
167
- ambientIntensity 0.33
168
- diffuseColor 0.000 0.000 1.000
169
- }
170
- }
171
- }
172
- Transform {
173
- translation 0 13.724 0
174
- children [
175
- Shape {
176
- geometry Cone {bottomRadius 3.500 height 10.000 }
177
- appearance Appearance {
178
- material Material {
179
- ambientIntensity 0.33
180
- diffuseColor 0.000 0.000 1.000
181
- }
182
- }
183
- }
184
- ]
185
- }
186
- ]
187
- center 0 5.000 0
188
- rotation -0.000 0 1.000 -3.142
189
- translation 46.000 17.000 0.000
190
- }
191
- ] }
192
- # node 2152233300
193
- Transform {
194
- translation 72.000 47.000 0.000
195
- scale 1.800 1.800 1.800
196
- children [
197
- Transform {
198
- children [
199
- Shape {
200
- geometry Sphere { radius 1.0 }
201
- appearance Appearance {
202
- material Material {
203
- ambientIntensity 0.33
204
- diffuseColor 0.000 0.000 0.000
205
- }
206
- }
207
- }
208
- ]
209
- }
210
- ]
211
- }
212
- # edge 2152233300 -> 2152233020
213
- Group { children [
214
- Transform {
215
- children [
216
- Shape {
217
- geometry Cylinder {
218
- bottom FALSE top FALSE
219
- height 22.918 radius 1.000 }
220
- appearance Appearance {
221
- material Material {
222
- ambientIntensity 0.33
223
- diffuseColor 0.000 0.000 1.000
224
- }
225
- }
226
- }
227
- Transform {
228
- translation 0 16.459 0
229
- children [
230
- Shape {
231
- geometry Cone {bottomRadius 3.500 height 10.000 }
232
- appearance Appearance {
233
- material Material {
234
- ambientIntensity 0.33
235
- diffuseColor 0.000 0.000 1.000
236
- }
237
- }
238
- }
239
- ]
240
- }
241
- ]
242
- center 0 5.000 0
243
- rotation -0.000 0 11.000 -3.644
244
- translation 57.000 17.000 0.000
245
- }
246
- ] }
247
- # node 2152233160
248
- Transform {
249
- translation 94.000 47.000 0.000
250
- scale 1.800 1.800 1.800
251
- children [
252
- Transform {
253
- children [
254
- Shape {
255
- geometry Sphere { radius 1.0 }
256
- appearance Appearance {
257
- material Material {
258
- ambientIntensity 0.33
259
- diffuseColor 0.000 0.000 0.000
260
- }
261
- }
262
- }
263
- ]
264
- }
265
- ]
266
- }
267
- # edge 2152233160 -> 2152233020
268
- Group { children [
269
- Transform {
270
- children [
271
- Shape {
272
- geometry Cylinder {
273
- bottom FALSE top FALSE
274
- height 36.258 radius 1.000 }
275
- appearance Appearance {
276
- material Material {
277
- ambientIntensity 0.33
278
- diffuseColor 0.000 0.000 1.000
279
- }
280
- }
281
- }
282
- Transform {
283
- translation 0 23.129 0
284
- children [
285
- Shape {
286
- geometry Cone {bottomRadius 3.500 height 10.000 }
287
- appearance Appearance {
288
- material Material {
289
- ambientIntensity 0.33
290
- diffuseColor 0.000 0.000 1.000
291
- }
292
- }
293
- }
294
- ]
295
- }
296
- ]
297
- center 0 5.000 0
298
- rotation -0.000 0 22.000 -3.975
299
- translation 68.000 17.000 0.000
300
- }
301
- ] }
302
- ] }
303
- Viewpoint {position 1.852 0.963 5.961}
304
- ] }