Highlight a path on a graph.
[Go] = NL_G_HighlightPath(P,G,Ec,Eb,Nc,Nb,I)
Path.
Graph.
Edge color.
Edge width.
Node color.
Node border.
Window index.
Output graph.
NL_G_HighlightPath displays the path P in the graph G. The nodes of the path are plotted with the border , the color
. The edges of the path are displayed with the color
and the width
. The graph is plotted within the window I. The output graph is stored in
.
[path]=NL_F_NLPath();//path to NARVAL module path=path+'/demos/';//folder path load(path+'topo_100.graph');//loading of the network graph load(path+'RoutingTables_topo_100.dat','pt','rt1','rt2','rt3','rt4','rt5');//loading of the network routing tables [Path,Next]=NL_R_FloydWarshall(g);//application of the Floyd-Warshall algorithm n=length(g.node_x);//network size [i,j]=NL_F_RandIntNiNj(n);//generation of extremal connection nodes [p]=NL_R_FloydWarshallPath(Path,Next,i,j);//application of NL_R_FloydWarshallPath ec=5;//edge color eb=3;//edge border nc=2;//node color nb=10;//border default is 5. Nodes belonging to the path are displayed with the border eb. ind=1;//window index [g]=NL_G_HighlightPath(p,g,ec,eb,nc,nb,ind);//application of NL_R_HighlightPath | ![]() | ![]() |