-
Notifications
You must be signed in to change notification settings - Fork 9
/
Shared.jl
49 lines (40 loc) · 961 Bytes
/
Shared.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""
Information shared by all processes involved in
a round of distributed parallel tempering.
This is updated between rounds but only read during
a round.
Fields:
$FIELDS
Only one instance maintained per process.
"""
@auto struct Shared
"""
See [`Iterators`](@ref).
"""
iterators::Iterators
"""
See [`tempering`](@ref).
"""
tempering
"""
See [`explorer`](@ref).
"""
explorer
"""
Named tuple of DataFrame's
"""
reports
end
Base.show(io::IO, s::Shared) =
print(io, "Shared($(s.iterators), $(s.tempering), $(s.explorer), ...)")
"""
$SIGNATURES
Create a [`Shared`](@ref) struct based on an [`Inputs`](@ref).
Uses [`create_tempering()`](@ref) and [`create_explorer()`](@ref).
"""
function Shared(inputs)
iterators = Iterators()
tempering = create_tempering(inputs)
explorer = create_explorer(inputs)
return Shared(iterators, tempering, explorer, init_dfs())
end