Daniel@0: function [pnodes, tnodes] = partition_dbn_nodes(intra, inter) Daniel@0: % PARTITION_DBN_NODES Divide the nodes into a DBN into persistent and transient. Daniel@0: % [pnodes, tnodes] = partition_dbn_nodes(intra, inter) Daniel@0: % Persistent nodes have children in the next time slice, transient nodes do not. Daniel@0: Daniel@0: ss = length(intra); Daniel@0: pnodes = []; Daniel@0: tnodes = []; Daniel@0: for i=1:ss Daniel@0: cs = children(inter, i); Daniel@0: if isempty(cs) Daniel@0: tnodes = [tnodes i]; Daniel@0: else Daniel@0: pnodes = [pnodes i]; Daniel@0: end Daniel@0: end Daniel@0: