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