combinatorics 0.3.0 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +1 -1
- data/.gemtest +0 -0
- data/.github/workflows/ruby.yml +28 -0
- data/.gitignore +4 -5
- data/Benchmarks.md +281 -0
- data/ChangeLog.md +42 -0
- data/Gemfile +14 -0
- data/LICENSE.txt +1 -2
- data/README.md +178 -69
- data/Rakefile +7 -27
- data/benchmarks/cartesian_product.rb +18 -0
- data/benchmarks/choose.rb +19 -0
- data/benchmarks/derange.rb +18 -0
- data/benchmarks/list_comprehension.rb +20 -4
- data/benchmarks/permute.rb +18 -0
- data/benchmarks/power_set.rb +18 -0
- data/combinatorics.gemspec +54 -83
- data/gemspec.yml +25 -0
- data/lib/combinatorics/cartesian_product/cardinality.rb +45 -0
- data/lib/combinatorics/cartesian_product/extensions/array.rb +7 -0
- data/lib/combinatorics/cartesian_product/extensions/set.rb +9 -0
- data/lib/combinatorics/cartesian_product/extensions.rb +2 -0
- data/lib/combinatorics/cartesian_product/mixin.rb +57 -0
- data/lib/combinatorics/cartesian_product.rb +3 -0
- data/lib/combinatorics/choose/cardinality.rb +99 -0
- data/lib/combinatorics/choose/extensions/array.rb +5 -0
- data/lib/combinatorics/choose/extensions/set.rb +6 -0
- data/lib/combinatorics/choose/extensions.rb +2 -0
- data/lib/combinatorics/choose/mixin.rb +53 -0
- data/lib/combinatorics/choose.rb +3 -0
- data/lib/combinatorics/derange/cardinality.rb +23 -0
- data/lib/combinatorics/derange/extensions/array.rb +5 -0
- data/lib/combinatorics/derange/extensions.rb +1 -0
- data/lib/combinatorics/derange/mixin.rb +47 -0
- data/lib/combinatorics/derange.rb +3 -0
- data/lib/combinatorics/enumerator.rb +2 -0
- data/lib/combinatorics/extensions/math.rb +176 -0
- data/lib/combinatorics/extensions/range.rb +2 -2
- data/lib/combinatorics/generator.rb +7 -4
- data/lib/combinatorics/list_comprehension.rb +6 -1
- data/lib/combinatorics/permute/cardinality.rb +98 -0
- data/lib/combinatorics/permute/extensions/array.rb +7 -0
- data/lib/combinatorics/permute/extensions/set.rb +9 -0
- data/lib/combinatorics/permute/extensions.rb +2 -0
- data/lib/combinatorics/permute/mixin.rb +48 -0
- data/lib/combinatorics/permute.rb +3 -0
- data/lib/combinatorics/power_set/cardinality.rb +36 -0
- data/lib/combinatorics/power_set/mixin.rb +19 -22
- data/lib/combinatorics/power_set.rb +1 -0
- data/lib/combinatorics/version.rb +4 -0
- data/lib/combinatorics.rb +8 -0
- data/spec/cartesian_product/array_spec.rb +10 -0
- data/spec/cartesian_product/cardinality_spec.rb +64 -0
- data/spec/cartesian_product/mixin_examples.rb +98 -0
- data/spec/cartesian_product/set_spec.rb +10 -0
- data/spec/choose/array_spec.rb +9 -0
- data/spec/choose/cardinality_spec.rb +132 -0
- data/spec/choose/mixin_examples.rb +48 -0
- data/spec/choose/set_spec.rb +9 -0
- data/spec/combinatorics_spec.rb +5 -1
- data/spec/derange/array_spec.rb +10 -0
- data/spec/derange/cardinality_spec.rb +14 -0
- data/spec/derange/mixin_examples.rb +52 -0
- data/spec/enumerator_spec.rb +1 -1
- data/spec/extensions/math_spec.rb +100 -0
- data/spec/extensions/range_spec.rb +13 -13
- data/spec/generator_spec.rb +1 -1
- data/spec/list_comprehension_spec.rb +11 -11
- data/spec/permute/array_spec.rb +10 -0
- data/spec/permute/cardinality_spec.rb +146 -0
- data/spec/permute/mixin_examples.rb +42 -0
- data/spec/permute/set_spec.rb +10 -0
- data/spec/power_set/array_spec.rb +3 -2
- data/spec/power_set/cardinality_spec.rb +32 -0
- data/spec/power_set/mixin_examples.rb +17 -8
- data/spec/power_set/set_spec.rb +3 -2
- data/spec/spec_helper.rb +3 -3
- metadata +106 -104
- data/VERSION +0 -1
@@ -0,0 +1,146 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'combinatorics/permute'
|
3
|
+
|
4
|
+
describe Permute do
|
5
|
+
subject { Permute }
|
6
|
+
|
7
|
+
describe "cardinality" do
|
8
|
+
it "should raise RangeError if n is negative without passing r" do
|
9
|
+
expect { subject.cardinality(-1) }.to raise_error(RangeError)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should raise RangeError if n is negative when r is provided" do
|
13
|
+
expect { subject.cardinality(-1, 1) }.to raise_error(RangeError)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should raise RangeError if r is negative" do
|
17
|
+
expect { subject.cardinality(1, -1) }.to raise_error(RangeError)
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should raise RangeError if r is greater than n" do
|
21
|
+
expect { subject.cardinality(2, 3) }.to raise_error(RangeError)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should return 1 for subject.cardinality(0)" do
|
25
|
+
expect(subject.cardinality(0)).to eq(1)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should return 1 for subject.cardinality(1)" do
|
29
|
+
expect(subject.cardinality(1)).to eq(1)
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should return 2 for subject.cardinality(2)" do
|
33
|
+
expect(subject.cardinality(2)).to eq(2)
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should return 6 for subject.cardinality(3)" do
|
37
|
+
expect(subject.cardinality(3)).to eq(6)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should return 24 for subject.cardinality(4)" do
|
41
|
+
expect(subject.cardinality(4)).to eq(24)
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should return 0 for subject.cardinality(1, 0)" do
|
45
|
+
expect(subject.cardinality(1, 0)).to eq(0)
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should return 1 for subject.cardinality(1, 1)" do
|
49
|
+
expect(subject.cardinality(1, 1)).to eq(1)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should return 2 for subject.cardinality(2, 1)" do
|
53
|
+
expect(subject.cardinality(2, 1)).to eq(2)
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should return 1 for subject.cardinality(2, 2)" do
|
57
|
+
expect(subject.cardinality(2, 2)).to eq(2)
|
58
|
+
end
|
59
|
+
|
60
|
+
it "should return 3 for subject.cardinality(3, 1)" do
|
61
|
+
expect(subject.cardinality(3, 1)).to eq(3)
|
62
|
+
end
|
63
|
+
|
64
|
+
it "should return 3 for subject.cardinality(3, 2)" do
|
65
|
+
expect(subject.cardinality(3, 2)).to eq(6)
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should return 1 for subject.cardinality(3, 3)" do
|
69
|
+
expect(subject.cardinality(3, 3)).to eq(6)
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should return 4 for subject.cardinality(4, 1)" do
|
73
|
+
expect(subject.cardinality(4, 1)).to eq(4)
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should return 12 for subject.cardinality(4, 2)" do
|
77
|
+
expect(subject.cardinality(4, 2)).to eq(12)
|
78
|
+
end
|
79
|
+
|
80
|
+
it "should return 24 for subject.cardinality(4, 3)" do
|
81
|
+
expect(subject.cardinality(4, 3)).to eq(24)
|
82
|
+
end
|
83
|
+
|
84
|
+
it "should return 1 for subject.cardinality(4, 4)" do
|
85
|
+
expect(subject.cardinality(4, 4)).to eq(24)
|
86
|
+
end
|
87
|
+
|
88
|
+
it "should return 360 for subject.cardinality(6, 4)" do
|
89
|
+
expect(subject.cardinality(6, 4)).to eq(360)
|
90
|
+
end
|
91
|
+
|
92
|
+
it "should return 3628800 for subject.cardinality(10)" do
|
93
|
+
expect(subject.cardinality(10)).to eq(3628800)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
describe "cardinality_all" do
|
98
|
+
it "should return [] for cardinality_all(0)" do
|
99
|
+
expect(subject.cardinality_all(0)).to be_empty
|
100
|
+
end
|
101
|
+
|
102
|
+
it "should return [1] for cardinality_all(1)" do
|
103
|
+
expect(subject.cardinality_all(1)).to eq([1])
|
104
|
+
end
|
105
|
+
|
106
|
+
it "should return [2, 1] for cardinality_all(2)" do
|
107
|
+
expect(subject.cardinality_all(2)).to eq([2, 2])
|
108
|
+
end
|
109
|
+
|
110
|
+
it "should return [3, 6, 1] for cardinality_all(3)" do
|
111
|
+
expect(subject.cardinality_all(3)).to eq([3, 6, 6])
|
112
|
+
end
|
113
|
+
|
114
|
+
it "should return [4, 12, 24, 1] for cardinality_all(4)" do
|
115
|
+
expect(subject.cardinality_all(4)).to eq([4, 12, 24, 24])
|
116
|
+
end
|
117
|
+
|
118
|
+
it "should raise RangeError for cardinality_all(-1)" do
|
119
|
+
expect { subject.cardinality_all(-1) }.to raise_error(RangeError)
|
120
|
+
end
|
121
|
+
|
122
|
+
it "should wrap cardinality with Permute.N" do
|
123
|
+
should respond_to(:N)
|
124
|
+
end
|
125
|
+
|
126
|
+
it "should wrap cardinalith with Permute.R" do
|
127
|
+
should respond_to(:R)
|
128
|
+
end
|
129
|
+
|
130
|
+
it "should wrap cardinality with Permute.NR" do
|
131
|
+
should respond_to(:NR)
|
132
|
+
end
|
133
|
+
|
134
|
+
it "should alias cardinality_all to N_all" do
|
135
|
+
should respond_to(:N_all)
|
136
|
+
end
|
137
|
+
|
138
|
+
it "should alias cardinality_all to NR_all" do
|
139
|
+
should respond_to(:NR_all)
|
140
|
+
end
|
141
|
+
|
142
|
+
it "should alias cardinality_all to R_all" do
|
143
|
+
should respond_to(:R_all)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'combinatorics/permute'
|
4
|
+
|
5
|
+
shared_examples_for "Permute::Mixin" do
|
6
|
+
describe "#permute" do
|
7
|
+
it "should return [[]] for [].permute(0).to_a" do
|
8
|
+
set = subject[]
|
9
|
+
results = set.permute(0).to_a
|
10
|
+
|
11
|
+
expect(results).to eq([[]])
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should return [[]] for [1].permute(0).to_a" do
|
15
|
+
set = subject[1]
|
16
|
+
results = set.permute(0).to_a
|
17
|
+
|
18
|
+
expect(results).to eq([[]])
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should return [[1]] for [1].permute(1).to_a" do
|
22
|
+
set = subject[1]
|
23
|
+
results = set.permute(1).to_a
|
24
|
+
|
25
|
+
expect(results).to eq([[1]])
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should return [[1], [2]] for [1, 2].permute(1).to_a" do
|
29
|
+
set = subject[1, 2]
|
30
|
+
results = set.permute(1).to_a
|
31
|
+
|
32
|
+
expect(results).to match_array([[1], [2]])
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should return [[1, 2]] for [1, 2].permute(2).to_a" do
|
36
|
+
set = subject[1, 2]
|
37
|
+
results = set.permute(2).to_a
|
38
|
+
|
39
|
+
expect(results).to match_array([[1, 2], [2, 1]])
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'combinatorics/power_set/extensions/array'
|
3
2
|
require 'power_set/mixin_examples'
|
4
3
|
|
4
|
+
require 'combinatorics/power_set/extensions/array'
|
5
|
+
|
5
6
|
describe Array do
|
6
7
|
subject { Array }
|
7
8
|
|
8
|
-
it_should_behave_like "
|
9
|
+
it_should_behave_like "PowerSet::Mixin"
|
9
10
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'combinatorics/power_set'
|
3
|
+
|
4
|
+
describe PowerSet do
|
5
|
+
subject { PowerSet }
|
6
|
+
|
7
|
+
describe "cardinality" do
|
8
|
+
it "should return 1 for cardinality(0)" do
|
9
|
+
subject.cardinality(0) == 1
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should return 1 for cardinality(1)" do
|
13
|
+
subject.cardinality(1) == 1
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should return 2 for cardinality(2)" do
|
17
|
+
subject.cardinality(2) == 2
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should return 6 for cardinality(3)" do
|
21
|
+
subject.cardinality(3) == 6
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should return 24 for cardinality(4)" do
|
25
|
+
subject.cardinality(4) == 24
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should wrap cardinality with PowerSet.P" do
|
30
|
+
should respond_to(:P)
|
31
|
+
end
|
32
|
+
end
|
@@ -1,25 +1,34 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'combinatorics/power_set'
|
4
|
+
|
5
|
+
shared_examples_for "PowerSet::Mixin" do
|
6
|
+
let(:empty_set) { Set[] }
|
7
|
+
|
2
8
|
it "the powerset of an empty Set should only contain the empty Set" do
|
3
9
|
set = subject[]
|
4
10
|
|
5
|
-
set.powerset.
|
11
|
+
expect(set.powerset.to_a).to eq([empty_set])
|
6
12
|
end
|
7
13
|
|
8
14
|
it "the powerset of a single Set should contain that Set" do
|
9
15
|
set = subject[1]
|
10
16
|
|
11
|
-
set.powerset.
|
17
|
+
expect(set.powerset.to_a).to eq([empty_set, Set[*set]])
|
12
18
|
end
|
13
19
|
|
14
20
|
it "the powerset of a Set should all be subsets" do
|
15
|
-
set = subject[1,2,3]
|
21
|
+
set = subject[1, 2, 3]
|
22
|
+
superset = Set[]
|
16
23
|
|
17
|
-
set.powerset
|
24
|
+
set.powerset { |subset| superset += subset }
|
25
|
+
|
26
|
+
expect(superset).to eq(Set[*set])
|
18
27
|
end
|
19
28
|
|
20
|
-
it "should alias
|
21
|
-
set = subject[1
|
29
|
+
it "should alias powerset to power_set" do
|
30
|
+
set = subject[1]
|
22
31
|
|
23
|
-
set.
|
32
|
+
expect(set).to respond_to(:power_set)
|
24
33
|
end
|
25
34
|
end
|
data/spec/power_set/set_spec.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'combinatorics/power_set/extensions/set'
|
3
2
|
require 'power_set/mixin_examples'
|
4
3
|
|
4
|
+
require 'combinatorics/power_set/extensions/set'
|
5
|
+
|
5
6
|
describe Set do
|
6
7
|
subject { Set }
|
7
8
|
|
8
|
-
it_should_behave_like "
|
9
|
+
it_should_behave_like "PowerSet::Mixin"
|
9
10
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,149 +1,151 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: combinatorics
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 3
|
8
|
-
- 0
|
9
|
-
version: 0.3.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.4
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Postmodern
|
13
|
-
|
8
|
+
- Duper
|
9
|
+
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
requirements:
|
26
|
-
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 2
|
30
|
-
- 0
|
31
|
-
- 0
|
32
|
-
version: 2.0.0
|
33
|
-
type: :development
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: yard
|
37
|
-
prerelease: false
|
38
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
|
-
requirements:
|
41
|
-
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
- 6
|
46
|
-
- 0
|
47
|
-
version: 0.6.0
|
12
|
+
date: 2022-01-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '2.0'
|
48
21
|
type: :development
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: jeweler
|
52
22
|
prerelease: false
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
segments:
|
59
|
-
- 1
|
60
|
-
- 4
|
61
|
-
- 0
|
62
|
-
version: 1.4.0
|
63
|
-
type: :development
|
64
|
-
version_requirements: *id003
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '2.0'
|
65
28
|
description: A collection of modules and methods for performing Combinatoric calculations.
|
66
|
-
email:
|
29
|
+
email:
|
30
|
+
- postmodern.mod3@gmail.com
|
31
|
+
- super@manson.vistech.net
|
67
32
|
executables: []
|
68
|
-
|
69
33
|
extensions: []
|
70
|
-
|
71
|
-
|
34
|
+
extra_rdoc_files:
|
35
|
+
- Benchmarks.md
|
72
36
|
- ChangeLog.md
|
73
37
|
- LICENSE.txt
|
74
38
|
- README.md
|
75
|
-
files:
|
76
|
-
- .document
|
77
|
-
- .
|
78
|
-
- .
|
79
|
-
- .
|
39
|
+
files:
|
40
|
+
- ".document"
|
41
|
+
- ".gemtest"
|
42
|
+
- ".github/workflows/ruby.yml"
|
43
|
+
- ".gitignore"
|
44
|
+
- ".rspec"
|
45
|
+
- ".yardopts"
|
46
|
+
- Benchmarks.md
|
80
47
|
- ChangeLog.md
|
48
|
+
- Gemfile
|
81
49
|
- LICENSE.txt
|
82
50
|
- README.md
|
83
51
|
- Rakefile
|
84
|
-
-
|
52
|
+
- benchmarks/cartesian_product.rb
|
53
|
+
- benchmarks/choose.rb
|
54
|
+
- benchmarks/derange.rb
|
85
55
|
- benchmarks/list_comprehension.rb
|
56
|
+
- benchmarks/permute.rb
|
57
|
+
- benchmarks/power_set.rb
|
86
58
|
- combinatorics.gemspec
|
59
|
+
- gemspec.yml
|
87
60
|
- lib/combinatorics.rb
|
61
|
+
- lib/combinatorics/cartesian_product.rb
|
62
|
+
- lib/combinatorics/cartesian_product/cardinality.rb
|
63
|
+
- lib/combinatorics/cartesian_product/extensions.rb
|
64
|
+
- lib/combinatorics/cartesian_product/extensions/array.rb
|
65
|
+
- lib/combinatorics/cartesian_product/extensions/set.rb
|
66
|
+
- lib/combinatorics/cartesian_product/mixin.rb
|
67
|
+
- lib/combinatorics/choose.rb
|
68
|
+
- lib/combinatorics/choose/cardinality.rb
|
69
|
+
- lib/combinatorics/choose/extensions.rb
|
70
|
+
- lib/combinatorics/choose/extensions/array.rb
|
71
|
+
- lib/combinatorics/choose/extensions/set.rb
|
72
|
+
- lib/combinatorics/choose/mixin.rb
|
73
|
+
- lib/combinatorics/derange.rb
|
74
|
+
- lib/combinatorics/derange/cardinality.rb
|
75
|
+
- lib/combinatorics/derange/extensions.rb
|
76
|
+
- lib/combinatorics/derange/extensions/array.rb
|
77
|
+
- lib/combinatorics/derange/mixin.rb
|
88
78
|
- lib/combinatorics/enumerator.rb
|
89
79
|
- lib/combinatorics/extensions.rb
|
80
|
+
- lib/combinatorics/extensions/math.rb
|
90
81
|
- lib/combinatorics/extensions/range.rb
|
91
82
|
- lib/combinatorics/generator.rb
|
92
83
|
- lib/combinatorics/list_comprehension.rb
|
84
|
+
- lib/combinatorics/permute.rb
|
85
|
+
- lib/combinatorics/permute/cardinality.rb
|
86
|
+
- lib/combinatorics/permute/extensions.rb
|
87
|
+
- lib/combinatorics/permute/extensions/array.rb
|
88
|
+
- lib/combinatorics/permute/extensions/set.rb
|
89
|
+
- lib/combinatorics/permute/mixin.rb
|
93
90
|
- lib/combinatorics/power_set.rb
|
91
|
+
- lib/combinatorics/power_set/cardinality.rb
|
94
92
|
- lib/combinatorics/power_set/extensions.rb
|
95
93
|
- lib/combinatorics/power_set/extensions/array.rb
|
96
94
|
- lib/combinatorics/power_set/extensions/set.rb
|
97
95
|
- lib/combinatorics/power_set/mixin.rb
|
96
|
+
- lib/combinatorics/version.rb
|
98
97
|
- spec/.rspec
|
98
|
+
- spec/cartesian_product/array_spec.rb
|
99
|
+
- spec/cartesian_product/cardinality_spec.rb
|
100
|
+
- spec/cartesian_product/mixin_examples.rb
|
101
|
+
- spec/cartesian_product/set_spec.rb
|
102
|
+
- spec/choose/array_spec.rb
|
103
|
+
- spec/choose/cardinality_spec.rb
|
104
|
+
- spec/choose/mixin_examples.rb
|
105
|
+
- spec/choose/set_spec.rb
|
99
106
|
- spec/combinatorics_spec.rb
|
107
|
+
- spec/derange/array_spec.rb
|
108
|
+
- spec/derange/cardinality_spec.rb
|
109
|
+
- spec/derange/mixin_examples.rb
|
100
110
|
- spec/enumerator_spec.rb
|
111
|
+
- spec/extensions/math_spec.rb
|
101
112
|
- spec/extensions/range_spec.rb
|
102
113
|
- spec/generator_spec.rb
|
103
114
|
- spec/list_comprehension_spec.rb
|
115
|
+
- spec/permute/array_spec.rb
|
116
|
+
- spec/permute/cardinality_spec.rb
|
117
|
+
- spec/permute/mixin_examples.rb
|
118
|
+
- spec/permute/set_spec.rb
|
104
119
|
- spec/power_set/array_spec.rb
|
120
|
+
- spec/power_set/cardinality_spec.rb
|
105
121
|
- spec/power_set/mixin_examples.rb
|
106
122
|
- spec/power_set/set_spec.rb
|
107
123
|
- spec/spec_helper.rb
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
124
|
+
homepage: https://github.com/postmodern/combinatorics#readme
|
125
|
+
licenses:
|
126
|
+
- MIT
|
127
|
+
metadata:
|
128
|
+
documentation_uri: https://rubydoc.info/gems/combinatorics
|
129
|
+
source_code_uri: https://github.com/postmodern/combinatorics.rb
|
130
|
+
bug_tracker_uri: https://github.com/postmodern/combinatorics.rb/issues
|
131
|
+
changelog_uri: https://github.com/postmodern/combinatorics.rb/blob/master/ChangeLog.md
|
132
|
+
post_install_message:
|
133
|
+
rdoc_options: []
|
134
|
+
require_paths:
|
116
135
|
- lib
|
117
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
-
|
119
|
-
requirements:
|
136
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
120
138
|
- - ">="
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
-
none: false
|
127
|
-
requirements:
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: 1.8.7
|
141
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
128
143
|
- - ">="
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
|
131
|
-
- 0
|
132
|
-
version: "0"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
133
146
|
requirements: []
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
signing_key:
|
138
|
-
specification_version: 3
|
147
|
+
rubygems_version: 3.2.22
|
148
|
+
signing_key:
|
149
|
+
specification_version: 4
|
139
150
|
summary: Bringing (more) Combinatorics to Ruby
|
140
|
-
test_files:
|
141
|
-
- spec/enumerator_spec.rb
|
142
|
-
- spec/combinatorics_spec.rb
|
143
|
-
- spec/list_comprehension_spec.rb
|
144
|
-
- spec/generator_spec.rb
|
145
|
-
- spec/extensions/range_spec.rb
|
146
|
-
- spec/spec_helper.rb
|
147
|
-
- spec/power_set/set_spec.rb
|
148
|
-
- spec/power_set/array_spec.rb
|
149
|
-
- spec/power_set/mixin_examples.rb
|
151
|
+
test_files: []
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.3.0
|