@@ -2,7 +2,10 @@ VERSION < v"0.7.0-beta2.199" && __precompile__()
22
33module Sobol
44using Compat, Compat. Random
5- export SobolSeq, ScaledSobolSeq, next!
5+ export SobolSeq, ScaledSobolSeq, next!, next
6+ @static if isdefined (Base, :next )
7+ import Base: next
8+ end
69
710include (" soboldata.jl" ) # loads `sobol_a` and `sobol_minit`
811
@@ -78,9 +81,6 @@ function next!(s::SobolSeq, x::AbstractVector{<:AbstractFloat})
7881end
7982next! (s:: SobolSeq ) = next! (s, Array {Float64,1} (undef, ndims (s)))
8083
81- @static if isdefined (Base, :next )
82- import Base: next
83- end
8484@deprecate next (s:: AbstractSobolSeq ) next! (s)
8585
8686# if we know in advance how many points (n) we want to compute, then
140140next! (s:: SobolSeq{N} , lb:: AbstractVector , ub:: AbstractVector ) where {N} = next! (s, Vector {Float64} (undef, N), lb, ub)
141141
142142next! (s:: ScaledSobolSeq , x:: AbstractVector{<:AbstractFloat} ) = next! (s. s, x, s. lb, s. ub)
143- Base . next (s:: ScaledSobolSeq ) = next! (s, Vector {Float64} (undef, ndims (s)))
143+ next (s:: ScaledSobolSeq ) = next! (s, Vector {Float64} (undef, ndims (s)))
144144
145145Base. skip (s:: ScaledSobolSeq , n) = skip (s. s, n)
146146
0 commit comments