LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
sn_get_state_aggr.m
1%{ @file sn_get_state_aggr.m
2 % @brief Returns the aggregated initial state of the network
3 %
4 % @author LINE Development Team
5%}
6
7%{
8 % @brief Returns the aggregated initial state of the network
9 %
10 % @details
11 % This function extracts and aggregates the initial state of all stateful
12 % nodes in the network.
13 %
14 % @par Syntax:
15 % @code
16 % initialStateAggr = sn_get_state_aggr(sn)
17 % @endcode
18 %
19 % @par Parameters:
20 % <table>
21 % <tr><th>Name<th>Description
22 % <tr><td>sn<td>Network structure
23 % </table>
24 %
25 % @par Returns:
26 % <table>
27 % <tr><th>Name<th>Description
28 % <tr><td>initialStateAggr<td>Aggregated initial state cell array
29 % </table>
30%}
31function [initialStateAggr] = sn_get_state_aggr(sn)
32
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});
38end
39end
Definition mmt.m:92