Mercurial > hg > camir-aes2014
comparison toolboxes/FullBNT-1.0.7/bnt/general/compute_minimal_interface.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 function clqs = compute_minimal_interface(intra, inter) | |
2 | |
3 int = compute_fwd_interface(intra, inter); | |
4 ss = length(intra); | |
5 Z = zeros(ss); | |
6 dag = [intra inter; | |
7 Z intra]; | |
8 G = moralize(dag); | |
9 intra2 = G(1:ss,1:ss); | |
10 inter2 = G(1:ss,(1:ss)+ss); | |
11 G = unroll_dbn_topology(intra2, inter2, ss); | |
12 T = ss; | |
13 last_slice = (1:ss) + (T-1)*ss; | |
14 G = (G + G')/2; % mk symmetric | |
15 G2 = (expm(full(G)) > 0); % closure of graph | |
16 G3 = G2(last_slice, last_slice); | |
17 [c,v] = scc(G3); % connected components | |
18 ncomp = size(v,1); | |
19 clqs = cell(1,ncomp); | |
20 for i=1:ncomp | |
21 ndx = find(v(i,:)>0); | |
22 clqs{i} = v(i,ndx); | |
23 clqs{i} = myintersect(clqs{i}, int); | |
24 end | |
25 |