Skip to content

Commit a951c20

Browse files
authored
Fix example in ReadMe
1 parent 3513bd2 commit a951c20

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ A `Trajectory` contains 3 parts:
4343
Typical usage:
4444

4545
```julia
46-
julia> t = Trajectory(Traces(a=Int[], b=Bool[]), BatchSampler(3), InsertSampleRatioControler(1.0, 3));
46+
julia> t = Trajectory(
47+
container = Traces(a=Int[], b=Bool[]),
48+
sampler = BatchSampler(3),
49+
controller = InsertSampleRatioController(1.0, 3, 0, 0)
50+
);
51+
52+
julia> push!(t, (a=1,));
4753

4854
julia> for i in 1:5
4955
push!(t, (a=i, b=iseven(i)))
@@ -52,9 +58,10 @@ julia> for i in 1:5
5258
julia> for batch in t
5359
println(batch)
5460
end
55-
(a = [4, 5, 1], b = Bool[1, 0, 0])
56-
(a = [3, 2, 4], b = Bool[0, 1, 1])
57-
(a = [4, 1, 2], b = Bool[1, 0, 1])
61+
(a = [1, 3, 1], b = Bool[1, 1, 1])
62+
(a = [4, 1, 4], b = Bool[0, 0, 0])
63+
(a = [1, 4, 1], b = Bool[1, 0, 0])
64+
(a = [1, 1, 4], b = Bool[1, 0, 0])
5865
```
5966

6067
**Traces**

0 commit comments

Comments
 (0)