Skip to content

Commit 4827211

Browse files
committed
add deprecation
1 parent 2a2602c commit 4827211

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ s = SobolSeq(N)
6464
```
6565
Then
6666
```
67-
x = next(s)
67+
x = next!(s)
6868
```
6969
returns the next point (a `Vector{Float64}`) in the sequence; each point
7070
lies in the hypercube [0,1]<sup>N</sup>. You can also compute the next
@@ -111,7 +111,7 @@ the [0,1]×[0,1] unit square!
111111
using Sobol
112112
using PyPlot
113113
s = SobolSeq(2)
114-
p = hcat([next(s) for i = 1:1024]...)'
114+
p = hcat([next!(s) for i = 1:1024]...)'
115115
subplot(111, aspect="equal")
116116
plot(p[:,1], p[:,2], "r.")
117117
```

src/Sobol.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ function next!(s::SobolSeq, x::AbstractVector{<:AbstractFloat})
7878
end
7979
next!(s::SobolSeq) = next!(s, Array{Float64,1}(undef, ndims(s)))
8080

81+
import Base: next
82+
@deprecate next(s::AbstractSobolSeq) next!(s)
83+
8184
# if we know in advance how many points (n) we want to compute, then
8285
# adopt the suggestion of the Joe and Kuo paper, which in turn
8386
# is taken from Acworth et al (1998), of skipping a number of

0 commit comments

Comments
 (0)