disjoint - Disctinction coefficient between 2 routes
Disctinction coefficient D between 2 routes r1 and r2 with hops lengths h1 and h2. l1 and l2 represent the routes weigths. D is proportionnal to the quantity S of common links between the two routes and their minimum weight. D=(1-(S/((h1+h2)/2-1)))*min([l1 l2]).
D=300; L=1000; n=30; i=1; j=10; [g]=ntg_locality(D,L,n); g=weightgraph(g); [tr1,tr2,tr3,tr4,tr5]=routing_n_dijkstra(g,L,'test.dat'); ind=(i-1)*n+j; l1=tr1(ind,1); r1=tr1(ind,2:2+l1-1); l2=tr2(ind,1); r2=tr2(ind,2:2+l2-1); l3=tr3(ind,1); r3=tr3(ind,2:2+l3-1); D1_2=disjoint(r1,l1,r2,l2); D1_3=disjoint(r1,l1,r3,l3); D2_3=disjoint(r2,l2,r3,l3);