You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .travis.yml
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,14 @@ language: julia
2
2
os:
3
3
- linux
4
4
julia:
5
-
- 0.5
6
5
- 0.6
7
6
- nightly
8
7
sudo: false
9
8
notifications:
10
9
email: false
11
-
script:
12
-
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
13
-
- julia -e 'Pkg.clone(pwd())'
14
-
- julia -e 'Pkg.test("Combinatorics", coverage=true)'
10
+
#script:
11
+
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
12
+
# - julia -e 'Pkg.clone(pwd())'
13
+
# - julia -e 'Pkg.test("Combinatorics", coverage=true)'
15
14
after_success:
16
15
- julia -e 'Pkg.add("Coverage"); cd(Pkg.dir("Combinatorics")); using Coverage; Coveralls.submit(Coveralls.process_folder()); Codecov.submit(process_folder())'
"Generate all combinations of `n` elements from an indexable object. Because the number of combinations can be very large, this function returns an iterator object. Use `collect(combinations(array,n))` to get an array of all combinations.
40
-
"
42
+
Generate all combinations of `n` elements from an indexable object `a`. Because the number
43
+
of combinations can be very large, this function returns an iterator object.
44
+
Use `collect(combinations(a, n))` to get an array of all combinations.
45
+
"""
41
46
functioncombinations(a, t::Integer)
42
47
if t <0
43
48
# generate 0 combinations for negative argument
44
-
t =length(a)+1
49
+
t =length(a)+1
45
50
end
46
51
Combinations(a, t)
47
52
end
48
53
49
54
50
55
"""
51
-
generate combinations of all orders, chaining of order iterators is eager,
52
-
but sequence at each order is lazy
56
+
combinations(a)
57
+
58
+
Generate combinations of the elements of `a` of all orders. Chaining of order iterators
59
+
is eager, but the sequence at each order is lazy.
53
60
"""
54
-
combinations(a) =chain([combinations(a,k) for k=1:length(a)]...)
61
+
combinations(a) =IterTools.chain([combinations(a,k) for k=1:length(a)]...)
55
62
56
63
57
64
58
65
# cool-lex combinations iterator
59
66
60
67
"""
61
-
Produces (n,k)-combinations in cool-lex order
62
-
63
-
Implements the cool-lex algorithm to generate (n,k)-combinations
64
-
@article{Ruskey:2009fk,
65
-
Author = {Frank Ruskey and Aaron Williams},
66
-
Doi = {10.1016/j.disc.2007.11.048},
67
-
Journal = {Discrete Mathematics},
68
-
Month = {September},
69
-
Number = {17},
70
-
Pages = {5305-5320},
71
-
Title = {The coolest way to generate combinations},
0 commit comments