wolffd@0: wolffd@0: nruns = 50; wolffd@0: weights = zeros(674, nruns); wolffd@0: for i = 1:50; wolffd@0: Gstob = ClipSimGraphStober(); wolffd@0: Gstob.random_all_constraints_graph; wolffd@0: G = ClipSimGraphMulti(Gstob.to_DiGraph()); wolffd@0: wolffd@0: % --- wolffd@0: % derive similarity information: this wolffd@0: % returns the weights of edges meaning sim(a,b) > sim(a,c) wolffd@0: % --- wolffd@0: [weights(:,i), a, b, c] = G.similarities(); wolffd@0: end wolffd@0: wolffd@0: % --- wolffd@0: % lets see if the siilarity data is the same wolffd@0: % it is NOT wolffd@0: % --- wolffd@0: diff = sum(sum(abs(diff(weights)))) wolffd@0: wolffd@0: % --- wolffd@0: % ok, my theory is that wolffd@0: % a. all the three-edge components are erased one edge. wolffd@0: % b. if not all, then the ones with two edges wolffd@0: % being directed at the same node. wolffd@0: % --- wolffd@0: wolffd@0: % --- wolffd@0: % have to convert, as for some reason wolffd@0: % this does not work yet on multigraphs wolffd@0: % --- wolffd@0: Gdi = DiGraph(G); wolffd@0: [Gs, s, id] = Gdi.connected_components(); wolffd@0: wolffd@0: for i = 1:numel(Gs) wolffd@0: edges(i) = Gs(i).num_edges(); wolffd@0: end wolffd@0: wolffd@0: % only 2-edge graphs wolffd@0: max(edges) wolffd@0: wolffd@0: % --- wolffd@0: % test if graphs are subgraphs of 860 full ne wolffd@0: % --- wolffd@0: Gm = ClipSimGraphMulti(comparison, comparison_ids); wolffd@0: Gm.remove_cycles_lenght2; wolffd@0: wolffd@0: Gm.isSubgraph(G) wolffd@0: