Skip to content

Commit 4a96244

Browse files
committed
ParTable: graph-based ctor supports params= kw
1 parent ddaac7c commit 4a96244

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

src/frontend/specification/StenoGraphs.jl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ label(args...) = Label(args)
3232

3333
function ParameterTable(
3434
graph::AbstractStenoGraph;
35-
observed_vars,
36-
latent_vars,
35+
observed_vars::AbstractVector{Symbol},
36+
latent_vars::AbstractVector{Symbol},
37+
params::Union{AbstractVector{Symbol}, Nothing} = nothing,
3738
group::Integer = 1,
3839
param_prefix = ,
3940
)
@@ -103,7 +104,7 @@ function ParameterTable(
103104
end
104105
end
105106

106-
return ParameterTable(columns; latent_vars, observed_vars)
107+
return ParameterTable(columns; latent_vars, observed_vars, params)
107108
end
108109

109110
############################################################################################
@@ -112,20 +113,23 @@ end
112113

113114
function EnsembleParameterTable(
114115
graph::AbstractStenoGraph;
115-
observed_vars,
116-
latent_vars,
116+
observed_vars::AbstractVector{Symbol},
117+
latent_vars::AbstractVector{Symbol},
118+
params::Union{AbstractVector{Symbol}, Nothing} = nothing,
117119
groups,
118120
)
119121
graph = unique(graph)
120122

121123
partables = Dict(
122124
group => ParameterTable(
123125
graph;
124-
observed_vars = observed_vars,
125-
latent_vars = latent_vars,
126+
observed_vars,
127+
latent_vars,
128+
params,
126129
group = i,
127130
param_prefix = Symbol(:g, group),
128131
) for (i, group) in enumerate(groups)
129132
)
130-
return EnsembleParameterTable(partables)
133+
134+
return EnsembleParameterTable(partables; params)
131135
end

0 commit comments

Comments
 (0)