figure_set 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +23 -0
- data/.travis.yml +18 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.rdoc +2 -0
- data/Rakefile +14 -28
- data/benchmark/sample_benchmark.rb +12 -0
- data/ext/{and.c → figure_set/and.c} +0 -0
- data/ext/{array.c → figure_set/array.c} +0 -0
- data/ext/{extconf.rb → figure_set/extconf.rb} +0 -0
- data/ext/{figure_set.h → figure_set/figure_set.h} +0 -0
- data/ext/{index.c → figure_set/index.c} +0 -0
- data/ext/{init.c → figure_set/init.c} +0 -0
- data/ext/{methods.c → figure_set/methods.c} +5 -4
- data/ext/{or.c → figure_set/or.c} +0 -0
- data/ext/{sample.c → figure_set/sample.c} +0 -0
- data/figure_set.gemspec +32 -0
- data/lib/figure_set/version.rb +9 -0
- data/lib/figure_set.rb +2 -11
- metadata +92 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67ec953fd3744642861e8948611dea5733cfc220
|
4
|
+
data.tar.gz: 3d2d1b3f8c08f80a9376b235d3732b7e35b7732f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12e5fb122541e2319d4af66297b6b9e22d12d2afd28ff3e04c6c113837277631c2b41f36c2502396291b8c1d08e2dc441eb98ec7c8f67013fa61b916aa51f088
|
7
|
+
data.tar.gz: bc35bf87ca26e369687894d45179419b54d5472a8468ea3af4f04655703b166f261fa67c4b0b1012dfab9a2b3a2b1144a03b89fe7926be837ed090fdc8ef6894
|
data/.gitignore
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
23
|
+
bundle
|
data/.travis.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
language: ruby
|
2
|
+
before_install:
|
3
|
+
- gem install bundler
|
4
|
+
before_script:
|
5
|
+
- bundle update
|
6
|
+
- "bundle exec rake compile"
|
7
|
+
script:
|
8
|
+
- "bundle exec rake test"
|
9
|
+
cache: bundler
|
10
|
+
rvm:
|
11
|
+
- 2.0.0
|
12
|
+
- 2.1.8
|
13
|
+
- 2.2.4
|
14
|
+
- 2.3.0
|
15
|
+
- ruby-head
|
16
|
+
notifications:
|
17
|
+
emails:
|
18
|
+
- tsukasa.oishi@gmail.com
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at tsukasa.oishi@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Tsukasa OISHI
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.rdoc
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
= FigureSet
|
2
2
|
|
3
|
+
{<img src="https://badge.fury.io/rb/figure_set.svg" alt="Gem Version" />}[http://badge.fury.io/rb/figure_set] {<img src="https://travis-ci.org/tsukasaoishi/figure_set.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/tsukasaoishi/figure_set] {<img src="https://codeclimate.com/github/tsukasaoishi/figure_set/badges/gpa.svg" />}[https://codeclimate.com/github/tsukasaoishi/figure_set]
|
4
|
+
|
3
5
|
= Description
|
4
6
|
FigureSet is the library which treats set operation.
|
5
7
|
FigureSet is able to treat the set of 32bit integer.(0 .. 2 ** 32 -1)
|
data/Rakefile
CHANGED
@@ -1,28 +1,14 @@
|
|
1
|
-
|
2
|
-
require
|
3
|
-
|
4
|
-
|
5
|
-
#
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
:extensions => ['ext/extconf.rb'],
|
16
|
-
}
|
17
|
-
|
18
|
-
p.clean_globs |= %w[**/.DS_Store tmp *.log]
|
19
|
-
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
20
|
-
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
21
|
-
p.rsync_args = '-av --delete --ignore-errors'
|
22
|
-
end
|
23
|
-
|
24
|
-
require 'newgem/tasks' # load /tasks/*.rake
|
25
|
-
Dir['tasks/**/*.rake'].each { |t| load t }
|
26
|
-
|
27
|
-
# TODO - want other tests/tasks run by default? Add them to the list
|
28
|
-
# task :default => [:spec, :features]
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rake/extensiontask"
|
3
|
+
require 'rake/testtask'
|
4
|
+
|
5
|
+
# compile
|
6
|
+
gemspec = eval(File.read(File.expand_path('../figure_set.gemspec', __FILE__)))
|
7
|
+
Rake::ExtensionTask.new("figure_set", gemspec) do |ext|
|
8
|
+
ext.lib_dir = "lib/figure_set"
|
9
|
+
end
|
10
|
+
|
11
|
+
# test
|
12
|
+
Rake::TestTask.new do |t|
|
13
|
+
t.test_files = FileList['test/**/test_*.rb']
|
14
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -6,6 +6,7 @@
|
|
6
6
|
#include <stdlib.h>
|
7
7
|
#include <string.h>
|
8
8
|
#include <ruby.h>
|
9
|
+
#include <time.h>
|
9
10
|
#include "figure_set.h"
|
10
11
|
|
11
12
|
//-----------------------------------------------------------
|
@@ -71,8 +72,8 @@ static VALUE t_add(VALUE self, VALUE value)
|
|
71
72
|
{
|
72
73
|
root_node root;
|
73
74
|
|
74
|
-
if (TYPE(value) != T_FIXNUM) return;
|
75
|
-
if (VALID_MIN_VALUE > value || VALID_MAX_VALUE < value) return;
|
75
|
+
if (TYPE(value) != T_FIXNUM) return self;
|
76
|
+
if (VALID_MIN_VALUE > value || VALID_MAX_VALUE < value) return self;
|
76
77
|
|
77
78
|
Data_Get_Struct(self, struct _root_node, root);
|
78
79
|
add_num(root, NUM2ULONG(value));
|
@@ -87,8 +88,8 @@ static VALUE t_delete(VALUE self, VALUE value)
|
|
87
88
|
{
|
88
89
|
root_node root;
|
89
90
|
|
90
|
-
if (TYPE(value) != T_FIXNUM) return;
|
91
|
-
if (VALID_MIN_VALUE > value || VALID_MAX_VALUE < value) return;
|
91
|
+
if (TYPE(value) != T_FIXNUM) return self;
|
92
|
+
if (VALID_MIN_VALUE > value || VALID_MAX_VALUE < value) return self;
|
92
93
|
|
93
94
|
Data_Get_Struct(self, struct _root_node, root);
|
94
95
|
delete_num(root, NUM2ULONG(value));
|
File without changes
|
File without changes
|
data/figure_set.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'figure_set/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "figure_set"
|
8
|
+
spec.version = FigureSet::VERSION
|
9
|
+
spec.authors = ["Tsukasa OISHI"]
|
10
|
+
spec.email = ["tsukasa.oishi@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{FigureSet is the library which treats set operation.}
|
13
|
+
spec.description = %q{FigureSet is the library which treats set operation.}
|
14
|
+
spec.homepage = "https://github.com/tsukasaoishi/figure_set"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.require_paths = ["lib", "ext"]
|
23
|
+
spec.extensions = ["ext/figure_set/extconf.rb"]
|
24
|
+
|
25
|
+
spec.required_ruby_version = '>= 2.0'
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", ">= 1.3.0", "< 2.0"
|
28
|
+
spec.add_development_dependency "rake", ">= 0.8.7"
|
29
|
+
spec.add_development_dependency "rake-compiler", '~> 0.9'
|
30
|
+
spec.add_development_dependency "test-unit"
|
31
|
+
spec.add_development_dependency "benchmark-ips"
|
32
|
+
end
|
data/lib/figure_set.rb
CHANGED
metadata
CHANGED
@@ -1,92 +1,144 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: figure_set
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tsukasa OISHI
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.3.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.0'
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.3.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.0'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rake
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 0.8.7
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.8.7
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake-compiler
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.9'
|
20
54
|
type: :development
|
21
55
|
prerelease: false
|
22
56
|
version_requirements: !ruby/object:Gem::Requirement
|
23
57
|
requirements:
|
24
|
-
- -
|
58
|
+
- - "~>"
|
25
59
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
60
|
+
version: '0.9'
|
27
61
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
62
|
+
name: test-unit
|
29
63
|
requirement: !ruby/object:Gem::Requirement
|
30
64
|
requirements:
|
31
|
-
- -
|
65
|
+
- - ">="
|
32
66
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
67
|
+
version: '0'
|
34
68
|
type: :development
|
35
69
|
prerelease: false
|
36
70
|
version_requirements: !ruby/object:Gem::Requirement
|
37
71
|
requirements:
|
38
|
-
- -
|
72
|
+
- - ">="
|
39
73
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
|
74
|
+
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: benchmark-ips
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
description: FigureSet is the library which treats set operation.
|
42
90
|
email:
|
43
91
|
- tsukasa.oishi@gmail.com
|
44
92
|
executables: []
|
45
93
|
extensions:
|
46
|
-
- ext/extconf.rb
|
47
|
-
extra_rdoc_files:
|
48
|
-
- History.txt
|
49
|
-
- Manifest.txt
|
50
|
-
- README.rdoc
|
94
|
+
- ext/figure_set/extconf.rb
|
95
|
+
extra_rdoc_files: []
|
51
96
|
files:
|
97
|
+
- ".gitignore"
|
98
|
+
- ".travis.yml"
|
99
|
+
- CODE_OF_CONDUCT.md
|
100
|
+
- Gemfile
|
52
101
|
- History.txt
|
102
|
+
- LICENSE.txt
|
53
103
|
- Manifest.txt
|
54
104
|
- README.rdoc
|
55
105
|
- Rakefile
|
106
|
+
- benchmark/sample_benchmark.rb
|
107
|
+
- ext/figure_set/and.c
|
108
|
+
- ext/figure_set/array.c
|
109
|
+
- ext/figure_set/extconf.rb
|
110
|
+
- ext/figure_set/figure_set.h
|
111
|
+
- ext/figure_set/index.c
|
112
|
+
- ext/figure_set/init.c
|
113
|
+
- ext/figure_set/methods.c
|
114
|
+
- ext/figure_set/or.c
|
115
|
+
- ext/figure_set/sample.c
|
116
|
+
- figure_set.gemspec
|
56
117
|
- lib/figure_set.rb
|
57
|
-
-
|
58
|
-
|
59
|
-
|
60
|
-
-
|
61
|
-
- ext/index.c
|
62
|
-
- ext/and.c
|
63
|
-
- ext/or.c
|
64
|
-
- ext/array.c
|
65
|
-
- ext/sample.c
|
66
|
-
homepage: http://www.kaeruspoon.net/
|
67
|
-
licenses: []
|
118
|
+
- lib/figure_set/version.rb
|
119
|
+
homepage: https://github.com/tsukasaoishi/figure_set
|
120
|
+
licenses:
|
121
|
+
- MIT
|
68
122
|
metadata: {}
|
69
123
|
post_install_message:
|
70
|
-
rdoc_options:
|
71
|
-
- --main
|
72
|
-
- README.rdoc
|
124
|
+
rdoc_options: []
|
73
125
|
require_paths:
|
74
126
|
- lib
|
75
127
|
- ext
|
76
128
|
required_ruby_version: !ruby/object:Gem::Requirement
|
77
129
|
requirements:
|
78
|
-
- -
|
130
|
+
- - ">="
|
79
131
|
- !ruby/object:Gem::Version
|
80
|
-
version: '0'
|
132
|
+
version: '2.0'
|
81
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
134
|
requirements:
|
83
|
-
- -
|
135
|
+
- - ">="
|
84
136
|
- !ruby/object:Gem::Version
|
85
137
|
version: '0'
|
86
138
|
requirements: []
|
87
|
-
rubyforge_project:
|
88
|
-
rubygems_version: 2.
|
139
|
+
rubyforge_project:
|
140
|
+
rubygems_version: 2.5.1
|
89
141
|
signing_key:
|
90
|
-
specification_version:
|
91
|
-
summary: FigureSet.
|
142
|
+
specification_version: 4
|
143
|
+
summary: FigureSet is the library which treats set operation.
|
92
144
|
test_files: []
|