@@ -34,8 +34,7 @@ function observed_var_indices(ram::RAMMatrices)
34
34
return obs_inds
35
35
end
36
36
37
- latent_var_indices (ram:: RAMMatrices ) =
38
- [i for i in axes (ram. F, 2 ) if islatent_var (ram, i)]
37
+ latent_var_indices (ram:: RAMMatrices ) = [i for i in axes (ram. F, 2 ) if islatent_var (ram, i)]
39
38
40
39
# observed variables in the order as they appear in ram.F rows
41
40
function observed_vars (ram:: RAMMatrices )
@@ -145,8 +144,10 @@ function RAMMatrices(
145
144
@assert length (partable. sorted_vars) == nvars (partable)
146
145
vars_sorted = copy (partable. sorted_vars)
147
146
else
148
- vars_sorted = [partable. observed_vars
149
- partable. latent_vars]
147
+ vars_sorted = [
148
+ partable. observed_vars
149
+ partable. latent_vars
150
+ ]
150
151
end
151
152
152
153
# indices of the vars (A/S/M rows or columns)
@@ -228,13 +229,20 @@ function RAMMatrices(
228
229
sort! (M_consts, by = first)
229
230
end
230
231
231
- return RAMMatrices (ParamsMatrix {T} (A_inds, A_consts, (n_vars, n_vars)),
232
- ParamsMatrix {T} (S_inds, S_consts, (n_vars, n_vars)),
233
- sparse (1 : n_observed,
234
- [vars_index[var] for var in partable. observed_vars],
235
- ones (T, n_observed), n_observed, n_vars),
236
- ! isnothing (M_inds) ? ParamsVector {T} (M_inds, M_consts, (n_vars,)) : nothing ,
237
- params, vars_sorted)
232
+ return RAMMatrices (
233
+ ParamsMatrix {T} (A_inds, A_consts, (n_vars, n_vars)),
234
+ ParamsMatrix {T} (S_inds, S_consts, (n_vars, n_vars)),
235
+ sparse (
236
+ 1 : n_observed,
237
+ [vars_index[var] for var in partable. observed_vars],
238
+ ones (T, n_observed),
239
+ n_observed,
240
+ n_vars,
241
+ ),
242
+ ! isnothing (M_inds) ? ParamsVector {T} (M_inds, M_consts, (n_vars,)) : nothing ,
243
+ params,
244
+ vars_sorted,
245
+ )
238
246
end
239
247
240
248
Base. convert (
@@ -372,10 +380,7 @@ function append_rows!(
372
380
arr_ix = arr_ixs[arr. linear_indices[j]]
373
381
skip_symmetric && (arr_ix ∈ visited_indices) && continue
374
382
375
- push! (
376
- partable,
377
- partable_row (par, arr_ix, arr_name, varnames, free = true ),
378
- )
383
+ push! (partable, partable_row (par, arr_ix, arr_name, varnames, free = true ))
379
384
if skip_symmetric
380
385
# mark index and its symmetric as visited
381
386
push! (visited_indices, arr_ix)
0 commit comments