Skip to content

Commit c0b96bc

Browse files
committed
Fix up list of exports
1 parent 2e56149 commit c0b96bc

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

src/Combinatorics.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module Combinatorics
22

33
using Compat, Polynomials, Iterators
44

5+
import Base: start, next, done, length, eltype
6+
57
include("numbers.jl")
68
include("factorials.jl")
79
include("combinations.jl")

src/combinations.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
export combinations
22

3-
43
#The Combinations iterator
5-
import Base: start, next, done, length
64

75
immutable Combinations{T}
86
a::T

src/permutations.jl

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
1+
#Permutations
2+
3+
export
4+
invperm,
5+
ipermute!,
6+
isperm,
7+
levicivita,
8+
nthperm!,
9+
nthperm,
10+
parity,
11+
permutations,
12+
permute!!,
13+
permute!
14+
15+
#The basic permutaitons iterator
16+
117
immutable Permutations{T}
218
a::T
319
end
420

21+
permutations(a) = Permutations(a)
22+
523
eltype{T}(::Type{Permutations{T}}) = Vector{eltype(T)}
624

725
length(p::Permutations) = factorial(length(p.a))
826

9-
permutations(a) = Permutations(a)
10-
1127
start(p::Permutations) = [1:length(p.a);]
1228
function next(p::Permutations, s)
1329
perm = [p.a[si] for si in s]

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ using Combinatorics
22
using Base.Test
33

44
include("basic.jl")
5+
include("frombase.jl")
56
include("youngdiagrams.jl")
67

0 commit comments

Comments
 (0)