1%{ @file sn_get_state_aggr.m
2 % @brief Returns the aggregated initial state of the network
4 % @author LINE Development Team
8 % @brief Returns the aggregated initial state of the network
11 % This function extracts and aggregates the initial state of all stateful
12 %
nodes in the network.
16 % initialStateAggr = sn_get_state_aggr(sn)
21 % <tr><th>Name<th>Description
22 % <tr><td>sn<td>Network structure
27 % <tr><th>Name<th>Description
28 % <tr><td>initialStateAggr<td>Aggregated initial state cell array
31function [initialStateAggr] = sn_get_state_aggr(sn)
33initialState = sn.state;
34initialStateAggr = cell(size(initialState));
35for isf=1:length(initialStateAggr)
36 ind = sn.statefulToNode(isf);
37 [~,initialStateAggr{isf}] = State.toMarginalAggr(sn, ind, initialState{isf});