<< 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 the list of nodes ns of the graph g into the corresponding list of edges p. If there is a path following each successive nodes of ns, 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]=NARVAL_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=NARVAL_G_ShowNodesEdges(g,w);//graph visualization
[p]=NARVAL_G_Nodes2Path(ns,g);//application of NARVAL_G_Nodes2Path
p

Authors

Foued Melakessou

Contact

Dr. Foued Melakessou

Research Associate

Interdisciplinary Centre for Security, Reliability and Trust

Room F106

University of Luxembourg

6, rue Coudenhove Kalergi

L-1359 Luxembourg-Kirchberg

E-mail: foued.melakessou@uni.lu

Tel: (+352) 46 66 44 5346

Home Page


<< NARVAL_G_Nodes2Edge NARVAL NARVAL_G_OriginalGraph >>