annotate toolboxes/FullBNT-1.0.7/bnt/general/partition_dbn_nodes.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function [pnodes, tnodes] = partition_dbn_nodes(intra, inter)
wolffd@0 2 % PARTITION_DBN_NODES Divide the nodes into a DBN into persistent and transient.
wolffd@0 3 % [pnodes, tnodes] = partition_dbn_nodes(intra, inter)
wolffd@0 4 % Persistent nodes have children in the next time slice, transient nodes do not.
wolffd@0 5
wolffd@0 6 ss = length(intra);
wolffd@0 7 pnodes = [];
wolffd@0 8 tnodes = [];
wolffd@0 9 for i=1:ss
wolffd@0 10 cs = children(inter, i);
wolffd@0 11 if isempty(cs)
wolffd@0 12 tnodes = [tnodes i];
wolffd@0 13 else
wolffd@0 14 pnodes = [pnodes i];
wolffd@0 15 end
wolffd@0 16 end
wolffd@0 17