figure_set 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 02eb9e48e69aeb58c3254a99d24af310d76b881f
4
+ data.tar.gz: af1e81aedda00d40ca188d57a4fa413b1fe08766
5
+ SHA512:
6
+ metadata.gz: 0a29d81e01ded4e8ff422b874a6a34f98f444450a8f4a423505e2b90c695e81146c212d9d463e0aff1185519ef786832f4f9bffe0dcd217b2c1bf34db35ff238
7
+ data.tar.gz: 29fa40030d7f16f500db239ed92dea9162933707faaac1fcf3cef51991e75111cdec7f84a6239f2b009d016b392ed40e431e672fa8751dd955f104b64a4971da
data/README.rdoc CHANGED
@@ -1,8 +1,8 @@
1
1
  = FigureSet
2
2
 
3
3
  = Description
4
- FigureSet is the library which treats set operation.
5
- FigureSet is able to treat the set of 32bit integer.(0 .. 2 ** 32 -1)
4
+ FigureSet is the library which treats set operation.
5
+ FigureSet is able to treat the set of 32bit integer.(0 .. 2 ** 32 -1)
6
6
 
7
7
  = How to
8
8
 
@@ -54,7 +54,7 @@
54
54
 
55
55
  = INSTALL:
56
56
 
57
- sudo gem install figure_set
57
+ sudo gem install figure_set
58
58
 
59
59
  = LICENSE:
60
60
 
data/ext/methods.c CHANGED
@@ -169,7 +169,7 @@ static VALUE t_sample(int argc, VALUE *argv, VALUE self)
169
169
  array = rb_ary_new2(sample_count);
170
170
  if (sample_count == root->size) {
171
171
  to_array(root, array);
172
- } else {
172
+ } else if (root->size) {
173
173
  sample(root, array, sample_count);
174
174
  }
175
175
 
@@ -242,4 +242,7 @@ void Init_figure_set(void) {
242
242
  rb_define_alias(rb_cFigureSet, "&", "intersection");
243
243
  rb_define_alias(rb_cFigureSet, "|", "union");
244
244
  rb_define_alias(rb_cFigureSet, "length", "size");
245
+
246
+ // for sample method
247
+ srand((unsigned) time(NULL));
245
248
  }
data/ext/sample.c CHANGED
@@ -16,8 +16,6 @@ void sample(root_node root, VALUE array, unsigned long sample_count)
16
16
  {
17
17
  unsigned int start_sample, sample_now, i, count, target_point;
18
18
 
19
- srand((unsigned) time(NULL));
20
-
21
19
  start_sample = RARRAY_LEN(array);
22
20
 
23
21
  for(sample_now = start_sample; sample_now < sample_count; sample_now++) {
data/lib/figure_set.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'figure_set.so'
2
2
 
3
3
  class FigureSet
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
 
6
6
  class << self
7
7
  def version
metadata CHANGED
@@ -1,67 +1,54 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: figure_set
3
- version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 1
10
- version: 0.0.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Tsukasa OISHI
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-11-26 00:00:00 +09:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
11
+ date: 2012-11-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
22
14
  name: newgem
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 25
30
- segments:
31
- - 1
32
- - 2
33
- - 3
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
34
19
  version: 1.2.3
35
20
  type: :development
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: hoe
39
21
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 55
46
- segments:
47
- - 1
48
- - 8
49
- - 0
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.2.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: hoe
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
50
33
  version: 1.8.0
51
34
  type: :development
52
- version_requirements: *id002
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.8.0
53
41
  description: FigureSet.
54
- email:
42
+ email:
55
43
  - tsukasa.oishi@gmail.com
56
44
  executables: []
57
-
58
- extensions:
45
+ extensions:
59
46
  - ext/extconf.rb
60
- extra_rdoc_files:
47
+ extra_rdoc_files:
61
48
  - History.txt
62
49
  - Manifest.txt
63
50
  - README.rdoc
64
- files:
51
+ files:
65
52
  - History.txt
66
53
  - Manifest.txt
67
54
  - README.rdoc
@@ -76,41 +63,30 @@ files:
76
63
  - ext/or.c
77
64
  - ext/array.c
78
65
  - ext/sample.c
79
- has_rdoc: true
80
66
  homepage: http://www.kaeruspoon.net/
81
67
  licenses: []
82
-
68
+ metadata: {}
83
69
  post_install_message:
84
- rdoc_options:
70
+ rdoc_options:
85
71
  - --main
86
72
  - README.rdoc
87
- require_paths:
73
+ require_paths:
88
74
  - lib
89
75
  - ext
90
- required_ruby_version: !ruby/object:Gem::Requirement
91
- none: false
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- hash: 3
96
- segments:
97
- - 0
98
- version: "0"
99
- required_rubygems_version: !ruby/object:Gem::Requirement
100
- none: false
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- hash: 3
105
- segments:
106
- - 0
107
- version: "0"
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
108
86
  requirements: []
109
-
110
87
  rubyforge_project: figure_set
111
- rubygems_version: 1.6.2
88
+ rubygems_version: 2.0.0
112
89
  signing_key:
113
90
  specification_version: 2
114
91
  summary: FigureSet.
115
92
  test_files: []
116
-