<< NL_G_Nodes2Edge NL_G: Graph NL_G_OriginalGraph >>

NARVAL >> NL_G: Graph > NL_G_Nodes2Path

NL_G_Nodes2Path

Transform a list of nodes into the corresponding list of edges.

Calling Sequence

[P] = NL_G_Nodes2Path(N,G)

Arguments

N :

List of nodes.

G :

Graph.

P :

List of links.

Description

NL_G_Nodes2Path transforms the list of nodes N of the graph G into the corresponding list of edges P. If there is a path following each successive nodes of N, then the corresponding vector of successive links P is generated. Otherwise P is empty.

Examples

name='network';//graph name
node_number=3;//graph size
tail=[2 3 3];//links parameters
head=[1 1 2];
node_x=[100 700 200];//nodes parameters
node_y=[200 800 600];
[g]=NL_G_MakeGraph(name,node_number,tail,head,node_x,node_y);//generation of a topology with 3 nodes
ns=[1 2 3];//list of nodes
w=1;//window index
f=NL_G_ShowGraphNE(g,w);//graph visualization
[p]=NL_G_Nodes2Path(ns,g)//application of NL_G_Nodes2Path

Report an issue
<< NL_G_Nodes2Edge NL_G: Graph NL_G_OriginalGraph >>