Mercurial > hg > camir-aes2014
view core/magnatagatune/macro_validate_stober_randomsets.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
line wrap: on
line source
nruns = 50; weights = zeros(674, nruns); for i = 1:50; Gstob = ClipSimGraphStober(); Gstob.random_all_constraints_graph; G = ClipSimGraphMulti(Gstob.to_DiGraph()); % --- % derive similarity information: this % returns the weights of edges meaning sim(a,b) > sim(a,c) % --- [weights(:,i), a, b, c] = G.similarities(); end % --- % lets see if the siilarity data is the same % it is NOT % --- diff = sum(sum(abs(diff(weights)))) % --- % ok, my theory is that % a. all the three-edge components are erased one edge. % b. if not all, then the ones with two edges % being directed at the same node. % --- % --- % have to convert, as for some reason % this does not work yet on multigraphs % --- Gdi = DiGraph(G); [Gs, s, id] = Gdi.connected_components(); for i = 1:numel(Gs) edges(i) = Gs(i).num_edges(); end % only 2-edge graphs max(edges) % --- % test if graphs are subgraphs of 860 full ne % --- Gm = ClipSimGraphMulti(comparison, comparison_ids); Gm.remove_cycles_lenght2; Gm.isSubgraph(G)