thera 0.0.4 → 0.0.5
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/ext/extconf.rb +3 -1
- data/lib/quarry/Makefile.linux +2 -0
- data/lib/quarry/src/classifier/classifier.h +1 -0
- data/lib/quarry/src/classifier/naive_bayes/naive_bayes_classifier.h +1 -0
- data/lib/quarry/src/data_set/features/numeric_feature.h +2 -0
- data/lib/quarry/src/storage/folders.cpp +3 -2
- data/thera.gemspec +1 -1
- metadata +4 -4
data/ext/extconf.rb
CHANGED
@@ -2,6 +2,7 @@ require 'mkmf-rice'
|
|
2
2
|
|
3
3
|
QUARRY_H = 'quarry.h'
|
4
4
|
MARKER = 'mkmf_marker'
|
5
|
+
cflags = '-x c++'
|
5
6
|
quarry_dir = File.join(File.dirname(__FILE__), '..', 'lib', 'quarry')
|
6
7
|
quarry_obj = File.join(quarry_dir, 'obj')
|
7
8
|
quarry_src = File.join(quarry_dir, 'src')
|
@@ -14,6 +15,7 @@ Dir.chdir(quarry_dir) do
|
|
14
15
|
`make -f Makefile.osx clean`
|
15
16
|
`make -f Makefile.osx`
|
16
17
|
else
|
18
|
+
cflags += ' -std=g++0x -Wno-multichar -frtti'
|
17
19
|
puts "Compiling quarry (linux mode)"
|
18
20
|
`make -f Makefile.linux clean`
|
19
21
|
`make -f Makefile.linux`
|
@@ -21,7 +23,7 @@ Dir.chdir(quarry_dir) do
|
|
21
23
|
end
|
22
24
|
|
23
25
|
# the cflags are required to make mkmf compile in c++ mode
|
24
|
-
with_cflags(
|
26
|
+
with_cflags(cflags) do
|
25
27
|
find_header(QUARRY_H, quarry_src)
|
26
28
|
$LIBPATH << quarry_obj
|
27
29
|
have_library('quarry', MARKER, quarry_header)
|
data/lib/quarry/Makefile.linux
CHANGED
@@ -19,7 +19,8 @@ void Storage::Folders::load_directory(string path, DataSet::SparseDataSet *data_
|
|
19
19
|
string newpath;
|
20
20
|
struct stat info;
|
21
21
|
FILE *file;
|
22
|
-
int file_length;
|
22
|
+
int file_length = 0;
|
23
|
+
int read = 0;
|
23
24
|
|
24
25
|
while((dp = readdir(dir))) {
|
25
26
|
// ignore files starting with a dot
|
@@ -47,7 +48,7 @@ void Storage::Folders::load_directory(string path, DataSet::SparseDataSet *data_
|
|
47
48
|
}
|
48
49
|
|
49
50
|
// read into the buffer
|
50
|
-
fread(file_data, 1, file_length - 1, file);
|
51
|
+
read = fread(file_data, 1, file_length - 1, file);
|
51
52
|
file_data[file_length - 1] = 0;
|
52
53
|
fclose(file);
|
53
54
|
|
data/thera.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.description = "C++ Data Mining Library for Ruby"
|
10
10
|
s.email = "me@willcannings.com"
|
11
11
|
s.authors = ["Will Cannings"]
|
12
|
-
s.version = '0.0.
|
12
|
+
s.version = '0.0.5'
|
13
13
|
s.extensions = ["ext/extconf.rb"]
|
14
14
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-12-
|
12
|
+
date: 2011-12-13 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rice
|
16
|
-
requirement: &
|
16
|
+
requirement: &70358172322420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70358172322420
|
25
25
|
description: C++ Data Mining Library for Ruby
|
26
26
|
email: me@willcannings.com
|
27
27
|
executables: []
|