File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 103103# Technically, the Sobol sequence ends after 2^32-1 points, but it
104104# falls back on pseudorandom numbers after this. In practice, one is
105105# unlikely to reach that point.
106- Base. start (s:: AbstractSobolSeq ) = nothing
107- Base. next (s:: AbstractSobolSeq , state) = (next! (s), state)
108- Base. done (s:: AbstractSobolSeq , state) = false
106+ @static if isdefined (Base, :iterate )
107+ Base. iterate (s:: AbstractSobolSeq , state= nothing ) = (next! (s), state)
108+ else
109+ Base. start (s:: AbstractSobolSeq ) = nothing
110+ Base. next (s:: AbstractSobolSeq , state) = (next! (s), state)
111+ Base. done (s:: AbstractSobolSeq , state) = false
112+ end
109113Base. eltype (:: Type{<:AbstractSobolSeq} ) = Vector{Float64}
110114Compat. IteratorSize (:: Type{<:AbstractSobolSeq} ) = Base. IsInfinite ()
111115Compat. IteratorEltype (:: Type{<:AbstractSobolSeq} ) = Base. HasEltype ()
You can’t perform that action at this time.
0 commit comments