Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:romanbsd/rb-gsl

Conflicts:
	.gitignore
	Rakefile
  • Loading branch information...
commit e11403941e58aea52d206a731b4099445df476ca 2 parents 10f9773 + abeb830
@romanbsd authored
View
12 .gitignore
@@ -1,2 +1,10 @@
-pkg/
-html/created.rid
+ext/*.o
+ext/*.so
+ext/Makefile
+ext/mkmf.log
+include/rb_gsl_config.h
+lib/gsl.rb
+lib/rbgsl.rb
+pkg/*.gem
+.config
+InstalledFiles
View
3  README → README.rdoc
@@ -1,4 +1,3 @@
-=begin
== Description
Ruby/GSL, a ruby interface to GSL (GNU Scientific library)
@@ -28,5 +27,3 @@ submit reports from http://rubyforge.org/projects/rb-gsl/.
== Author
Yoshiki Tsunesada
y-tsunesada at mm dot em-net dot ne dot jp
-
-=end
View
2  Rakefile
@@ -27,7 +27,7 @@ spec = Gem::Specification.new do |s|
'AUTHORS',
'COPYING',
'ChangeLog',
- 'README',
+ 'README.rdoc',
'Rakefile',
'setup.rb',
'THANKS',
View
4 ext/nmf.c
@@ -16,7 +16,6 @@
#undef DEBUG
#define mm(a, b) gsl_matrix_mult(a, b)
-//gsl_matrix * gsl_matrix_mult(gsl_matrix *a, gsl_matrix *b)
gsl_matrix * gsl_matrix_mult(const gsl_matrix *a, const gsl_matrix *b)
{
gsl_matrix *c;
@@ -27,7 +26,6 @@ gsl_matrix * gsl_matrix_mult(const gsl_matrix *a, const gsl_matrix *b)
}
// pretty print
-//void pp(gsl_matrix *m)
void pp(const gsl_matrix *m)
{
int r, c;
@@ -41,7 +39,6 @@ void pp(const gsl_matrix *m)
}
/* Returns a distance cost */
-//double difcost(gsl_matrix *a, gsl_matrix *b)
double difcost(const gsl_matrix *a, const gsl_matrix *b)
{
int i, j;
@@ -53,7 +50,6 @@ double difcost(const gsl_matrix *a, const gsl_matrix *b)
{
d = gsl_matrix_get(a, i, j) - gsl_matrix_get(b, i, j);
dif += d*d;
- // dif += pow(gsl_matrix_get(a, i, j) - gsl_matrix_get(b, i, j), 2);
}
}
return dif;
View
3  ext/nmf_wrap.c
@@ -9,10 +9,8 @@
#include <gsl/gsl_matrix.h>
int gsl_matrix_nmf(gsl_matrix *v, int cols, gsl_matrix **w, gsl_matrix **h);
-//double difcost(gsl_matrix *a, gsl_matrix *b);
double difcost(const gsl_matrix *a, const gsl_matrix *b);
-//VALUE mNMF;
static VALUE mNMF;
extern VALUE cgsl_matrix;
@@ -62,7 +60,6 @@ static VALUE difcost_wrap(VALUE obj, VALUE matrix1, VALUE matrix2)
*/
static VALUE matrix_nmf(VALUE obj, VALUE cols)
{
- // nmf_wrap(cgsl_matrix, obj, cols);
return nmf_wrap(cgsl_matrix, obj, cols);
}
View
37 rb-gsl.gemspec
@@ -0,0 +1,37 @@
+Gem::Specification.new do |s|
+ # Basics
+ s.name = 'gsl'
+ # GitHub uses the version in order to decide whenever to rebuild
+ s.version = '1.12.109'
+ s.summary = 'Ruby interface to GSL'
+ s.description = 'RubyGSL is a Ruby interface to the GNU Scientific Library, for numerical computing with Ruby'
+ s.required_ruby_version = '>= 1.8.1'
+ s.requirements << 'GSL (http://www.gnu.org/software/gsl/)'
+ s.add_dependency('narray', '>= 0.5.9')
+
+ # About
+ s.authors = ['Yoshiki Tsunesada', 'David MacMahon']
+ s.email = 'y-tsunesada@mm.em-net.ne.jp'
+ s.homepage = 'http://rb-gsl.rubyforge.org/'
+ s.rubyforge_project = 'rb-gsl'
+
+ # Files, Libraries, and Extensions
+ s.files = Dir['README.rdoc', 'VERSION', 'Rakefile', 'ext/*',
+ 'lib/**/*', 'include/*']
+ s.require_paths = ['lib', 'lib/gsl', 'lib/ool', 'ext']
+ #s.autorequire = nil
+ #s.bindir = 'bin'
+ #s.executables = []
+ #s.default_executable = nil
+
+ # C compilation
+ s.extensions = %w[ ext/extconf.rb ]
+
+ # Documentation TODO
+ #s.rdoc_options = []
+ #s.has_rdoc = false
+ #s.extra_rdoc_files = []
+
+ # Testing TODO
+ #s.test_files = []
+end
Please sign in to comment.
Something went wrong with that request. Please try again.