Skip to content

Commit c5d7bc9

Browse files
cortnerstevengj
authored andcommitted
Replace some Vector with AbstractVector (#10)
1 parent ea7f2b2 commit c5d7bc9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Sobol.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,18 @@ SobolSeq(N::Integer, lb, ub) =
123123

124124
ndims(s::ScaledSobolSeq) = ndims(s.s)
125125

126-
function next!(s::SobolSeq, x::Vector{Float64},
127-
lb::Vector, ub::Vector)
126+
function next!(s::SobolSeq, x::AbstractVector{Float64},
127+
lb::AbstractVector, ub::AbstractVector)
128128
length(x) < ndims(s) && throw(BoundsError())
129129
next!(s,x)
130130
for i=1:ndims(s)
131131
x[i] = lb[i] + (ub[i]-lb[i]) * x[i]
132132
end
133133
return x
134134
end
135-
next{N}(s::SobolSeq{N}, lb::Vector, ub::Vector) = next!(s, Array{Float64,1}(N), lb, ub)
135+
next{N}(s::SobolSeq{N}, lb::AbstractVector, ub::AbstractVector) = next!(s, Array{Float64,1}(N), lb, ub)
136136

137-
next!(s::ScaledSobolSeq, x::Vector{Float64}) = next!(s.s, x, s.lb, s.ub)
137+
next!(s::ScaledSobolSeq, x::AbstractVector{Float64}) = next!(s.s, x, s.lb, s.ub)
138138
next(s::ScaledSobolSeq) = next!(s, Array{Float64,1}(ndims(s)))
139139

140140
start(s::ScaledSobolSeq) = s

0 commit comments

Comments
 (0)