ta=[1 1 2 3 3 4 5 5]; he=[2 3 4 4 5 6 2 6]; g=make_graph('foo',1,6,ta,he); // maksymalny przepływ g=add_edge_data(g,'max_cap',[3 8 4 2 3 7 1 2]); g=add_edge_data(g,'min_cap',ones(1,8)) [v,phi,ierr]=max_flow(1,6,g); // najkrótsza ścieżka g=add_edge_data(g,'length',[3 8 4 2 3 7 1 2]); [p,lp]=shortest_path(1,6,g,'length'); n=path_2_nodes(p,g); // komiwojażer g2=make_graph('foo',1,6,[ta he],[he ta]); g2=add_edge_data(g2,'length',[3 8 4 2 3 7 1 2 3 8 4 2 3 7 1 2]); circ=salesman(g2); wierz=path_2_nodes(circ,g2); // minimalne drzewo rozpinające g3=make_graph('foo',0,6,ta, he); g3=add_edge_data(g3,'weight',[3 8 4 2 3 7 1 2]); tr=min_weight_tree(g3);