<< NARVAL_G_Nodes2Edge NARVAL NARVAL_G_OriginalGraph >>

NARVAL >> NARVAL > NARVAL_G_Nodes2Path

NARVAL_G_Nodes2Path

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

Calling Sequence

[p]=NARVAL_G_Nodes2Path(ns,g)

Parameters

ns :

list of nodes.

g :

network graph.

p :

list of links.

Description

NARVAL_G_Nodes2Path transforms a list of nodes ns of the graph g. If there is a path following each successive nodes ns, then the corresponding vector of successive links p is generated. Otherwise p is empty.

Examples

name='network';
node_number=3;
tail=[2 3 3];
head=[1 1 2];
node_x=[100 700 200];
node_y=[200 800 600];
[g]=NARVAL_G_MakeGraph(name,node_number,tail,head,node_x,node_y);//generation of a topology with 3 nodes
ns=[1 2 3];
[p]=NARVAL_G_Nodes2Path(ns,g);//application of NARVAL_G_Nodes2Path
p

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_G_Nodes2Edge NARVAL NARVAL_G_OriginalGraph >>